smeserver-mini-qmail/createlinks
Jean-Philippe Pialasse 89566576f1 * 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-09 23:37:37 -05:00

151 lines
4.3 KiB
Perl
Executable File

#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
use File::Basename;
use File::Path;
foreach (qw(
defaultdomain
defaulthost
idhost
locals
me
plusdomain
qmqpservers
virtualdomains
))
{
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
smeserver-mini-qmail-update
));
}
#--------------------------------------------------
# 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";
#--------------------------------------------------
# actions for smeserver-mini-qmail-update event:
#--------------------------------------------------
$event = "smeserver-mini-qmail-update";
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");