feat(postfix): Enforce SMTPD sender restrictions
Default is to accept all mail from sender after filtering. smtpd_sender_restrictions rules and order are as follows: 1. permit_mynetworks permit my network (localhost). Placed first as sometimes the sender will not be a FQDN sender. (i.e. cron) 2. reject_non_fqdn_sender bounce mail where sender not in format of FQDN. 3. reject Reject all remaining senders MR !7
This commit is contained in:
@ -197,6 +197,8 @@ RUN postconf -e "maillog_file=/var/log/postfix.log" \
|
|||||||
&& postconf -e "smtpd_client_restrictions=reject_unauth_destination,reject_unauth_pipelining,permit_mynetworks,permit_auth_destination,reject" \
|
&& postconf -e "smtpd_client_restrictions=reject_unauth_destination,reject_unauth_pipelining,permit_mynetworks,permit_auth_destination,reject" \
|
||||||
# HELO/EHLO restrictions
|
# HELO/EHLO restrictions
|
||||||
&& postconf -e "smtpd_helo_restrictions=permit_mynetworks,reject_invalid_helo_hostname,permit" \
|
&& postconf -e "smtpd_helo_restrictions=permit_mynetworks,reject_invalid_helo_hostname,permit" \
|
||||||
|
# MAIL FROM restrictions
|
||||||
|
&& postconf -e "smtpd_sender_restrictions=permit_mynetworks,reject_non_fqdn_sender,permit" \
|
||||||
|
|
||||||
EXPOSE 25 587 993 4190
|
EXPOSE 25 587 993 4190
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user