From 6050b72ca340e5fe6c3f229dea19f72a15c39289 Mon Sep 17 00:00:00 2001 From: Lars Beckers <lars.beckers@rwth-aachen.de> Date: Sun, 25 Apr 2021 23:41:50 +0200 Subject: [PATCH] postfix: add fsmpi-specific daemon setup --- postfix/templates/master.cf.j2 | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/postfix/templates/master.cf.j2 b/postfix/templates/master.cf.j2 index a59b7b5..b4bd1bf 100644 --- a/postfix/templates/master.cf.j2 +++ b/postfix/templates/master.cf.j2 @@ -45,6 +45,18 @@ smtps inet n - y - - smtpd {% endif %} {% endif %} #628 inet n - y - - qmqpd +{% if postfix_fsmpi|default(false) and ansible_hostname == "mail" %} +2525 inet n - y - - smtpd + -o syslog_name=postfix/smtps-internal + -o milter_macro_daemon_name=ORIGINATING + -o smtpd_tls_wrappermode=yes + -o smtpd_sasl_auth_enable=no + -o smtpd_sender_login_maps= + -o smtpd_client_restrictions=permit_mynetworks,reject + -o smtpd_recipient_restrictions=$2525_smtpd_recipient_restrictions + -o virtual_alias_domains=fsmpi.rwth-aachen.de + -o virtual_alias_maps=cdb:/etc/postfix/nullmailer_alias +{% endif %} {% endif %} pickup unix n - y 60 1 pickup cleanup unix n - y - 0 cleanup @@ -61,7 +73,11 @@ proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - y - - smtp relay unix - - y - - smtp -# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 +{% if postfix_fsmpi|default(false) and ansible_hostname == "mail" %} + -o smtp_fallback_relay= +{% else %} +# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 +{% endif %} showq unix n - y - - showq error unix - - y - - error retry unix - - y - - error @@ -94,13 +110,17 @@ policy-spf unix - n n - 0 spawn {% if not postfix_satellite_only and postfix_enable_dovecot %} dovecot unix - n n - - pipe +{% if postfix_fsmpi|default(false) %} + flags=DRhu argv=/usr/lib/dovecot/deliver -d ${recipient} +{% else %} flags=DRhu user=5001:5000 argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a ${original_recipient} -d ${user}@${nexthop} +{% endif %} +{% endif %} {% if postfix_content_filter == 'spamassassin' %} spamassassin unix - n n - - pipe user=debian-spamd argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient} {% endif %} -{% endif %} #maildrop unix - n n - - pipe # flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} @@ -115,3 +135,8 @@ spamassassin unix - n n - - pipe #mailman unix - n n - - pipe # flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py # ${nexthop} ${user} +{% if postfix_fsmpi|default(false) and ansible_hostname == "lists" %} +mailman unix - n n - - pipe + flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py + ${nexthop} ${user} +{% endif %} -- GitLab