Email

Postfix + Dovecot + Sieve - CC 和 BCC 重定向不起作用

  • March 27, 2018

伙計們!

我有一個帶有 ISPConfig 的 CentOS Web 伺服器,該伺服器已經執行了一年多,沒有任何問題,包含在電子郵件服務中(postfix + dovecot + sieve)。

但是,對於將電子郵件副本發送到其他帳戶(位於伺服器本身內部)的客戶端,出現了新的需求

我已經和 Sieve 爭論了幾天。當我們在 ispconfig 中配置一些重定向時,無論是抄送還是密件抄送,電子郵件都會到達主帳戶,但應該接收副本的帳戶卻沒有收到郵件。

在伺服器日誌(Maillog)下方,指的是電子郵件的發送(我只是更改了電子郵件地址以保護它們):

Mar 20 22:57:05 srv-exwb01 sendmail[22014]: w2L1v4Si022014: w2L1v4Sj022014: DSN: Service unavailable
Mar 20 22:57:05 srv-exwb01 postfix/smtpd[21955]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <srv-exwb01.eximiaweb.com.br>: Helo command rejected: Host not found; from=<> to=<lxxxxx@agxxxxxxx.com.br> proto=ESMTP helo=<srv-exwb01.eximiaweb.com.br>
Mar 20 22:57:05 srv-exwb01 sendmail[22014]: w2L1v4Sj022014: to=lxxxxx@agxxxxxxx.com.br, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=33744, relay=[127.0.0.1] [127.0.0.1], dsn=5.7.1, stat=Service unavailable
Mar 20 22:57:05 srv-exwb01 sendmail[22014]: w2L1v4Sj022014: w2L1v4Sk022014: return to sender: Service unavailable
Mar 20 22:57:05 srv-exwb01 postfix/smtpd[21955]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <srv-exwb01.eximiaweb.com.br>: Helo command rejected: Host not found; from=<> to=<postmaster@srv-exwb01.eximiaweb.com.br> proto=ESMTP helo=<srv-exwb01.eximiaweb.com.br>
Mar 20 22:57:05 srv-exwb01 sendmail[22014]: w2L1v4Sk022014: to=postmaster, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=34768, relay=[127.0.0.1] [127.0.0.1], dsn=5.7.1, stat=Service unavailable
Mar 20 22:57:05 srv-exwb01 sendmail[22014]: w2L1v4Sj022014: Losing ./qfw2L1v4Sj022014: savemail panic
Mar 20 22:57:05 srv-exwb01 sendmail[22014]: w2L1v4Sj022014: SYSERR(vmail): savemail: cannot save rejected email anywhere
Mar 20 22:57:05 srv-exwb01 dovecot: lda(sales@xxxxxxx.com): Error: Sendmail process terminated abnormally, exit status 69
Mar 20 22:57:05 srv-exwb01 dovecot: lda(sales@xxxxxxx.com): Error: sieve: msgid=<EC64216D-EE77-4791-8915-4A699CAD1EDF@agxxxxxxx.com.br>: failed to redirect message to <marketing@xxxxxxx.com> (refer to server log for more information)

這是該帳戶的篩選日誌:

sieve: info: started log at Mar 20 22:11:48.
error: msgid=<ABE38407-805D-4D24-96E5-1EFD09409C12@agxxxxxxx.com.br>: failed to redirect message to <iteles@yyyyyyyyyy.com.br> (refer to server log for more information).
sieve: info: started log at Mar 20 22:25:24.
error: msgid=<63FFBE47-3494-4E5E-970C-5A4BE87DC94E@agxxxxxxx.com.br>: failed to redirect message to <iteles@yyyyyyyyyy.com.br> (refer to server log for more information).
sieve: info: started log at Mar 20 22:39:31.
error: msgid=<D2C0A66A-7B28-4224-A0D9-C453A845C855@agxxxxxxx.com.br>: failed to redirect message to <marketing@xxxxxxx.com> (refer to server log for more information).
sieve: info: started log at Mar 20 22:57:05.
error: msgid=<EC64216D-EE77-4791-8915-4A699CAD1EDF@agxxxxxxx.com.br>: failed to redirect message to <marketing@xxxxxxx.com> (refer to server log for more information).

**附加資訊:**已使用本教程配置伺服器: https ://www.howtoforge.com/tutorial/perfect-server-centos-7-apache-mysql-php-pureftpd-postfix-dovecot-and-ispconfig/

有人知道會發生什麼嗎?預先感謝您的關注。

好…

我想我能夠在我的朋友@Gerard H. Pille 的幫助下解決問題,正如評論中提到的,我的綁定中有 PTR 記錄,但正如@Gerard H. Pille 指出的那樣,即使有這個記錄,反向DNS它不起作用。

然後搜尋為我提供雲實例的公司的面板,我發現反向 dns 指向與我的伺服器 (ns1.eximiaweb.com.br) 不同的名稱,而且 Sieve 在這裡迷路了,甚至在內部也是如此他想在網上找,找不到。我所做的是將此配置從 ns1.eximia … 更改為伺服器名稱(存在於 hosts 文件中)。

這解決了問題,我發現註冊很有趣,因為可能其他人也有同樣的問題。

感謝@Gerard H. Pille 的幫助!

引用自:https://serverfault.com/questions/904331