2023-10-26 12:25:19 +02:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
use esmith::Build::CreateLinks qw(:all);
|
2024-04-26 07:59:05 +02:00
|
|
|
my $event;
|
|
|
|
my $service;
|
|
|
|
my $daemon;
|
|
|
|
my $config;
|
2023-10-26 12:25:19 +02:00
|
|
|
|
2024-04-26 07:59:05 +02:00
|
|
|
foreach $event (qw(
|
2023-10-26 12:25:19 +02:00
|
|
|
email-update
|
|
|
|
domain-modify
|
|
|
|
domain-create
|
|
|
|
domain-delete
|
|
|
|
bootstrap-console-save
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
))
|
|
|
|
{
|
|
|
|
event_link("domains-update-dkim", $event, "30");
|
|
|
|
}
|
|
|
|
|
2024-04-26 07:59:05 +02:00
|
|
|
$service = "/var/service/qpsmtpd";
|
2023-10-26 12:25:19 +02:00
|
|
|
templates2events("$service/ssl/cert.pem", qw(
|
|
|
|
bootstrap-console-save
|
|
|
|
console-save
|
|
|
|
email-update
|
|
|
|
ssl-update
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
));
|
|
|
|
|
|
|
|
templates2events($_, qw(
|
|
|
|
bootstrap-console-save
|
|
|
|
console-save
|
|
|
|
email-update
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
))
|
|
|
|
for (qw(
|
|
|
|
/etc/mail-dmarc.ini
|
|
|
|
/home/e-smith/dkim_keys/default/selector
|
|
|
|
));
|
|
|
|
|
2024-04-25 23:24:35 +02:00
|
|
|
#### start do this for qpsmtpd /sqpsmtpd/ uqpsmtpd
|
2024-04-26 07:59:05 +02:00
|
|
|
for $daemon ( qw(qpsmtpd sqpsmtpd uqpsmtpd) )
|
2024-04-25 23:24:35 +02:00
|
|
|
{
|
|
|
|
$service = "/var/service/$daemon";
|
2024-04-26 07:59:05 +02:00
|
|
|
$config = "$service/config";
|
2023-10-26 12:25:19 +02:00
|
|
|
|
2024-04-25 23:24:35 +02:00
|
|
|
foreach $event (qw(
|
2023-10-26 12:25:19 +02:00
|
|
|
bootstrap-console-save
|
2024-04-25 23:24:35 +02:00
|
|
|
console-save
|
2023-10-26 12:25:19 +02:00
|
|
|
email-update
|
2024-04-25 23:24:35 +02:00
|
|
|
network-create
|
|
|
|
network-delete
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
))
|
|
|
|
{
|
|
|
|
templates2events("$service/peers/0", $event);
|
|
|
|
templates2events("$service/peers/local", $event);
|
|
|
|
|
|
|
|
templates2events("$service/config/peers/0", $event);
|
|
|
|
templates2events("$service/config/peers/local", $event);
|
|
|
|
}
|
|
|
|
|
|
|
|
templates2events("$config/$_", qw(
|
|
|
|
bootstrap-console-save
|
|
|
|
console-save
|
|
|
|
email-update
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
))
|
|
|
|
for (qw(
|
|
|
|
IP
|
|
|
|
badhelo
|
|
|
|
badrcptto
|
|
|
|
badrcptto_ext
|
|
|
|
badmailfrom
|
|
|
|
dnsbl_zones
|
|
|
|
dnsbl_allow
|
|
|
|
uribl_zones
|
|
|
|
loglevel
|
|
|
|
memory_threshold
|
|
|
|
plugins
|
|
|
|
relayclients norelayclients
|
|
|
|
rhsbl_zones
|
|
|
|
signatures_patterns
|
|
|
|
plugin_dirs
|
|
|
|
smtpgreeting
|
|
|
|
spool_dir
|
|
|
|
subject_prefix
|
|
|
|
invalid_resolvable_fromhost
|
|
|
|
timeout
|
|
|
|
timeoutsmtpd
|
|
|
|
tls_before_auth
|
|
|
|
tls_ciphers
|
|
|
|
tls_protocols
|
|
|
|
));
|
|
|
|
|
2024-12-17 05:21:59 +01:00
|
|
|
templates2events("$config/$_", qw(
|
|
|
|
console-save
|
|
|
|
bootstrap-console-save
|
|
|
|
domain-create
|
|
|
|
domain-delete
|
|
|
|
ip-change
|
|
|
|
email-update
|
|
|
|
host-create
|
|
|
|
host-delete
|
|
|
|
host-modify
|
|
|
|
post-upgrade
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
))
|
|
|
|
for (qw(
|
|
|
|
rcpthosts
|
|
|
|
smtproutes
|
|
|
|
));
|
|
|
|
|
2024-04-25 23:24:35 +02:00
|
|
|
templates2events("$config/badrcptto_ext", qw(
|
|
|
|
domain-create
|
|
|
|
domain-delete
|
|
|
|
user-create
|
|
|
|
user-delete
|
|
|
|
user-modify
|
|
|
|
group-create
|
|
|
|
group-delete
|
|
|
|
group-modify
|
|
|
|
pseudonym-create
|
|
|
|
pseudonym-delete
|
|
|
|
pseudonym-modify
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
));
|
|
|
|
|
|
|
|
templates2events("$config/relayclients", qw(
|
|
|
|
network-create
|
|
|
|
network-delete
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
));
|
|
|
|
|
|
|
|
templates2events("$config/$_", qw(
|
|
|
|
ssl-update
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
))
|
|
|
|
for (qw(
|
|
|
|
tls_before_auth
|
|
|
|
tls_ciphers
|
|
|
|
tls_protocols
|
|
|
|
));
|
|
|
|
|
|
|
|
templates2events("$config/badhelo", 'ip-change');
|
|
|
|
|
|
|
|
templates2events("$config/goodrcptto", qw(
|
|
|
|
bootstrap-console-save
|
|
|
|
email-update
|
|
|
|
domain-create
|
|
|
|
domain-delete
|
|
|
|
user-create
|
|
|
|
user-delete
|
|
|
|
user-modify
|
|
|
|
pseudonym-create
|
|
|
|
pseudonym-delete
|
|
|
|
pseudonym-modify
|
|
|
|
group-create
|
|
|
|
group-delete
|
|
|
|
group-modify
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
));
|
|
|
|
|
|
|
|
safe_touch("root/etc/e-smith/templates/$config/forcespamcheck/template-begin");
|
|
|
|
templates2events("$config/forcespamcheck", qw(
|
|
|
|
bootstrap-console-save
|
|
|
|
email-update
|
|
|
|
domain-create
|
|
|
|
domain-delete
|
|
|
|
user-create
|
|
|
|
user-delete
|
|
|
|
user-modify
|
|
|
|
pseudonym-create
|
|
|
|
pseudonym-delete
|
|
|
|
pseudonym-modify
|
|
|
|
group-create
|
|
|
|
group-delete
|
|
|
|
group-modify
|
|
|
|
smeserver-qpsmtpd-update
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
safe_symlink("restart",
|
2023-10-26 12:25:19 +02:00
|
|
|
"root/etc/e-smith/events/email-update/services2adjust/$daemon");
|
|
|
|
safe_symlink("sighup",
|
|
|
|
"root/etc/e-smith/events/ssl-update/services2adjust/$daemon");
|
2024-04-25 23:24:35 +02:00
|
|
|
|
2024-04-26 07:59:05 +02:00
|
|
|
for $event ( qw(smeserver-qpsmtpd-update email-update console-save bootstrap-console-save post-install post-upgrade) )
|
2024-04-25 23:24:35 +02:00
|
|
|
{
|
|
|
|
templates2events("/usr/lib/systemd/system/$daemon.service.d/50koozali.conf", $event);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-10-26 12:25:19 +02:00
|
|
|
}
|
2024-04-25 23:24:35 +02:00
|
|
|
#######end of per config dir
|
2023-10-26 12:25:19 +02:00
|
|
|
|
2024-04-26 07:59:05 +02:00
|
|
|
for $event ( qw(network-create network-delete) )
|
2023-10-26 12:25:19 +02:00
|
|
|
{
|
|
|
|
safe_symlink("sigusr1",
|
|
|
|
"root/etc/e-smith/events/$event/services2adjust/qpsmtpd");
|
2024-04-25 23:24:35 +02:00
|
|
|
safe_symlink("sigusr1",
|
|
|
|
"root/etc/e-smith/events/$event/services2adjust/sqpsmtpd");
|
|
|
|
safe_symlink("sigusr1",
|
|
|
|
"root/etc/e-smith/events/$event/services2adjust/uqpsmtpd");
|
2023-10-26 12:25:19 +02:00
|
|
|
}
|
|
|
|
|
2024-04-26 07:59:05 +02:00
|
|
|
$event = 'smeserver-qpsmtpd-update';
|
2023-10-26 12:25:19 +02:00
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/qpsmtpd");
|
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/sqpsmtpd");
|
2024-04-26 07:59:05 +02:00
|
|
|
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/uqpsmtpd");
|
2023-10-26 12:25:19 +02:00
|
|
|
templates2events("/etc/systemd/system-preset/49-koozali.preset", $event);
|
|
|
|
event_link("systemd-reload", $event, "89");
|
|
|
|
event_link("systemd-default", $event, "88");
|