
可能是一個簡單的問題,但我正在嘗試鎖定哪些用戶可以從本機電腦發送電子郵件。我已經通過在 /etc/postfix/allowed_recipients 文件上運行 newaliases 並設置類似於 It Works 的內容來鎖定哪些可以接收
smtpd_recipient_restrictions = hash:/etc/postfix/allowed_recipients, reject
,但是如何對發件人限制執行相同的操作?
答案1
smtpd_sender_restrictions = reject_unknown_sender_domain, reject_unlisted_sender, check_sender_access hash:/etc/postfix-internal/localusers, reject
在 localusers 內,列出每個 OK 位址
[email protected] OK
[email protected] OK
或者您可以新增一個網域,然後僅列出區塊
example.com OK
[email protected] 550 Account compromised
[email protected] 550 Account closed
答案2
查看 postfix 文件。http://www.postfix.org/RESTRICTION_CLASS_README.html