Postfix

Dovecot/postfix/spamassassin 未收到來自特定域的電子郵件

  • April 29, 2017

我對 ubuntu 非常陌生,我已按照以下指南為我的域 philipgonzales.net 配置電子郵件。

https://www.neowin.net/forum/topic/1206123-how-to-run-your-own-email-server-with-your-own-domain-parts-i-ii-iii/

我以某種方式設法發送和接收電子郵件,為此我感到非常高興。我可以從我的 gmail 接收電子郵件,也可以向我的 gmail 發送電子郵件。我也可以向我的工作電子郵件發送電子郵件,但我無法從我的工作電子郵件接收電子郵件。

僅供參考,我是從住宅網際網路帳戶發送的,因此我沒有 PTR 記錄,但我確實計劃切換到商業帳戶以獲得靜態 IP 和創建 PTR 記錄的能力。

該指南要求設置 CLAM AV,但它說這是可選的,所以我沒有完成該設置。不確定這是否重要。

Apr 28 18:09:46 mailbox postfix/postfix-script[9926]: stopping the Postfix mail system 
Apr 28 18:09:46 mailbox postfix/master[9726]: terminating on signal 15 
Apr 28 18:09:46 mailbox postfix/postfix-script[10027]: starting the Postfix mail system 
Apr 28 18:09:46 mailbox postfix/master[10029]: daemon started -- version 2.11.0, configuration /etc/postfix 
Apr 28 18:11:09 mailbox postfix/smtpd[10043]: connect from us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:09 mailbox postfix/smtpd[10043]: warning: connect to Milter service unix:/clamav/clamav-milter.ctl: No such file or directory 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: SSL_accept error from us-smtp-delivery-138.mimecast.com[216.205.24.138]: 0 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: warning: TLS library problem: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown:s3_pkt.c:1278:SSL alert number 46: 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: lost connection after STARTTLS from us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: disconnect from us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: connect from us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: warning: connect to Milter service unix:/clamav/clamav-milter.ctl: No such file or directory 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: 84E2C2C16E6: client=us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:10 mailbox postfix/cleanup[10048]: 84E2C2C16E6:message-id=<OF1F36186C.E516DF53-ON86258110.007F4236-86258110.007F4B2C@frost-global> 
Apr 28 18:11:10 mailbox spamd[3686]: spamd: got connection over /var/spool/postfix/spamassassin/spamd.sock 
Apr 28 18:11:10 mailbox spamd[3686]: spamd: processing message <OF1F36186C.E516DF53-ON86258110.007F4236-86258110.007F4B2C@frost-global> for philip:1001 
Apr 28 18:11:12 mailbox spamd[3686]: spamd: clean message (-2.3/5.0) for philip:1001 disconnect from us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: connect from us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: warning: connect to Milter service unix:/clamav/clamav-milter.ctl: No such file or directory 
Apr 28 18:11:10 mailbox postfix/smtpd[10043]: 84E2C2C16E6: client=us-smtp-delivery-138.mimecast.com[216.205.24.138] 
Apr 28 18:11:10 mailbox postfix/cleanup[10048]: 84E2C2C16E6: message-id=<OF1F36186C.E516DF53-ON86258110.007F4236-86258110.007F4B2C@frost-global> 
Apr 28 18:11:10 mailbox spamd[3686]: spamd: got connection over /var/spool/postfix/spamassassin/spamd.sock Apr 28 18:11:10 mailbox spamd[3686]: spamd:processing message <OF1F36186C.E516DF53-ON86258110.007F4236-86258110.007F4B2C@frost-global> for philip:1001 
Apr 28 18:11:12 mailbox spamd[3686]: spamd: clean message (-2.3/5.0) for philip:1001 in 1.9 seconds, 73237 bytes. 
Apr 28 18:11:12 mailbox spamd[3686]: spamd: result: . -2 -HTML_IMAGE_ONLY_32,HTML_MESSAGE,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIK$ scantime=1.9,size=73237,user=philip,uid=1001,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=/$ autolearn_force=no 
Apr 28 18:11:12 mailbox postfix/qmgr[10031]: 84E2C2C16E6:from=<philip.gonzales@frost.com>, size=73176, nrcpt=1 (queue active) 
Apr 28 18:11:12 mailbox dovecot: lda(philip@philipgonzales.net): sieve: msgid=<OF1F36186C.E516DF53-ON86258110.007F4236-86258110.007F4B2C@frost-global>: marked message to be discarded if not explicitly delivered (discard action) 
Apr 28 18:11:12 mailbox postfix/pipe[10051]: 84E2C2C16E6: to=<philip@philipgonzales.net>, relay=dovecot, delay=2.6, delays=2.6/0/0/0.02, dsn=2.0.0, status=sent (delivered via dovecot service) 
Apr 28 18:11:12 mailbox postfix/qmgr[10031]: 84E2C2C16E6: removed Apr 28 18:11:12 mailbox postfix/smtpd[10043]:disconnect from us-smtp-delivery-138.mimecast.com[216.205.24.138]


Apr 28 18:11:48 mailbox postfix/smtpd[10043]: disconnect from mail-qk0-f170.google.com[209.85.220.170]
Apr 28 18:14:46 mailbox postfix/qmgr[10031]: 3713F2C16E3: from=<>, size=2650, nrcpt=1 (queue active)
Apr 28 18:14:46 mailbox dovecot: lda(philip): Error: User initialization failed: Initializing mail stor$
Apr 28 18:14:46 mailbox dovecot: lda(philip): Fatal: Invalid user settings. Refer to server log for mor$
Apr 28 18:14:46 mailbox postfix/local[10058]: 3713F2C16E3: to=<philip@mailbox.philipgonzales.net>, rela$
Apr 28 18:15:08 mailbox postfix/anvil[10046]: statistics: max connection rate 2/60s for (smtp:216.205.2$
Apr 28 18:15:08 mailbox postfix/anvil[10046]: statistics: max connection count 1 for (smtp:216.205.24.1$
Apr 28 18:15:08 mailbox postfix/anvil[10046]: statistics: max cache size 2 at Apr 28 18:11:46
Apr 28 18:24:46 mailbox dovecot: lda(philip): Error: User initialization failed: Initializing mail stor$
Apr 28 18:24:46 mailbox dovecot: lda(philip): Fatal: Invalid user settings. Refer to server log for mor$
Apr 28 18:24:46 mailbox postfix/local[10070]: 3713F2C16E3: to=<philip@mailbox.philipgonzales.net>, rela$

還有一些消息說致命的無效使用者設置。有任何想法嗎?

如果有的話,請告訴我應該發布哪些配置。

我發現了我的問題。我回顧了我的指南,發現我設置了指南建議的預設篩濾器。

require ["envelope", "fileinto", "imap4flags", "regex"];

# Grab bills before anything else
if anyof (envelope :contains "From" "@alerts.comcast.net",
         envelope "From" "noreply@txu.com") {
   fileinto "Bills";
   stop;
}

# I don't even want to see spam higher than level 10
if header :contains "X-Spam-Level" "**********" {
   discard;
   stop;
}

# Twitter? Die in a fire.
if anyof (envelope "From" "bounce@tweet.twitter.com",
         envelope :contains "From" "@bounce.twitter.com") {
   discard;
   stop;
}

# Trash messages with improperly formed message IDs
if not header :regex "message-id" ".*@.*\\." {
   discard;
   stop;
}

# File low-level spam in spam bucket, and viruses in Infected folder
if anyof (header :contains "X-Spam-Level" "*****",
         header :contains "X-Virus-Status" "Infected") {
   if header :contains "X-Spam-Level" "*****" {
       fileinto "Junk";
       setflag "\\Seen";
   }
   else {
       fileinto "Infected";
   }
}

我註釋掉了有關格式不正確的消息 ID 的部分。我的公司使用蓮花筆記,所以我猜這是為什麼?

無論如何,我想這可以解決這個問題。我仍然認為我的配置可能有點不穩定。如果有人有興趣查看我的日誌/配置並查看它們,我很樂意發布它們。我可能需要一點幫助才能知道究竟要發布什麼。讓我知道。

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