#!/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");