diff --git a/mailsrv/assets/bin/mkvirt b/mailsrv/assets/bin/mkvirt index 5ffe666..f336af7 100755 --- a/mailsrv/assets/bin/mkvirt +++ b/mailsrv/assets/bin/mkvirt @@ -15,10 +15,13 @@ cat /vol/data/users | cut -d':' -f1 | perl -pe 's/(.*)/\1 ./' > /etc/postfix/use postmap /etc/postfix/users ### Aliases ### -# copy aliases to postifx config +# copy aliases to postfix config cd /etc/postfix cat /vol/data/aliases.d/*.list > aliases postmap aliases +# copy blacklist to postfix config +cat /vol/data/aliases.d/*.deny > deny +postmap deny ### Reload ### postfix reload diff --git a/mailsrv/assets/postfix/main.cf.part b/mailsrv/assets/postfix/main.cf.part index eb04c96..82e6522 100644 --- a/mailsrv/assets/postfix/main.cf.part +++ b/mailsrv/assets/postfix/main.cf.part @@ -61,6 +61,8 @@ smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_i smtpd_data_restrictions = reject_unauth_pipelining # reject unauthorized relay attempts smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination +# reject blacklisted addresses +smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/deny, permit ### Misc ### # whether to send "new mail" notifications to users