我正在AWS雲中設置Web應用程序以通過SES發送郵件。它應該使用配置爲智能主機的AWS SES服務器使用postfix發送通知。該應用程序使用郵局主管帳戶發送郵件。發送電子郵件工作正常,但我需要配置反彈處理。使用postfix和智能主機轉發到別名的外部電子郵件
該應用程序發送一封電子郵件,如果它被髮送,一切正常。但是偶爾會有一封電子郵件反彈。
由於網絡應用程序不包括任何類型的傳入郵件處理,我不只是想默默地放棄退回郵件,我選擇通過/etc/aliases
轉發郵政局長的帳戶到外部電子郵件地址。如果我現在直接向郵件管理員發送郵件,它會正確發送到該地址。但是,如果postfix收到反彈,它會嘗試轉發反彈消息,並以某種方式使智能主機拒絕使用501 Invalid From命令(現在發出)的反彈消息。如果我刪除別名,則反彈會正確傳遞到本地帳戶。
任何想法,如果這是可以解決的?
後綴日誌的相關部分:
發送郵件:
postfix/pickup[1909]: 7619943922: uid=1000 from=<[email protected]>
postfix/cleanup[2164]: 7619943922: message-id=<[email protected]>
postfix/qmgr[565]: 7619943922: from=<[email protected]>, size=357, nrcpt=1 (queue active)
postfix/smtp[2166]: 7619943922: to=<[email protected]>, relay=email-smtp.eu-west-1.amazonaws.com[54.72.40.32]:25, status=sent (250 Ok) #irrelevant things cut out
postfix/qmgr[565]: 7619943922: removed
傳入反彈,當它應該被forwared錯誤:
postfix/smtpd[2158]: connect from a3-182.smtp-out.eu-west-1.amazonses.com[54.240.3.182]
postfix/smtpd[2158]: 6B7E44385A: client=a3-182.smtp-out.eu-west-1.amazonses.com[54.240.3.182]
postfix/cleanup[2164]: 6B7E44385A: message-id=<[email protected]>
postfix/qmgr[565]: 6B7E44385A: from=<>, size=2305, nrcpt=1 (queue active)
postfix/cleanup[2164]: 6D93E43922: message-id=<[email protected]>
postfix/qmgr[565]: 6D93E43922: from=<>, size=2432, nrcpt=1 (queue active)
postfix/local[2167]: 6B7E44385A: to=<[email protected]>, relay=local, delay=0.01, delays=0.01/0/0/0, dsn=2.0.0, status=sent (forwarded as 6D93E43922)
postfix/qmgr[565]: 6B7E44385A: removed
postfix/smtp[2166]: 6D93E43922: to=<[email protected]>, orig_to=<[email protected]>, relay=email-smtp.eu-west-1.amazonaws.com[52.213.60.48]:25, delay=0.09, delays=0/0/0.09/0, dsn=5.0.0, status=bounced (host email-smtp.eu-west-1.amazonaws.com[52.213.60.48] said: 501 Invalid MAIL FROM address provided (in reply to MAIL FROM command))
postfix/qmgr[565]: 6D93E43922: removed
這聽起來像一個更簡單的計劃。感謝您指出了這一點! –