summaryrefslogtreecommitdiff
path: root/postfix
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2020-10-09 19:08:41 +0200
committerJonas Smedegaard <dr@jones.dk>2020-10-09 19:37:29 +0200
commitc629aecf93c2857b4d9dc7cc42a378636c14de5f (patch)
tree6886ce9b616525dfb6b3a6c8763b71cd74bc0506 /postfix
parent24ae9e7220d1e73fdb3fa36d19d4278a21dbb1df (diff)
fix limit max_use to service amavisfeed
Diffstat (limited to 'postfix')
-rwxr-xr-xpostfix/postfix.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/postfix/postfix.sh b/postfix/postfix.sh
index fc9076c..e78a791 100755
--- a/postfix/postfix.sh
+++ b/postfix/postfix.sh
@@ -74,6 +74,8 @@ else
warn "No inbound SASL authentication - requires TLS encryption and Dovecot."
fi
amavis=
+# TODO: maybe use AMaViS default of 20 (instead tuning spamassassin)
+# <https://www.ijs.si/software/amavisd/amavisd-new-docs.html#max_requests>
default_amavis_maxproc=2
if [ -x /usr/sbin/amavisd ] || [ -x /usr/sbin/amavisd-new ]; then
amavis=1
@@ -346,7 +348,6 @@ _postconf -X smtpd_sasl_auth_enable
_postconf -X smtpd_sasl_security_options
if [ -n "$amavis" ]; then
- _postconf -e 'max_use = 10' # Avoid too much reuse
amavis_maxproc=$(getperlvarfromfile max_servers "$default_amavis_maxproc" amavisd.conf.addon amavis)
_postconf -Me amavisfeed/unix="
amavisfeed unix - - n - $amavis_maxproc lmtp
@@ -354,7 +355,7 @@ amavisfeed unix - - n - $amavis_maxproc lmtp
-o lmtp_never_send_ehlo=yes
-o lmtp_send_xforward_command=yes
-o disable_dns_lookups=yes
- -o max_use=20
+ -o max_use=$amavis_maxproc
"
_postconf -Me 127.0.0.1:10025/inet='
127.0.0.1:10025 inet n - n - - smtpd
@@ -414,6 +415,9 @@ else
_postconf -X receive_override_options
fi
+# obsolete settings
+_postconf -X max_use
+
diff -ruN "$confdir" "$tempdir" || if [ $? -gt 1 ]; then exit $?; else needs_reload="1"; fi
if [ "$force" = "1" ]; then