postfix限制郵件發送分組


main.conf中新建限制類

smtpd_restriction_classes= send_to_all, send_to_rdp

send_to_all =check_sender_access hash:/etc/postfix/npc/local_sender_all,reject

send_to_rdp =check_sender_access hash:/etc/postfix/npc/local_sender_rdp,reject


smtpd_recipient_restrictions= check_sender_accesshash:/etc/postfix/npc/local_sender_all,

                                                         check_sender_accesshash:/etc/postfix/npc/local_sender_rdp,

                                                           check_recipient_access hash:/etc/postfix/npc/local_recipients,

                                                           permit_mynetworks,

                                                           permit_sasl_authenticated,

                                                       reject_non_fqdn_sender,

                                                       reject_non_fqdn_recipient,

                                                       reject_unknown_recipient_domain,

                                                       reject_unauth_pipelining,

                                                           reject_unauth_destination


# vim local_recipients

[email protected] send_to_all

rd_dept@test.com send_to_rdp


注:訪問限制中是逐條匹配訪問列表的,匹配成功就退出


#vim local_sender_all

[email protected] ok


#vimlocal_sender_rdp

[email protected] ok


postmaphash:/etc/postfix/npc/local_recipients

postmaphash:/etc/postfix/npc/local_sender_all

postmaphash:/etc/postfix/npc/local_sender_rdp

postfixreload




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章