2023-07-12 10:06:46 +02:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
|
|
|
use File::Basename;
|
|
|
|
use File::Path;
|
|
|
|
|
|
|
|
|
|
|
|
foreach (qw(
|
|
|
|
defaultdomain
|
|
|
|
defaulthost
|
* Tue Dec 03 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.1-1.sme
- initial release of smeserver-mini-qmail from former smeserver-qmail
. only for final delivery or forward behind qpsmtpd and postfix
. set /var/qmail/control/qmqpservers server file
. set junkmail delivery to dovecot-lda
. we only need configs idhost, qmqpservers, me, defaultdomain, plusdomain, rcpthosts
. removing controls badrcptto,helohost,smtproutes,rcpthosts,badmailfrom,databytes,bouncefrom,
bouncehost,concurrencylocal,concurrencyremote,doublebouncehost,doublebounceto,envnoathost
. removing /var/qmail/users
. removing alias
. cleaning actions scripts (TODO: move pseudonym-cleanup to smeserver-email)
2024-12-10 05:37:37 +01:00
|
|
|
idhost
|
|
|
|
locals
|
2023-07-12 10:06:46 +02:00
|
|
|
me
|
|
|
|
plusdomain
|
* Tue Dec 03 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.1-1.sme
- initial release of smeserver-mini-qmail from former smeserver-qmail
. only for final delivery or forward behind qpsmtpd and postfix
. set /var/qmail/control/qmqpservers server file
. set junkmail delivery to dovecot-lda
. we only need configs idhost, qmqpservers, me, defaultdomain, plusdomain, rcpthosts
. removing controls badrcptto,helohost,smtproutes,rcpthosts,badmailfrom,databytes,bouncefrom,
bouncehost,concurrencylocal,concurrencyremote,doublebouncehost,doublebounceto,envnoathost
. removing /var/qmail/users
. removing alias
. cleaning actions scripts (TODO: move pseudonym-cleanup to smeserver-email)
2024-12-10 05:37:37 +01:00
|
|
|
qmqpservers
|
2023-07-12 10:06:46 +02:00
|
|
|
virtualdomains
|
|
|
|
))
|
|
|
|
{
|
2024-09-25 04:29:24 +02:00
|
|
|
templates2events("/var/qmail/control/$_", qw(
|
|
|
|
console-save
|
|
|
|
bootstrap-console-save
|
|
|
|
domain-create
|
|
|
|
domain-delete
|
|
|
|
ip-change
|
|
|
|
email-update
|
|
|
|
host-create
|
|
|
|
host-delete
|
|
|
|
host-modify
|
|
|
|
post-upgrade
|
2024-12-03 22:12:25 +01:00
|
|
|
smeserver-mini-qmail-update
|
2024-09-25 04:29:24 +02:00
|
|
|
));
|
|
|
|
|
2024-10-15 19:59:06 +02:00
|
|
|
}
|
2023-07-12 10:06:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for console-save event:
|
|
|
|
# write config files and create startup link
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "console-save";
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for bootstrap-console-save event:
|
|
|
|
# write config files and create startup link
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "bootstrap-console-save";
|
|
|
|
|
|
|
|
event_link("pseudonym-cleanup", $event, "03");
|
|
|
|
event_link("qmail-update-user", $event, "55");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for domain-create event:
|
|
|
|
# rewrite config files and restart server
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "domain-create";
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for domain-delete event:
|
|
|
|
# rewrite config files and restart server
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "domain-delete";
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for email-update event:
|
|
|
|
# email parameters have been changed in the e-smith
|
|
|
|
# manager; update system security, rewrite email config
|
|
|
|
# files, configure other system files (crontab is the
|
|
|
|
# important one), and restart server
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "email-update";
|
|
|
|
|
|
|
|
event_link("qmail-update-user", $event, "03");
|
|
|
|
event_link("pseudonym-cleanup", $event, "30");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for group-create event:
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "group-create";
|
|
|
|
|
|
|
|
event_link("pseudonym-cleanup", $event, "03");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for group-delete event:
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "group-delete";
|
|
|
|
|
|
|
|
event_link("pseudonym-cleanup", $event, "03");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for group-modify event:
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "group-modify";
|
|
|
|
|
|
|
|
event_link("pseudonym-cleanup", $event, "03");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for user-create event:
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "user-create";
|
|
|
|
|
|
|
|
event_link("qmail-update-user", $event, "20");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for user-modify event
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "user-modify";
|
|
|
|
|
|
|
|
event_link("qmail-update-user", $event, "20");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for user-modify-admin event
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "user-modify-admin";
|
|
|
|
|
|
|
|
event_link("qmail-update-user", $event, "20");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for user-delete event
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "user-delete";
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for ip-up event:
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "ip-up";
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for ip-change event:
|
|
|
|
#--------------------------------------------------
|
|
|
|
$event = "ip-change";
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
2024-12-03 22:12:25 +01:00
|
|
|
# actions for smeserver-mini-qmail-update event:
|
2023-07-12 10:06:46 +02:00
|
|
|
#--------------------------------------------------
|
2024-12-03 22:12:25 +01:00
|
|
|
$event = "smeserver-mini-qmail-update";
|
2023-07-12 10:06:46 +02:00
|
|
|
event_link("pseudonym-cleanup", $event, "03");
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
# actions for pseudonym-{create,delete,modify}
|
|
|
|
#--------------------------------------------------
|
|
|
|
foreach $event ( qw(pseudonym-create pseudonym-modify pseudonym-delete
|
|
|
|
user-create user-modify user-delete
|
|
|
|
))
|
|
|
|
{
|
|
|
|
event_link("pseudonym-cleanup", $event, "03");
|
|
|
|
templates2events("/var/qmail/control/virtualdomains", $event);
|
|
|
|
}
|
|
|
|
|
|
|
|
safe_symlink(".qmail", "root/home/e-smith/.qmail-default");
|
|
|
|
|