几天来,我的垃圾邮件文件夹中收到了几封垃圾邮件。返回路径和从地址我自己顶级域名的邮件地址始终不存在(例如[电子邮件保护])。
我在 Debian Jessie 系统上使用 Postfix、带有虚拟 mysql 邮箱的 Dovecot 和 Spamassasin。
我该怎么做才能摆脱这些邮件?
邮件标题摘录:
Return-Path: <[email protected]>
Delivered-To: [email protected]
Received: from customer-XXX-10-220.XXXXXXXX.net.mx (unknown [XXX.XXX.10.220])
by mail.mydomain.tld (Postfix) with ESMTP id 9DE6F1CE0077
for <[email protected]>; Wed, 10 Feb 2016 15:13:04 +0100 (CET)
Date: Wed, 10 Feb 2016 08:11:07 -0500
From: XXX YYY <[email protected]>
To: [email protected]
Message-Id: <[email protected]>
Subject: Rechnung Januar 2016-10087
Content-Type: multipart/mixed; boundary="----------=_56BB4572.CB81E657"
X-MB-Message-Source: WebUI
X-MB-Message-Type: User
X-Mailer: JAS STD
SpamDiagnosticOutput: 1:23
SpamDiagnosticMetadata: NSPM
MIME-Version: 1.0
X-Spam-Flag: YES
X-Spam-Status: Yes, score=6.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_RP_RNBL,
RCVD_IN_SBL_CSS,RCVD_IN_XBL,RDNS_NONE autolearn=no autolearn_force=no
version=3.4.0
X-Spam-Level: ******
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.mydomain.tld
/var/log/mail.log 的片段如下:
Feb 10 15:13:04 mail postfix/smtpd[13690]: warning: hostname customer-XXX-10-220.XXXXXXXX.net.mx does not resolve to address XXX.XXX.10.220: Name or service not known
Feb 10 15:13:04 mail postfix/smtpd[13690]: connect from unknown[XXX.XXX.10.220]
Feb 10 15:13:04 mail postfix/smtpd[13690]: 9DE6F1CE0077: client=unknown[XXX.XXX.10.220]
Feb 10 15:13:04 mail postfix/cleanup[13700]: 9DE6F1CE0077: message-id=<[email protected]>
Feb 10 15:13:05 mail spamd[8916]: spamd: connection from ip6-localhost [::1]:41200 to port 783, fd 6
Feb 10 15:13:05 mail spamd[8916]: spamd: processing message <[email protected]> for mymailaddress:5000
Feb 10 15:13:06 mail spamd[8916]: spamd: identified spam (6.8/5.0) for mymailaddress:5000 in 1.0 seconds, 61333 bytes.
Feb 10 15:13:06 mail spamd[8916]: spamd: result: Y 6 - HTML_MESSAGE,RCVD_IN_RP_RNBL,RCVD_IN_SBL_CSS,RCVD_IN_XBL,RDNS_NONE scantime=1.0,size=61333,user=mymailaddress,uid=5000,required_score=5.0,rhost=ip6-localhost,raddr=::1,rport=41200,mid=<[email protected]>,autolearn=no autolearn_force=no
Feb 10 15:13:06 mail spamd[8915]: prefork: child states: II
Feb 10 15:13:06 mail postfix/qmgr[1593]: 9DE6F1CE0077: from=<[email protected]>, size=64215, nrcpt=1 (queue active)
Feb 10 15:13:06 mail dovecot: lda([email protected]): sieve: msgid=<[email protected]>: stored mail into mailbox 'INBOX.Junk'
Feb 10 15:13:06 mail postfix/pipe[13703]: 9DE6F1CE0077: to=<[email protected]>, relay=dovecot, delay=2.3, delays=2.2/0/0/0.16, dsn=2.0.0, status=sent (delivered via dovecot service)
Feb 10 15:13:06 mail postfix/qmgr[1593]: 9DE6F1CE0077: removed
Feb 10 15:13:07 mail postfix/smtpd[13690]: disconnect from unknown[XXX.XXX.10.220]
答案1
据记载后缀smtpd_sender_restrictions
您可以在main.cf 中使用以下两个限制:
拒绝未列出的发件人
当 MAIL FROM 地址未列在其域类的有效收件人列表中时,拒绝请求。有关详细信息,请参阅 smtpd_reject_unlisted_sender 参数说明。此功能在 Postfix 2.1 及更高版本中可用。
拒绝未经验证的发件人
当已知发送到 MAIL FROM 地址的邮件被退回,或者无法到达发件人地址时,拒绝请求。地址验证信息由 verify(8) 服务器管理;有关详细信息,请参阅 ADDRESS_VERIFICATION_README 文件。