2018年10月25日 星期四

reject the empty envelope-sender, <>

main.cf,添加以下設定
submission_sender_checks =
   check_sender_access hash:/etc/postfix/reject_null_sender

master.cf,添加以下設定 
#  existing submission entry
submission ... smtpd
  ... other options ...
#  add sender restrictions
  -o smtpd_sender_restrictions=$submission_sender_checks

新增reject_null_sender,並增加以下內容
# reject_null_sender
<>  REJECT null sender not allowed

sudo postmap reject_null_sender 
sudo service postfix restart