Stock poste now uses a unix socket for lmtp

This commit is contained in:
PJ Eby 2020-02-29 01:26:16 -05:00
parent cb25debe35
commit 53e44d551c
2 changed files with 2 additions and 17 deletions

View file

@ -26,17 +26,6 @@ service managesieve-login {
# Move lmtp and quota to a socket in place of localhost
service lmtp {
unix_listener lmtp {
path = /var/run/lmtp.sock
mode = 0666
}
inet_listener lmtp {
port = 0
}
}
service quota-status {
inet_listener {
port = 0

View file

@ -89,7 +89,6 @@ shopt -q expand_aliases||{ unalias -a;shopt -s expand_aliases;};builtin alias +=
sockdir=/var/run
rspam_web=$sockdir/rspamd-web.sock
rspam=$sockdir/rspamd-normal.sock
lmtp=$sockdir/lmtp.sock
quota=$sockdir/dovecot-quota.sock
# redis and haraka run unprivileged and so need directories of their own
@ -101,6 +100,7 @@ redis="$sockdir"/redis/redis.sock
haraka_smtp_web=$sockdir/haraka/web-11380.sock
haraka_sub_web=$sockdir/haraka/web-11381.sock
# Change nginx proxy settings to use unix sockets
~ edit /etc/nginx/sites-enabled.templates/{no-,}https; {{
@ -127,12 +127,8 @@ haraka_sub_web=$sockdir/haraka/web-11381.sock
}}
}}
# Haraka plugins need to use sockets for LMTP and quota instead of ports
# Haraka plugins need to use sockets for quota instead of ports
~ edit /opt/haraka-smtp/plugins/rcpt_database.js; {{
- sub ", port: 24};" \
", port: 24, path: '$lmtp'}"
}}
~ edit /opt/haraka-smtp/plugins/dovecot_quota.js; {{
- sub "socket\\.connect(13001, '127.0.0.1');" \
"socket.connect('$quota');"