.
This commit is contained in:
@ -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
|
||||
|
4
jails/config/mail/postfix/protected_destinations
Normal file
4
jails/config/mail/postfix/protected_destinations
Normal file
@ -0,0 +1,4 @@
|
||||
# not everyone can send to these destinations
|
||||
# we restrict some of them
|
||||
|
||||
ahlawat.com good_senders_only
|
@ -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
|
||||
|
5
jails/config/mail/postfix/restricted_senders
Normal file
5
jails/config/mail/postfix/restricted_senders
Normal 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
|
Reference in New Issue
Block a user