This commit is contained in:
Sharad Ahlawat
2021-04-01 01:23:14 -07:00
parent 5cee123a3c
commit 90c5709862
64 changed files with 802 additions and 140 deletions

View File

@ -797,8 +797,10 @@ smtpd_sender_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_n
smtpd_relay_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
# !!! THE LAST SETTING PREVENTS YOU FROM BEING AN OPEN RELAY !!!
# !!! DO NOT REMOVE IT UNDER ANY CIRCUMSTANCES !!!
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unverified_recipient
smtpd_recipient_restrictions = permit_mynetworks,check_recipient_access hash:/usr/local/etc/postfix/protected_destinations,permit_sasl_authenticated,reject_non_fqdn_recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unverified_recipient
smtpd_data_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_multi_recipient_bounce,reject_unauth_pipelining
smtpd_restriction_classes = good_senders_only
good_senders_only = check_sender_access hash:/usr/local/etc/postfix/restricted_senders,permit
# deliver mail for virtual users to Dovecot's LMTP socket
virtual_transport = lmtp:unix:private/dovecot-lmtp

View File

@ -0,0 +1,4 @@
# not everyone can send to these destinations
# we restrict some of them
ahlawat.com good_senders_only

View File

@ -1,10 +1,13 @@
# update aliases.db
newaliases
#rm /usr/local/etc/postfix/system-virtual-mailboxes.db
#postmap /usr/local/etc/postfix/system-virtual-mailboxes
rm /usr/local/etc/postfix/virtual-maillist-alias-maps.db
postmap /usr/local/etc/postfix/virtual-maillist-alias-maps
rm /usr/local/etc/postfix/protected_destinations.db
postmap /usr/local/etc/postfix/protected_destinations
rm /usr/local/etc/postfix/restricted_senders.db
postmap /usr/local/etc/postfix/restricted_senders
service postfix reload

View File

@ -0,0 +1,5 @@
# We do not want mail from these folks, generally
cyou REJECT 521
qq.com REJECT 521
163.com REJECT 521