diff --git a/createlinks b/createlinks index a3d90da..f2c6624 100644 --- a/createlinks +++ b/createlinks @@ -2,7 +2,7 @@ use esmith::Build::CreateLinks qw(:all); -foreach $event (qw( +foreach my $event (qw( email-update domain-modify domain-create @@ -15,39 +15,6 @@ foreach $event (qw( } my $service = "/var/service/qpsmtpd"; - -foreach $event (qw( - network-create - network-delete - smeserver-qpsmtpd-update - )) -{ - templates2events("$service/config/relayclients", $event); -} - -foreach $event (qw( - bootstrap-console-save - console-save - email-update - 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("$service/runenv", qw( - bootstrap-console-save - console-save - email-update - smeserver-qpsmtpd-update - )); - templates2events("$service/ssl/cert.pem", qw( bootstrap-console-save console-save @@ -67,154 +34,158 @@ templates2events($_, qw( /home/e-smith/dkim_keys/default/selector )); -my $secure_service = "/var/service/sqpsmtpd"; - -templates2events("$secure_service/runenv", qw( - bootstrap-console-save - console-save - email-update - smeserver-qpsmtpd-update - )); - -my $control = "/var/qmail/control"; -templates2events("$control/badmailfrom", qw( - bootstrap-console-save - console-save - email-update - smeserver-qpsmtpd-update - )); -templates2events("$control/badrcptto", qw( - bootstrap-console-save - console-save - email-update - 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 - )); - -my $config = "/var/service/qpsmtpd/config"; -templates2events("$config/$_", qw( - bootstrap-console-save - console-save - email-update - smeserver-qpsmtpd-update - )) - for (qw( - IP - badhelo - badrcptto - badrcptto_ext - 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 - )); -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/$_", 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 - )); - - - -for my $daemon ( qw(qpsmtpd sqpsmtpd) ) +#### start do this for qpsmtpd /sqpsmtpd/ uqpsmtpd +for my $daemon ( qw(qpsmtpd sqpsmtpd uqpsmtpd) ) { - safe_symlink("sighup", + $service = "/var/service/$daemon"; + my $config = "$service/config" + + foreach $event (qw( + bootstrap-console-save + console-save + email-update + 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 + )); + + 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", "root/etc/e-smith/events/email-update/services2adjust/$daemon"); safe_symlink("sighup", "root/etc/e-smith/events/ssl-update/services2adjust/$daemon"); + + for my $event (qw(smeserver-qpsmtpd-update email-update console-save bootstrap-console-save post-install post-upgrade) ) + { + templates2events("/usr/lib/systemd/system/$daemon.service.d/50koozali.conf", $event); + } + + } +#######end of per config dir for my $event ( qw(network-create network-delete) ) { safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/qpsmtpd"); + safe_symlink("sigusr1", + "root/etc/e-smith/events/$event/services2adjust/sqpsmtpd"); + safe_symlink("sigusr1", + "root/etc/e-smith/events/$event/services2adjust/uqpsmtpd"); } - my $event = 'smeserver-qpsmtpd-update'; safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/qpsmtpd"); safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/sqpsmtpd"); +safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/uqpsmtpd") templates2events("/etc/systemd/system-preset/49-koozali.preset", $event); event_link("systemd-reload", $event, "89"); event_link("systemd-default", $event, "88"); diff --git a/root/etc/e-smith/db/configuration/defaults/upqsmtpd/Authentication b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/Authentication new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/Authentication @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/upqsmtpd/Instances b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/Instances new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/Instances @@ -0,0 +1 @@ +10 diff --git a/root/etc/e-smith/db/configuration/defaults/upqsmtpd/TCPPort b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/TCPPort new file mode 100644 index 0000000..3aaf001 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/TCPPort @@ -0,0 +1 @@ +587 diff --git a/root/etc/e-smith/db/configuration/defaults/upqsmtpd/access b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/access new file mode 100644 index 0000000..a48cf0d --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/access @@ -0,0 +1 @@ +public diff --git a/root/etc/e-smith/db/configuration/defaults/upqsmtpd/status b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/status new file mode 100644 index 0000000..86981e6 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/status @@ -0,0 +1 @@ +enabled diff --git a/root/etc/e-smith/db/configuration/defaults/upqsmtpd/type b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/type new file mode 100644 index 0000000..24e1098 --- /dev/null +++ b/root/etc/e-smith/db/configuration/defaults/upqsmtpd/type @@ -0,0 +1 @@ +service diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/IP b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/IP new file mode 100644 index 0000000..ef3ea84 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/IP @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/IP" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badhelo b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badhelo new file mode 100644 index 0000000..9d0ead1 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badhelo @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badhelo" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badmailfrom b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badmailfrom new file mode 100644 index 0000000..96f5d23 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badmailfrom @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badmailfrom" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badrcptto b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badrcptto new file mode 100644 index 0000000..92a592f --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badrcptto @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badrcptto" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badrcptto_ext b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badrcptto_ext new file mode 100644 index 0000000..237ced0 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/badrcptto_ext @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badrcptto_ext" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/dnsbl_allow b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/dnsbl_allow new file mode 100644 index 0000000..ea47e80 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/dnsbl_allow @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/dnsbl_allow" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/dnsbl_zones b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/dnsbl_zones new file mode 100644 index 0000000..eb8610a --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/dnsbl_zones @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/dnsbl_zones" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/forcespamcheck b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/forcespamcheck new file mode 100644 index 0000000..bd9db19 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/forcespamcheck @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/forcespamcheck" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/goodrcptto b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/goodrcptto new file mode 100644 index 0000000..a7774f9 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/goodrcptto @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/goodrcptto" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/invalid_resolvable_fromhost b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/invalid_resolvable_fromhost new file mode 100644 index 0000000..14cb429 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/invalid_resolvable_fromhost @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/invalid_resolvable_fromhost" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/loglevel b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/loglevel new file mode 100644 index 0000000..202df8a --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/loglevel @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/loglevel" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/memory_threshold b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/memory_threshold new file mode 100644 index 0000000..0b883fe --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/memory_threshold @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/memory_threshold" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/norelayclients b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/norelayclients new file mode 100644 index 0000000..936e9cc --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/norelayclients @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/norelayclients" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/plugin_dirs b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/plugin_dirs new file mode 100644 index 0000000..6d931af --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/plugin_dirs @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/plugin_dirs" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/plugins b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/plugins new file mode 100644 index 0000000..efca5be --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/plugins @@ -0,0 +1 @@ +OUTPUT_FILENAME="/var/service/sqpsmtpd/config/peers/0" diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/relayclients b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/relayclients new file mode 100644 index 0000000..f113934 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/relayclients @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/relayclients" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/rhsbl_zones b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/rhsbl_zones new file mode 100644 index 0000000..502a86a --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/rhsbl_zones @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/rhsbl_zones" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/signatures_patterns b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/signatures_patterns new file mode 100644 index 0000000..35517f4 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/signatures_patterns @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/signatures_patterns" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/smtpgreeting b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/smtpgreeting new file mode 100644 index 0000000..d74d633 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/smtpgreeting @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/smtpgreeting" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/spool_dir b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/spool_dir new file mode 100644 index 0000000..e271c75 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/spool_dir @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/spool_dir" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/subject_prefix b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/subject_prefix new file mode 100644 index 0000000..c2c615c --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/subject_prefix @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/subject_prefix" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/timeout b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/timeout new file mode 100644 index 0000000..8de4f3b --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/timeout @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/timeout" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/timeoutsmtpd b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/timeoutsmtpd new file mode 100644 index 0000000..cc272dd --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/timeoutsmtpd @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/timeoutsmtpd" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/uribl_zones b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/uribl_zones new file mode 100644 index 0000000..fb1700e --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/config/uribl_zones @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/uribl_zones" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/peers/0 b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/peers/0 new file mode 100644 index 0000000..29af422 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/peers/0 @@ -0,0 +1,2 @@ +PERMS=use esmith::ConfigDB; (esmith::ConfigDB->open_ro->get('qpsmtpd')->prop('access') eq "private") ? "000" : "0644" +TEMPLATE_PATH="/var/service/qpsmtpd/peers/0" \ No newline at end of file diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/peers/locals b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/peers/locals new file mode 100644 index 0000000..6c67ec8 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/peers/locals @@ -0,0 +1,2 @@ +PERMS=use esmith::ConfigDB; (esmith::ConfigDB->open_ro->get('qpsmtpd')->prop('status') eq "enabled") ? "0644" : "0000" +TEMPLATE_PATH="/var/service/qpsmtpd/peers/locals" \ No newline at end of file diff --git a/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/ssl/cert.pem b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/ssl/cert.pem new file mode 100644 index 0000000..f627b35 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/sqpsmtpd/ssl/cert.pem @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/home/e-smith/ssl.pem" +OUTPUT_FILENAME="/var/service/qpsmtpd/ssl/cert.pem" +GID="qpsmtpd" +PERMS=0640 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/IP b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/IP new file mode 100644 index 0000000..ef3ea84 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/IP @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/IP" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badhelo b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badhelo new file mode 100644 index 0000000..9d0ead1 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badhelo @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badhelo" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badmailfrom b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badmailfrom new file mode 100644 index 0000000..96f5d23 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badmailfrom @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badmailfrom" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badrcptto b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badrcptto new file mode 100644 index 0000000..92a592f --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badrcptto @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badrcptto" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badrcptto_ext b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badrcptto_ext new file mode 100644 index 0000000..237ced0 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/badrcptto_ext @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/badrcptto_ext" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/dnsbl_allow b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/dnsbl_allow new file mode 100644 index 0000000..ea47e80 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/dnsbl_allow @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/dnsbl_allow" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/dnsbl_zones b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/dnsbl_zones new file mode 100644 index 0000000..eb8610a --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/dnsbl_zones @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/dnsbl_zones" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/forcespamcheck b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/forcespamcheck new file mode 100644 index 0000000..bd9db19 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/forcespamcheck @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/forcespamcheck" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/goodrcptto b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/goodrcptto new file mode 100644 index 0000000..a7774f9 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/goodrcptto @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/goodrcptto" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/invalid_resolvable_fromhost b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/invalid_resolvable_fromhost new file mode 100644 index 0000000..14cb429 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/invalid_resolvable_fromhost @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/invalid_resolvable_fromhost" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/loglevel b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/loglevel new file mode 100644 index 0000000..202df8a --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/loglevel @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/loglevel" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/memory_threshold b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/memory_threshold new file mode 100644 index 0000000..0b883fe --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/memory_threshold @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/memory_threshold" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/norelayclients b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/norelayclients new file mode 100644 index 0000000..936e9cc --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/norelayclients @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/norelayclients" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/plugin_dirs b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/plugin_dirs new file mode 100644 index 0000000..6d931af --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/plugin_dirs @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/plugin_dirs" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/plugins b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/plugins new file mode 100644 index 0000000..46cffe1 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/plugins @@ -0,0 +1 @@ +OUTPUT_FILENAME="/var/service/uqpsmtpd/config/peers/0" diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/relayclients b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/relayclients new file mode 100644 index 0000000..f113934 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/relayclients @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/relayclients" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/rhsbl_zones b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/rhsbl_zones new file mode 100644 index 0000000..502a86a --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/rhsbl_zones @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/rhsbl_zones" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/signatures_patterns b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/signatures_patterns new file mode 100644 index 0000000..35517f4 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/signatures_patterns @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/signatures_patterns" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/smtpgreeting b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/smtpgreeting new file mode 100644 index 0000000..d74d633 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/smtpgreeting @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/smtpgreeting" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/spool_dir b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/spool_dir new file mode 100644 index 0000000..e271c75 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/spool_dir @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/spool_dir" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/subject_prefix b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/subject_prefix new file mode 100644 index 0000000..c2c615c --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/subject_prefix @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/subject_prefix" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/timeout b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/timeout new file mode 100644 index 0000000..8de4f3b --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/timeout @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/timeout" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/timeoutsmtpd b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/timeoutsmtpd new file mode 100644 index 0000000..cc272dd --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/timeoutsmtpd @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/timeoutsmtpd" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/uribl_zones b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/uribl_zones new file mode 100644 index 0000000..fb1700e --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/config/uribl_zones @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/var/service/qpsmtpd/config/uribl_zones" +UID="root" +GID="root" +PERMS=0644 diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/peers/0 b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/peers/0 new file mode 100644 index 0000000..4adba53 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/peers/0 @@ -0,0 +1,2 @@ +PERMS=use esmith::ConfigDB; (esmith::ConfigDB->open_ro->get('uqpsmtpd')->prop('access') eq "private") ? "000" : "0644" +TEMPLATE_PATH="/var/service/qpsmtpd/peers/0" \ No newline at end of file diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/peers/locals b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/peers/locals new file mode 100644 index 0000000..96d893b --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/peers/locals @@ -0,0 +1,2 @@ +PERMS=use esmith::ConfigDB; (esmith::ConfigDB->open_ro->get('uqpsmtpd')->prop('status') eq "enabled") ? "0644" : "0000" +TEMPLATE_PATH="/var/service/qpsmtpd/peers/locals" \ No newline at end of file diff --git a/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/ssl/cert.pem b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/ssl/cert.pem new file mode 100644 index 0000000..f627b35 --- /dev/null +++ b/root/etc/e-smith/templates.metadata/var/service/uqpsmtpd/ssl/cert.pem @@ -0,0 +1,4 @@ +TEMPLATE_PATH="/home/e-smith/ssl.pem" +OUTPUT_FILENAME="/var/service/qpsmtpd/ssl/cert.pem" +GID="qpsmtpd" +PERMS=0640 diff --git a/root/etc/e-smith/templates/etc/rsyslog.conf/32qpsmtpd b/root/etc/e-smith/templates/etc/rsyslog.conf/32qpsmtpd new file mode 100644 index 0000000..b58e684 --- /dev/null +++ b/root/etc/e-smith/templates/etc/rsyslog.conf/32qpsmtpd @@ -0,0 +1,10 @@ +#qpsmtpd +:programname, startswith, "qpsmtpd" /var/log/qpsmtpd/qpsmtpd.log +& stop +:programname, startswith, "sqpsmtpd" /var/log/sqpsmtpd/sqpsmtpd.log +& stop +:programname, startswith, "uqpsmtpd" /var/log/uqpsmtpd/uqpsmtpd.log +& stop + + + diff --git a/root/etc/e-smith/templates/usr/lib/systemd/system/qpsmtpd.service.d/50koozali.conf/40Service b/root/etc/e-smith/templates/usr/lib/systemd/system/qpsmtpd.service.d/50koozali.conf/40Service new file mode 100644 index 0000000..0ef7dd7 --- /dev/null +++ b/root/etc/e-smith/templates/usr/lib/systemd/system/qpsmtpd.service.d/50koozali.conf/40Service @@ -0,0 +1,14 @@ +[Service] +LimitDATA={$qpsmtpd{Softlimit} || "150000000"} +LimitSTACK={$qpsmtpd{Softlimit} || "150000000"} +LimitMEMLOCK={$qpsmtpd{Softlimit} || "150000000"} +Environment= +Environment={ +$OUT = "QPSMTPD_CONFIG=/var/service/qpsmtpd/config"; +$OUT .= " PORT=". ($qpsmtpd{TCPPort} || "25"); +$OUT .= " INSTANCES=" . ($qpsmtpd{Instances} || "40"); +$OUT .= " INSTANCES_PER_IP=" . ($qpsmtpd{InstancesPerIP} || "5"); +$OUT .= " PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin"; +$OUT .= " TCPLOCALHOST=$SystemName.$DomainName"; +} + diff --git a/root/etc/e-smith/templates/usr/lib/systemd/system/sqpsmtpd.service.d/50koozali.conf/40Service b/root/etc/e-smith/templates/usr/lib/systemd/system/sqpsmtpd.service.d/50koozali.conf/40Service new file mode 100644 index 0000000..f4405f4 --- /dev/null +++ b/root/etc/e-smith/templates/usr/lib/systemd/system/sqpsmtpd.service.d/50koozali.conf/40Service @@ -0,0 +1,14 @@ +[Service] +LimitDATA={$sqpsmtpd{Softlimit} || $qpsmtpd{Softlimit} || "150000000"} +LimitSTACK={$sqpsmtpd{Softlimit} || $qpsmtpd{Softlimit} || "150000000"} +LimitMEMLOCK={$sqpsmtpd{Softlimit} || $qpsmtpd{Softlimit} || "150000000"} +Environment= +Environment={ +$OUT = "QPSMTPD_CONFIG=/var/service/sqpsmtpd/config"; +$OUT .= " PORT=". ($sqpsmtpd{TCPPort} || "465"); +$OUT .= " INSTANCES=" . ($sqpsmtpd{Instances} || $qpsmtpd{Instances} || "40"); +$OUT .= " INSTANCES_PER_IP=" . ($sqpsmtpd{InstancesPerIP} || $qpsmtpd{InstancesPerIP} ||"5"); +$OUT .= " PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin"; +$OUT .= " TCPLOCALHOST=$SystemName.$DomainName"; +} + diff --git a/root/etc/e-smith/templates/usr/lib/systemd/system/uqpsmtpd.service.d/50koozali.conf/40Service b/root/etc/e-smith/templates/usr/lib/systemd/system/uqpsmtpd.service.d/50koozali.conf/40Service new file mode 100644 index 0000000..8ebb3c9 --- /dev/null +++ b/root/etc/e-smith/templates/usr/lib/systemd/system/uqpsmtpd.service.d/50koozali.conf/40Service @@ -0,0 +1,14 @@ +[Service] +LimitDATA={$uqpsmtpd{Softlimit} || $qpsmtpd{Softlimit} || "150000000"} +LimitSTACK={$uqpsmtpd{Softlimit} || $qpsmtpd{Softlimit} || "150000000"} +LimitMEMLOCK={$uqpsmtpd{Softlimit} || $qpsmtpd{Softlimit} || "150000000"} +Environment= +Environment={ +$OUT = "QPSMTPD_CONFIG=/var/service/uqpsmtpd/config"; +$OUT .= " PORT=". ($uqpsmtpd{TCPPort} || "587"); +$OUT .= " INSTANCES=" . ($uqpsmtpd{Instances} || $qpsmtpd{Instances} || "40"); +$OUT .= " INSTANCES_PER_IP=" . ($uqpsmtpd{InstancesPerIP} || $qpsmtpd{InstancesPerIP} ||"5"); +$OUT .= " PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin"; +$OUT .= " TCPLOCALHOST=$SystemName.$DomainName"; +} + diff --git a/root/etc/e-smith/templates/var/qmail/control/badrcptto/00setup b/root/etc/e-smith/templates/var/qmail/control/badrcptto/00setup deleted file mode 100644 index 7443a6a..0000000 --- a/root/etc/e-smith/templates/var/qmail/control/badrcptto/00setup +++ /dev/null @@ -1,9 +0,0 @@ -{ - require esmith::AccountsDB; - require esmith::DomainsDB; - - %Accounts = esmith::AccountsDB->as_hash; - %Domains = esmith::DomainsDB->as_hash; - - ""; -} diff --git a/root/etc/e-smith/templates/var/qmail/control/badrcptto/10blockVisibleInternal b/root/etc/e-smith/templates/var/qmail/control/badrcptto/10blockVisibleInternal deleted file mode 100644 index 77bf6c4..0000000 --- a/root/etc/e-smith/templates/var/qmail/control/badrcptto/10blockVisibleInternal +++ /dev/null @@ -1,16 +0,0 @@ -{ - foreach my $account ( keys %Accounts ) - { - next unless ( exists $Accounts{$account}{Visible} - and $Accounts{$account}{Visible} eq "internal" ); - - $OUT .= "$account\n"; - $OUT .= "$account\@$DomainName\n"; - - foreach my $domain ( keys %Domains ) - { - next unless $Domains{$domain}{type} eq "domain"; - $OUT .= "$account\@$domain\n"; - } - } -} diff --git a/root/etc/e-smith/templates/var/qmail/control/rcpthosts/10standard b/root/etc/e-smith/templates/var/qmail/control/rcpthosts/10standard deleted file mode 100644 index 4121442..0000000 --- a/root/etc/e-smith/templates/var/qmail/control/rcpthosts/10standard +++ /dev/null @@ -1,14 +0,0 @@ -{ - use esmith::DomainsDB; - - my $ddb = esmith::DomainsDB->open_ro or die "Couldn't open DomainsDB\n"; - - my @rcpt_hosts = ( "$SystemName.$DomainName" ); - - foreach my $domain ( $ddb->get_all_by_prop( type => "domain" ) ) - { - push @rcpt_hosts, $domain->key; - } - - $OUT = join "\n", @rcpt_hosts; -} diff --git a/root/etc/e-smith/templates/var/qmail/control/rcpthosts/12LiteralIP b/root/etc/e-smith/templates/var/qmail/control/rcpthosts/12LiteralIP deleted file mode 100644 index e55b368..0000000 --- a/root/etc/e-smith/templates/var/qmail/control/rcpthosts/12LiteralIP +++ /dev/null @@ -1,5 +0,0 @@ -{ - return "" unless (defined $ExternalIP); - - return "[$ExternalIP]"; -} diff --git a/root/etc/e-smith/templates/var/qmail/control/badmailfrom/10sample b/root/etc/e-smith/templates/var/service/qpsmtpd/config/badmailfrom/10sample similarity index 100% rename from root/etc/e-smith/templates/var/qmail/control/badmailfrom/10sample rename to root/etc/e-smith/templates/var/service/qpsmtpd/config/badmailfrom/10sample diff --git a/root/etc/e-smith/templates/var/service/qpsmtpd/config/badrcptto_ext/10InternalPeudonymes b/root/etc/e-smith/templates/var/service/qpsmtpd/config/badrcptto_ext/10InternalPeudonymes index 42961e3..0f7ef2a 100644 --- a/root/etc/e-smith/templates/var/service/qpsmtpd/config/badrcptto_ext/10InternalPeudonymes +++ b/root/etc/e-smith/templates/var/service/qpsmtpd/config/badrcptto_ext/10InternalPeudonymes @@ -1,6 +1,6 @@ { $OUT .= ''; - foreach my $alias ( $a->users, $a->groups, $a->pseudonyms ){ + foreach my $alias ( $a->users, $a->groups, $a->pseudonyms, $a->get_all_by_prop(type =>"system") ){ next unless ( $alias->prop('Visible') || '') =~ m/^(internal|none)$/i; $OUT .= $alias->key . "\n" and next if $alias->key =~ m/@/; diff --git a/root/etc/e-smith/templates/var/service/qpsmtpd/config/tls_protocols/10protocols b/root/etc/e-smith/templates/var/service/qpsmtpd/config/tls_protocols/10protocols index a96db43..37f611c 100644 --- a/root/etc/e-smith/templates/var/service/qpsmtpd/config/tls_protocols/10protocols +++ b/root/etc/e-smith/templates/var/service/qpsmtpd/config/tls_protocols/10protocols @@ -5,4 +5,5 @@ $OUT .= ':!SSLv3' unless ($qpsmtpd{SSLv3} || 'disabled') eq 'enabled'; $OUT .= ':!TLSv1' unless ($qpsmtpd{TLSv1} || 'enabled') eq 'enabled'; $OUT .= ':!TLSv1.1' unless ($qpsmtpd{TLSv1.1} || 'enabled') eq 'enabled'; $OUT .= ':!TLSv1.2' unless ($qpsmtpd{TLSv1.2} || 'enabled') eq 'enabled'; +$OUT .= ':!TLSv1.3' unless ($qpsmtpd{TLSv1.3} || 'enabled') eq 'enabled'; } diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_before_auth/10Auth b/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_before_auth/10Auth new file mode 100644 index 0000000..75d5c72 --- /dev/null +++ b/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_before_auth/10Auth @@ -0,0 +1,2 @@ +# The next line should be set to 0 if you want to offer AUTH without TLS +1 diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_ciphers/10ciphers b/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_ciphers/10ciphers new file mode 100644 index 0000000..3d369a5 --- /dev/null +++ b/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_ciphers/10ciphers @@ -0,0 +1,5 @@ +{ + # When updating CipherSuite both e-smith-apache and smeserver-qpsmtpd templates should be updated. + return $sqpsmtpd{tlsCipher} || $uqpsmtpd{tlsCipher} ||$modSSL{CipherSuite} || 'ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:HIGH@STRENGTH:!SSLv2:!ADH:!aNULL:!MD5:!RC4'; +} + diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_protocols/10protocols b/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_protocols/10protocols new file mode 100644 index 0000000..df3ff2b --- /dev/null +++ b/root/etc/e-smith/templates/var/service/sqpsmtpd/config/tls_protocols/10protocols @@ -0,0 +1,9 @@ +{ +$OUT .= 'SSLv23'; +$OUT .= ':!SSLv2' unless ($sqpsmtpd{SSLv2} || 'disabled') eq 'enabled'; +$OUT .= ':!SSLv3' unless ($sqpsmtpd{SSLv3} || 'disabled') eq 'enabled'; +$OUT .= ':!TLSv1' unless ($sqpsmtpd{TLSv1} || 'disabled') eq 'enabled'; +$OUT .= ':!TLSv1.1' unless ($sqpsmtpd{TLSv1.1} || 'disabled') eq 'enabled'; +$OUT .= ':!TLSv1.2' unless ($sqpsmtpd{TLSv1.2} || 'enabled') eq 'enabled'; +$OUT .= ':!TLSv1.3' unless ($sqpsmtpd{TLSv1.3} || 'enabled') eq 'enabled'; +} diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/00preamble b/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/00preamble deleted file mode 100644 index aa968d0..0000000 --- a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/00preamble +++ /dev/null @@ -1,4 +0,0 @@ -# This templated file is sourced by the sqpsmtpd run -# file. Shell variables can be set here for use by the run -# script, or environment variables can be exported for use -# by sqpsmtpd. diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/INSTANCES b/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/INSTANCES deleted file mode 100644 index 55d219e..0000000 --- a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/INSTANCES +++ /dev/null @@ -1,3 +0,0 @@ -{ - return "INSTANCES=" . ($sqpsmtpd{Instances} || $qpsmtpd{Instances} || "10"); -} diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/INSTANCES_PER_IP b/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/INSTANCES_PER_IP deleted file mode 100644 index 7b121e9..0000000 --- a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/INSTANCES_PER_IP +++ /dev/null @@ -1,4 +0,0 @@ -{ - return "INSTANCES_PER_IP=" . - ($sqpsmtpd{InstancesPerIP} || $qpsmtpd{InstancesPerIP} || "5"); -} diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/PATH b/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/PATH deleted file mode 100644 index f3a2e72..0000000 --- a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/PATH +++ /dev/null @@ -1 +0,0 @@ -export PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/PORT b/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/PORT deleted file mode 100644 index 21889c8..0000000 --- a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/PORT +++ /dev/null @@ -1,3 +0,0 @@ -{ - return "export PORT=" . (${sqpsmtpd}{TCPPort} || "465"); -} diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/SOFTLIMIT b/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/SOFTLIMIT deleted file mode 100644 index 650525f..0000000 --- a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/SOFTLIMIT +++ /dev/null @@ -1,3 +0,0 @@ -{ - return "SOFTLIMIT=" . ($sqpsmtpd{Softlimit} || $qpsmtpd{Softlimit} || "50000000"); -} diff --git a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/TCPLOCALHOST b/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/TCPLOCALHOST deleted file mode 100644 index 98b3559..0000000 --- a/root/etc/e-smith/templates/var/service/sqpsmtpd/runenv/TCPLOCALHOST +++ /dev/null @@ -1,3 +0,0 @@ -{ - return "export TCPLOCALHOST=$SystemName.$DomainName"; -} diff --git a/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_before_auth/10Auth b/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_before_auth/10Auth new file mode 100644 index 0000000..75d5c72 --- /dev/null +++ b/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_before_auth/10Auth @@ -0,0 +1,2 @@ +# The next line should be set to 0 if you want to offer AUTH without TLS +1 diff --git a/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_ciphers/10ciphers b/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_ciphers/10ciphers new file mode 100644 index 0000000..5f182b9 --- /dev/null +++ b/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_ciphers/10ciphers @@ -0,0 +1,5 @@ +{ + # When updating CipherSuite both e-smith-apache and smeserver-qpsmtpd templates should be updated. + return $uqpsmtpd{tlsCipher} || $modSSL{CipherSuite} || 'ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:HIGH@STRENGTH:!SSLv2:!ADH:!aNULL:!MD5:!RC4'; +} + diff --git a/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_protocols/10protocols b/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_protocols/10protocols new file mode 100644 index 0000000..110f5c0 --- /dev/null +++ b/root/etc/e-smith/templates/var/service/uqpsmtpd/config/tls_protocols/10protocols @@ -0,0 +1,9 @@ +{ +$OUT .= 'SSLv23'; +$OUT .= ':!SSLv2' unless ($uqpsmtpd{SSLv2} || 'disabled') eq 'enabled'; +$OUT .= ':!SSLv3' unless ($uqpsmtpd{SSLv3} || 'disabled') eq 'enabled'; +$OUT .= ':!TLSv1' unless ($uqpsmtpd{TLSv1} || 'disabled') eq 'enabled'; +$OUT .= ':!TLSv1.1' unless ($uqpsmtpd{TLSv1.1} || 'disabled') eq 'enabled'; +$OUT .= ':!TLSv1.2' unless ($uqpsmtpd{TLSv1.2} || 'enabled') eq 'enabled'; +$OUT .= ':!TLSv1.3' unless ($uqpsmtpd{TLSv1.3} || 'enabled') eq 'enabled'; +} diff --git a/root/etc/logrotate.d/qpsmtpd b/root/etc/logrotate.d/qpsmtpd new file mode 100644 index 0000000..c66ae67 --- /dev/null +++ b/root/etc/logrotate.d/qpsmtpd @@ -0,0 +1,17 @@ +/var/log/qpsmtpd/qpsmtpd.log +/var/log/sqpsmtpd/sqpsmtpd.log +/var/log/uqpsmtpd/uqpsmtpd.log{ + weekly + rotate 4 + missingok + notifempty + compress + delaycompress + sharedscripts + su root root + create 600 root root + postrotate + /usr/bin/systemctl try-restart qpsmtpd.service sqpsmtpd.service uqpsmtpd.service >/dev/null 2>&1 || true + endscript +} + diff --git a/root/var/service/qpsmtpd/env/.gitignore b/root/home/e-smith/dkim_keys/default/.gitignore similarity index 100% rename from root/var/service/qpsmtpd/env/.gitignore rename to root/home/e-smith/dkim_keys/default/.gitignore diff --git a/root/var/service/qpsmtpd/run b/root/sbin/e-smith/systemd/qpsmtpd-init similarity index 72% rename from root/var/service/qpsmtpd/run rename to root/sbin/e-smith/systemd/qpsmtpd-init index a260223..3a3b469 100755 --- a/root/var/service/qpsmtpd/run +++ b/root/sbin/e-smith/systemd/qpsmtpd-init @@ -2,6 +2,7 @@ #---------------------------------------------------------------------- # copyright (C) 1999-2005 Mitel Networks Corporation # Copyright (C) 2005-2006 Gordon Rowell +# Copyright (C) 2013-2024 SME Server Koozali foundation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,14 +18,13 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #---------------------------------------------------------------------- +ServiceName=$1 -exec 2>&1 +export QPSMTPD_CONFIG=/var/service/$ServiceName/config -[ -f ./runenv ] && . ./runenv +/sbin/e-smith/systemd/qpsmtpd-tcpsvd $ServiceName -export QPSMTPD_CONFIG=/var/service/qpsmtpd/config - -./control/1 +#cleanup pre SME10 [ -e /var/service/qpsmtpd/config/databytes ] && \ rm -f /var/service/qpsmtpd/config/databytes [ -e /var/service/qpsmtpd/config/badrcptto_patterns ] && \ @@ -51,23 +51,3 @@ export QPSMTPD_CONFIG=/var/service/qpsmtpd/config chmod 640 /var/lib/qpsmtpd/dmarc/reports.sqlite ) -exec /usr/bin/softlimit -d ${SOFTLIMIT:-50000000} -s ${SOFTLIMIT:-50000000} -l ${SOFTLIMIT:-50000000} \ - /usr/bin/qpsmtpd-forkserver \ - -u qpsmtpd \ - -l 0.0.0.0 \ - -p ${PORT:-25} \ - -c ${INSTANCES:-40} \ - -m ${INSTANCES_PER_IP:-5} - -#sub usage { -# print <<"EOT"; -#usage: qpsmtpd-forkserver [ options ] -# -l, --listen-address addr : listen on a specific address; default 0.0.0.0 -# -p, --port P : listen on a specific port; default 2525 -# -c, --limit-connections N : limit concurrent connections to N; default 15 -# -u, --user U : run as a particular user (defualt 'smtpd') -# -m, --max-from-ip M : limit connections from a single IP; default 5 -#EOT -# exit 0; -#} -# diff --git a/root/var/service/qpsmtpd/control/1 b/root/sbin/e-smith/systemd/qpsmtpd-tcpsvd old mode 100644 new mode 100755 similarity index 82% rename from root/var/service/qpsmtpd/control/1 rename to root/sbin/e-smith/systemd/qpsmtpd-tcpsvd index 7226b4b..a053e62 --- a/root/var/service/qpsmtpd/control/1 +++ b/root/sbin/e-smith/systemd/qpsmtpd-tcpsvd @@ -2,6 +2,7 @@ #---------------------------------------------------------------------- # copyright (C) 2005 Mitel Networks Corporation # Copyright (C) 2006 Gordon Rowell +# Copyright (C) 2024 Koozali Foundation Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,8 +20,8 @@ #---------------------------------------------------------------------- use esmith::tcpsvd; - -esmith::tcpsvd::configure_peers('qpsmtpd'); -esmith::tcpsvd::configure_peers('qpsmtpd', '/var/service/qpsmtpd/config/peers'); +my $ServiceName = shift || "qpsmtpd"; +esmith::tcpsvd::configure_peers($ServiceName); +esmith::tcpsvd::configure_peers($ServiceName, "/var/service/$ServiceName/config/peers"); exit(0); diff --git a/root/service/qpsmtpd b/root/service/qpsmtpd deleted file mode 120000 index 7c8b520..0000000 --- a/root/service/qpsmtpd +++ /dev/null @@ -1 +0,0 @@ -/var/service/qpsmtpd \ No newline at end of file diff --git a/root/service/sqpsmtpd b/root/service/sqpsmtpd deleted file mode 120000 index 9c32df3..0000000 --- a/root/service/sqpsmtpd +++ /dev/null @@ -1 +0,0 @@ -/var/service/sqpsmtpd \ No newline at end of file diff --git a/root/usr/lib/systemd/system/qpsmtpd.service b/root/usr/lib/systemd/system/qpsmtpd.service index f79bb62..2534466 100644 --- a/root/usr/lib/systemd/system/qpsmtpd.service +++ b/root/usr/lib/systemd/system/qpsmtpd.service @@ -1,16 +1,26 @@ [Unit] Description=qpsmtpd -After=network.target -Conflicts=proqpsmtpdd.service -Requires=runit.service +After=network.target network-online.target [Service] -Type=oneshot +Type=simple +LimitDATA=150000000 +LimitSTACK=150000000 +LimitMEMLOCK=150000000 +Environment=PORT=25 INSTANCES=40 INSTANCES_PER_IP=5 QPSMTPD_CONFIG=/var/service/qpsmtpd/config PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin TCPLOCALHOST=me +WorkingDirectory=/var/service/qpsmtpd/ + ExecStartPre=/sbin/e-smith/service-status qpsmtpd -ExecStart=/usr/bin/sv u /service/qpsmtpd -ExecStop=/usr/bin/sv stop /service/qpsmtpd -ExecReload=/usr/bin/sv h /service/qpsmtpd -RemainAfterExit=yes +ExecStartPre=/sbin/e-smith/systemd/qpsmtpd-init %N +ExecStart=/usr/bin/qpsmtpd-forkserver \ + -u qpsmtpd \ + -l 0.0.0.0 \ + -p $PORT \ + -c $INSTANCES \ + -m $INSTANCES_PER_IP +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +RestartSec=20s [Install] WantedBy=sme-server.target diff --git a/root/var/service/qpsmtpd/log/supervise/.gitignore b/root/usr/lib/systemd/system/qpsmtpd.service.d/.gitignore similarity index 100% rename from root/var/service/qpsmtpd/log/supervise/.gitignore rename to root/usr/lib/systemd/system/qpsmtpd.service.d/.gitignore diff --git a/root/usr/lib/systemd/system/sqpsmtpd.service b/root/usr/lib/systemd/system/sqpsmtpd.service index 03a2167..edc5654 100644 --- a/root/usr/lib/systemd/system/sqpsmtpd.service +++ b/root/usr/lib/systemd/system/sqpsmtpd.service @@ -1,16 +1,26 @@ [Unit] -Description=sqpsmtpd -After=network.target -Conflicts=prosqpsmtpdd.service -Requires=runit.service +Description=qpsmtpd +After=network.target network-online.target qpsmtpd.service [Service] -Type=oneshot -ExecStartPre=/sbin/e-smith/service-status sqpsmtpd -ExecStart=/usr/bin/sv u /service/sqpsmtpd -ExecStop=/usr/bin/sv stop /service/sqpsmtpd -ExecReload=/usr/bin/sv h /service/sqpsmtpd -RemainAfterExit=yes +Type=simple +LimitDATA=150000000 +LimitSTACK=150000000 +LimitMEMLOCK=150000000 +Environment=PORT=465 INSTANCES=40 INSTANCES_PER_IP=5 QPSMTPD_CONFIG=/var/service/sqpsmtpd/config PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin TCPLOCALHOST=me +WorkingDirectory=/var/service/qpsmtpd/ + +ExecStartPre=/sbin/e-smith/service-status qpsmtpd +ExecStartPre=/sbin/e-smith/systemd/qpsmtpd-init %N +ExecStart=/usr/bin/qpsmtpd-forkserver \ + -u qpsmtpd \ + -l 0.0.0.0 \ + -p $PORT \ + -c $INSTANCES \ + -m $INSTANCES_PER_IP +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +RestartSec=20s [Install] WantedBy=sme-server.target diff --git a/root/var/service/qpsmtpd/supervise/.gitignore b/root/usr/lib/systemd/system/sqpsmtpd.service.d/.gitignore similarity index 100% rename from root/var/service/qpsmtpd/supervise/.gitignore rename to root/usr/lib/systemd/system/sqpsmtpd.service.d/.gitignore diff --git a/root/usr/lib/systemd/system/uqpsmtpd.service b/root/usr/lib/systemd/system/uqpsmtpd.service new file mode 100644 index 0000000..6522eb9 --- /dev/null +++ b/root/usr/lib/systemd/system/uqpsmtpd.service @@ -0,0 +1,26 @@ +[Unit] +Description=qpsmtpd on submission port +After=network.target network-online.target qpsmtpd.service + +[Service] +Type=simple +LimitDATA=150000000 +LimitSTACK=150000000 +LimitMEMLOCK=150000000 +Environment=PORT=587 INSTANCES=40 INSTANCES_PER_IP=5 QPSMTPD_CONFIG=/var/service/uqpsmtpd/config PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin TCPLOCALHOST=me +WorkingDirectory=/var/service/qpsmtpd/ + +ExecStartPre=/sbin/e-smith/service-status uqpsmtpd +ExecStartPre=/sbin/e-smith/systemd/qpsmtpd-init %N +ExecStart=/usr/bin/qpsmtpd-forkserver \ + -u qpsmtpd \ + -l 0.0.0.0 \ + -p $PORT \ + -c $INSTANCES \ + -m $INSTANCES_PER_IP +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +RestartSec=20s + +[Install] +WantedBy=sme-server.target diff --git a/root/var/service/sqpsmtpd/log/supervise/.gitignore b/root/usr/lib/systemd/system/uqpsmtpd.service.d/.gitignore similarity index 100% rename from root/var/service/sqpsmtpd/log/supervise/.gitignore rename to root/usr/lib/systemd/system/uqpsmtpd.service.d/.gitignore diff --git a/root/var/service/sqpsmtpd/supervise/.gitignore b/root/var/lib/qpsmtpd/dmarc/.gitignore similarity index 100% rename from root/var/service/sqpsmtpd/supervise/.gitignore rename to root/var/lib/qpsmtpd/dmarc/.gitignore diff --git a/root/var/service/qpsmtpd/down b/root/var/lib/qpsmtpd/karma/.gitignore similarity index 100% rename from root/var/service/qpsmtpd/down rename to root/var/lib/qpsmtpd/karma/.gitignore diff --git a/root/var/service/sqpsmtpd/down b/root/var/service/qpsmtpd/config/dkim/.gitignore similarity index 100% rename from root/var/service/sqpsmtpd/down rename to root/var/service/qpsmtpd/config/dkim/.gitignore diff --git a/root/var/service/qpsmtpd/log/run b/root/var/service/qpsmtpd/log/run deleted file mode 100755 index 1ab7947..0000000 --- a/root/var/service/qpsmtpd/log/run +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -#---------------------------------------------------------------------- -# copyright (C) 2001 e-smith, inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Technical support for this program is available from e-smith, inc. -# Please visit our web site www.e-smith.com for details. -#---------------------------------------------------------------------- - -status=`/sbin/e-smith/config getprop qpsmtpd qplogsumm` -num=`/sbin/e-smith/config getprop qpsmtpd KeepLogFiles` - -if [ -z $status ]; then - status="disabled" -fi - -if [ $status = "enabled" ]; then - exec \ - /usr/bin/setuidgid smelog \ - /usr/bin/multilog t s5000000 \ - n${num:-10} \ - !/usr/local/bin/qplogsumm.pl /var/log/qpsmtpd -else - exec \ - /usr/bin/setuidgid smelog \ - /usr/bin/multilog t s5000000 \ - n${num:-10} \ - /var/log/qpsmtpd -fi - diff --git a/root/var/service/sqpsmtpd/config b/root/var/service/sqpsmtpd/config deleted file mode 120000 index d392d48..0000000 --- a/root/var/service/sqpsmtpd/config +++ /dev/null @@ -1 +0,0 @@ -../qpsmtpd/config \ No newline at end of file diff --git a/root/var/service/sqpsmtpd/config/dkim b/root/var/service/sqpsmtpd/config/dkim new file mode 120000 index 0000000..0800441 --- /dev/null +++ b/root/var/service/sqpsmtpd/config/dkim @@ -0,0 +1 @@ +../../qpsmtpd/config/dkim/ \ No newline at end of file diff --git a/root/var/service/sqpsmtpd/config/peers/.gitignore b/root/var/service/sqpsmtpd/config/peers/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/root/var/service/sqpsmtpd/config/plugins b/root/var/service/sqpsmtpd/config/plugins new file mode 100644 index 0000000..7cf773d --- /dev/null +++ b/root/var/service/sqpsmtpd/config/plugins @@ -0,0 +1,8 @@ +#------------------------------------------------------------ +# !!DO NOT MODIFY THIS FILE!! +# +# Plugins are now loaded by the peers plugin from config/peers/* +#------------------------------------------------------------ +hosts_allow +peers +tls ssl/cert.pem ssl/cert.pem ssl/cert.pem ssl/dhparam.pem diff --git a/root/var/service/sqpsmtpd/config/spool_perms b/root/var/service/sqpsmtpd/config/spool_perms new file mode 100644 index 0000000..72fee26 --- /dev/null +++ b/root/var/service/sqpsmtpd/config/spool_perms @@ -0,0 +1 @@ +2750 diff --git a/root/var/service/sqpsmtpd/log/run b/root/var/service/sqpsmtpd/log/run deleted file mode 100755 index a591840..0000000 --- a/root/var/service/sqpsmtpd/log/run +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -#---------------------------------------------------------------------- -# copyright (C) 2001 e-smith, inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# Technical support for this program is available from e-smith, inc. -# Please visit our web site www.e-smith.com for details. -#---------------------------------------------------------------------- - -num=`/sbin/e-smith/config getprop sqpsmtpd KeepLogFiles` - -exec \ - /usr/bin/setuidgid smelog \ - /usr/bin/multilog t s5000000 \ - n${num:-10} \ - /var/log/sqpsmtpd diff --git a/root/var/service/sqpsmtpd/run b/root/var/service/sqpsmtpd/run deleted file mode 100755 index 56a80d5..0000000 --- a/root/var/service/sqpsmtpd/run +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -#---------------------------------------------------------------------- -# copyright (C) 1999-2005 Mitel Networks Corporation -# Copyright (C) 2005-2006 Gordon Rowell -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#---------------------------------------------------------------------- - -exec 2>&1 - -[ -f ./runenv ] && . ./runenv - -export QPSMTPD_CONFIG=/var/service/qpsmtpd/config - -../qpsmtpd/control/1 - -exec /usr/bin/softlimit -d ${SOFTLIMIT:-50000000} -s ${SOFTLIMIT:-50000000} -l ${SOFTLIMIT:-50000000} \ - /usr/bin/qpsmtpd-forkserver \ - -u qpsmtpd \ - -l 0.0.0.0 \ - -p ${PORT:-465} \ - -c ${INSTANCES:-40} \ - -m ${INSTANCES_PER_IP:-5} - -#sub usage { -# print <<"EOT"; -#usage: qpsmtpd-forkserver [ options ] -# -l, --listen-address addr : listen on a specific address; default 0.0.0.0 -# -p, --port P : listen on a specific port; default 2525 -# -c, --limit-connections N : limit concurrent connections to N; default 15 -# -u, --user U : run as a particular user (defualt 'smtpd') -# -m, --max-from-ip M : limit connections from a single IP; default 5 -#EOT -# exit 0; -#} -# diff --git a/root/var/service/uqpsmtpd/config/dkim b/root/var/service/uqpsmtpd/config/dkim new file mode 120000 index 0000000..0800441 --- /dev/null +++ b/root/var/service/uqpsmtpd/config/dkim @@ -0,0 +1 @@ +../../qpsmtpd/config/dkim/ \ No newline at end of file diff --git a/root/var/service/uqpsmtpd/config/peers/.gitignore b/root/var/service/uqpsmtpd/config/peers/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/root/var/service/uqpsmtpd/config/plugins b/root/var/service/uqpsmtpd/config/plugins new file mode 100644 index 0000000..7cf773d --- /dev/null +++ b/root/var/service/uqpsmtpd/config/plugins @@ -0,0 +1,8 @@ +#------------------------------------------------------------ +# !!DO NOT MODIFY THIS FILE!! +# +# Plugins are now loaded by the peers plugin from config/peers/* +#------------------------------------------------------------ +hosts_allow +peers +tls ssl/cert.pem ssl/cert.pem ssl/cert.pem ssl/dhparam.pem diff --git a/root/var/service/uqpsmtpd/config/spool_perms b/root/var/service/uqpsmtpd/config/spool_perms new file mode 100644 index 0000000..72fee26 --- /dev/null +++ b/root/var/service/uqpsmtpd/config/spool_perms @@ -0,0 +1 @@ +2750 diff --git a/root/var/service/uqpsmtpd/ssl b/root/var/service/uqpsmtpd/ssl new file mode 120000 index 0000000..f7be2a8 --- /dev/null +++ b/root/var/service/uqpsmtpd/ssl @@ -0,0 +1 @@ +../qpsmtpd/ssl/ \ No newline at end of file diff --git a/smeserver-qpsmtpd.spec b/smeserver-qpsmtpd.spec index 349a0ef..4c58e13 100644 --- a/smeserver-qpsmtpd.spec +++ b/smeserver-qpsmtpd.spec @@ -4,7 +4,7 @@ Summary: SME Server qpsmtpd module %define name smeserver-qpsmtpd Name: %{name} %define version 11.0.0 -%define release 7 +%define release 8 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -47,6 +47,18 @@ AutoReqProv: no SME Server qpsmtpd smtpd module %changelog +* Thu Apr 25 2024 Jean-Philippe Pialasse 11.0.0-8.sme +- add listening deamon on submission port 587 [SME: 6510] +- move qpsmtpd daemons to full systemd supervision [SME: 12615] +- separate configuration for the 3 qpsmtpd daemons [SME: 12451] + increase default TLS version on u/sqpsmtpd as auth is required +- increase Softlimit to 150M [SME: 12638] +- remove old qmail templates [SME: 9492] + template for /var/qmail/control/{badrcptto,badmailfrom,rcpthosts} + also import template for config/badmailfrom from smeserver-wbl +TODO organize peers content for u and s qpsmtpd +TODO check if more config modules needs per service config + * Sat Apr 13 2024 Jean-Philippe Pialasse 11.0.0-7.sme - move post-transaction-actions script [SME: 12535] - restart qpsmtpd on major perl module updates [SME: 12434] @@ -943,19 +955,22 @@ SME Server qpsmtpd smtpd module %prep %setup -rm -rf root/usr/lib/systemd/system-preset - %build perl createlinks -mkdir -p root/var/lib/qpsmtpd/karma -mkdir -p root/var/lib/qpsmtpd/dmarc -mkdir -p root/home/e-smith/dkim_keys/default -mkdir -p root/var/service/qpsmtpd/config/dkim -PEERS_CONFIG=root/etc/e-smith/templates/var/service/qpsmtpd/config/peers +DAEMONS=" +qpsmtpd +sqpsmtpd +uqpsmtpd +" + +for deamon in $DAEMONS +do +PEERS_CONFIG="root/etc/e-smith/templates/var/service/$daemon/config/peers" mkdir -p $PEERS_CONFIG/0 mkdir -p $PEERS_CONFIG/local +done DISABLE_LOCAL=" 09karma @@ -1005,27 +1020,13 @@ rm -rf $RPM_BUILD_ROOT rm -f %{name}-%{version}-%{release}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --dir /var/service/qpsmtpd "attr(1755,root,root)" \ - --file /var/service/qpsmtpd/down "attr(0644,root,root)" \ - --file /var/service/qpsmtpd/run "attr(0755,root,root)" \ - --file /var/service/qpsmtpd/control/1 "attr(0755,root,root)" \ - --dir /var/service/qpsmtpd/supervise "attr(0700,root,root)" \ - --dir /var/service/qpsmtpd/env "attr(0755,root,root)" \ - --file /var/service/qpsmtpd/env/PATH "attr(0644,root,root)" \ - --dir /var/service/qpsmtpd/log "attr(1755,root,root)" \ - --file /var/service/qpsmtpd/log/run "attr(0755,root,root)" \ - --dir /var/service/qpsmtpd/log/supervise "attr(0700,root,root)" \ - --dir /var/log/qpsmtpd "attr(2750,smelog,smelog)" \ + --dir /var/log/qpsmtpd "attr(2750,root,root)" \ \ --dir /var/service/sqpsmtpd "attr(1755,root,root)" \ - --file /var/service/sqpsmtpd/down "attr(0644,root,root)" \ - --file /var/service/sqpsmtpd/run "attr(0755,root,root)" \ - --dir /var/service/sqpsmtpd/supervise "attr(0700,root,root)" \ - --dir /var/service/sqpsmtpd/env "attr(0755,root,root)" \ - --file /var/service/sqpsmtpd/env/PATH "attr(0644,root,root)" \ - --dir /var/service/sqpsmtpd/log "attr(1755,root,root)" \ - --file /var/service/sqpsmtpd/log/run "attr(0755,root,root)" \ - --dir /var/service/sqpsmtpd/log/supervise "attr(0700,root,root)" \ - --dir /var/log/sqpsmtpd "attr(2750,smelog,smelog)" \ + --dir /var/log/sqpsmtpd "attr(2750,root,root)" \ + \ + --dir /var/service/uqpsmtpd "attr(1755,root,root)" \ + --dir /var/log/uqpsmtpd "attr(2750,root,root)" \ \ --file /var/service/sqpsmtpd/sqpsmtpd "attr(0755,root,root)" \ --dir /var/spool/qpsmtpd "attr(2750,qpsmtpd,clamscan)" \ @@ -1035,6 +1036,8 @@ rm -f %{name}-%{version}-%{release}-filelist --dir /var/service/qpsmtpd/config/dkim "attr(2750,qpsmtpd,qpsmtpd)" \ \ --file /usr/local/bin/qplogsumm.pl "attr(0755,root,root)" \ + --file /sbin/e-smith/systemd/qpsmtpd-tcpsvd "attr(0554,root,root)" \ + --file /sbin/e-smith/systemd/qpsmtpd-init "attr(0554,root,root)" \ > %{name}-%{version}-%{release}-filelist %pre @@ -1042,6 +1045,22 @@ rm -f %{name}-%{version}-%{release}-filelist 'qpsmtpd system user' /var/service/qpsmtpd /bin/false /usr/sbin/groupadd -r clamav 2>/dev/null || : +# stop and remove runit services +# ease the transition between runit and systemd +if [ $1 -gt 1 ] ; then + if [ -e /var/service/qpsmtpd/run ] ; then + /usr/bin/sv d qpsmtpd + /usr/bin/sv d qpsmtpd/log + fi +fi +if [ $1 -gt 1 ] ; then + if [ -e /var/service/sqpsmtpd/run ] ; then + /usr/bin/sv d sqpsmtpd + /usr/bin/sv d sqpsmtpd/log + fi +fi + + TEMPLATES_DIR=/etc/e-smith/templates/var/service/qpsmtpd/config/peers [ -L $TEMPLATES_DIR/0 ] && rm -f $TEMPLATES_DIR/0