diff -Nur e-smith-pop3-2.6.0/createlinks e-smith-pop3-2.6.0_bz10271/createlinks --- e-smith-pop3-2.6.0/createlinks 2016-02-05 23:06:08.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/createlinks 2017-05-04 12:03:22.400665877 +0200 @@ -5,7 +5,7 @@ foreach my $event (qw( bootstrap-console-save network-delete network-create email-update)) { - foreach (qw(pop3/peers/0 pop3/peers/local pop3s/peers/0 pop3s/peers/local pop3s/stunnel.conf)) + foreach (qw(pop3/peers/0 pop3/peers/local pop3s/peers/0 pop3s/peers/local)) { templates2events("/var/service/$_", $event); } @@ -13,9 +13,10 @@ templates2events("/etc/pam.d/pop3", "console-save"); -foreach my $file (qw(/etc/pam.d/pop3 /var/service/pop3/env/MEMLIMIT /var/service/pop3s/env/MEMLIMIT)) +foreach my $file (qw(/etc/pam.d/pop3 /var/service/pop3/runenv /var/service/pop3s/runenv /var/service/pop3s/stunnel.conf)) { templates2events($file, "bootstrap-console-save"); + templates2events($file, "email-update"); } foreach my $event (qw(network-delete network-create email-update)) diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/env/MEMLIMIT e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/env/MEMLIMIT --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/env/MEMLIMIT 2013-02-07 23:09:04.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/env/MEMLIMIT 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -{ -# memory limit to catch any memory leak before it kills the system -my $MIN_MEMORY_LIMIT = 40000000; - -# The MIN_MEMORY_LIMIT is returned unless the DB variable is defined and greater than MIN_MEMORY_LIMIT -my $limit = $pop3{MemLimit} || $MIN_MEMORY_LIMIT; -$limit = $MIN_MEMORY_LIMIT if $limit < $MIN_MEMORY_LIMIT; -$OUT = "$limit"; -} diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/10Fqdn e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/10Fqdn --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/10Fqdn 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/10Fqdn 2017-05-04 11:46:02.005805454 +0200 @@ -0,0 +1 @@ +FQDN={ $SystemName . '.' . $DomainName } diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/15Instances e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/15Instances --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/15Instances 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/15Instances 2017-05-04 11:52:48.842750449 +0200 @@ -0,0 +1,2 @@ +PER_IP_INSTANCES={ $pop3{ConcurrencyLimitPerIP} || '4' } +CONCURRENCYREMOTE={ $pop3{ConcurrencyLimit} || '40' } diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/20Mem e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/20Mem --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/20Mem 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/20Mem 2017-05-04 11:54:53.631733688 +0200 @@ -0,0 +1,9 @@ +{ +# memory limit to catch any memory leak before it kills the system +my $MIN_MEMORY_LIMIT = 40000000; + +# The MIN_MEMORY_LIMIT is returned unless the DB variable is defined and greater than MIN_MEMORY_LIMIT +my $limit = $pop3{MemLimit} || $MIN_MEMORY_LIMIT; +$limit = $MIN_MEMORY_LIMIT if $limit < $MIN_MEMORY_LIMIT; +$OUT = "MEM=$limit"; +} diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/25Listen e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/25Listen --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3/runenv/25Listen 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3/runenv/25Listen 2017-05-04 11:56:51.841717860 +0200 @@ -0,0 +1,2 @@ +LISTENIP={ $pop3{ListenIP} || '0' } +PORT={ $pop3{TCPPort} || '110' } diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/env/MEMLIMIT e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/env/MEMLIMIT --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/env/MEMLIMIT 2016-02-05 23:06:07.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/env/MEMLIMIT 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -{ -# memory limit to catch any memory leak before it kills the system -my $MIN_MEMORY_LIMIT = 80000000; - -# The MIN_MEMORY_LIMIT is returned unless the DB variable is defined and greater than MIN_MEMORY_LIMIT -my $limit = $pop3s{MemLimit} || $MIN_MEMORY_LIMIT; -$limit = $MIN_MEMORY_LIMIT if $limit < $MIN_MEMORY_LIMIT; -$OUT = "$limit"; -} diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/10Fqdn e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/10Fqdn --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/10Fqdn 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/10Fqdn 2017-05-04 11:46:02.005805454 +0200 @@ -0,0 +1 @@ +FQDN={ $SystemName . '.' . $DomainName } diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/15Instances e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/15Instances --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/15Instances 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/15Instances 2017-05-04 11:59:57.298693121 +0200 @@ -0,0 +1,2 @@ +PER_IP_INSTANCES={ $pop3s{ConcurrencyLimitPerIP} || '4' } +CONCURRENCYREMOTE={ $pop3s{ConcurrencyLimit} || '40' } diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/20Mem e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/20Mem --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/20Mem 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/20Mem 2017-05-04 12:00:29.472688838 +0200 @@ -0,0 +1,9 @@ +{ +# memory limit to catch any memory leak before it kills the system +my $MIN_MEMORY_LIMIT = 80000000; + +# The MIN_MEMORY_LIMIT is returned unless the DB variable is defined and greater than MIN_MEMORY_LIMIT +my $limit = $pop3s{MemLimit} || $MIN_MEMORY_LIMIT; +$limit = $MIN_MEMORY_LIMIT if $limit < $MIN_MEMORY_LIMIT; +$OUT = "MEM=$limit"; +} diff -Nur e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/25Listen e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/25Listen --- e-smith-pop3-2.6.0/root/etc/e-smith/templates/var/service/pop3s/runenv/25Listen 1970-01-01 01:00:00.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/etc/e-smith/templates/var/service/pop3s/runenv/25Listen 2017-05-04 12:00:38.119687688 +0200 @@ -0,0 +1,2 @@ +LISTENIP={ $pop3s{ListenIP} || '0' } +PORT={ $pop3s{TCPPort} || '110' } diff -Nur e-smith-pop3-2.6.0/root/var/service/pop3/run e-smith-pop3-2.6.0_bz10271/root/var/service/pop3/run --- e-smith-pop3-2.6.0/root/var/service/pop3/run 2013-02-07 23:09:04.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/var/service/pop3/run 2017-05-04 11:58:00.897708638 +0200 @@ -1,9 +1,6 @@ #!/bin/sh -hostname=$(/sbin/e-smith/config get SystemName) -domain=$(/sbin/e-smith/config get DomainName) -fqdn="$hostname.$domain" -MEM="`head -1 ./env/MEMLIMIT`" +[ -f ./runenv ] && . ./runenv exec 2>&1 # Generate ACL files in ./peers diff -Nur e-smith-pop3-2.6.0/root/var/service/pop3s/run e-smith-pop3-2.6.0_bz10271/root/var/service/pop3s/run --- e-smith-pop3-2.6.0/root/var/service/pop3s/run 2016-02-05 23:06:07.000000000 +0100 +++ e-smith-pop3-2.6.0_bz10271/root/var/service/pop3s/run 2017-05-04 11:58:20.520706019 +0200 @@ -1,6 +1,6 @@ #!/bin/sh -MEM="`head -1 ./env/MEMLIMIT`" +[ -f ./runenv ] && . ./runenv exec 2>&1 exec /usr/local/bin/softlimit -m ${MEM} \