几天前,我阅读了一些有关 amavis 的文档,并决定对其配置进行微调。由于我是 amavis 的新手,我可能以错误的方式设置了一些语句,所以最近几天我一直在从 paypal 付款到邮政局长邮箱接收电子邮件。当我建立以下设置时,看起来 amavis 正在按照指示执行操作。
$virus_admin = "postmaster\@$mydomain"; # 通知接收。 $mailfrom_notify_admin = "postmaster\@$mydomain"; # 通知发件人 $mailfrom_notify_recip = "postmaster\@$mydomain"; # 通知发件人 $mailfrom_notify_spamadmin = "postmaster\@$mydomain"; # 通知发件人 $mailfrom_to_quarantine = ''; # 返回路径为空;如果未定义,则使用原始发件人
现在我想知道这些电子邮件是否被 amavis 错误地归类为垃圾邮件/病毒,或者是否只是因为我告诉 amavis 才发送给我?
另外,我无法找到以前设置的定义,所以我完全不确定这些通知设置是什么意思,也不确定是否存在更多我应该调整的通知设置?
这是 amavis 向 postmaster 发送电子邮件时的 mail.log 示例。看起来好像根本没有病毒。
https://gist.github.com/sibok/d798d43b78c023cb33de
非常感谢,希望有人能告诉我正确的通知设置,这样我就不会破坏正确的 amavis 流程,而且我也能够获得邮政局长归类为垃圾邮件/病毒的收发电子邮件的副本。
谢谢
答案1
根据您的邮件日志,看起来来自 paypal 的电子邮件是发送给两个收件人的,下面的片段可以确认这一事实。
Apr 1 10:11:44 we postfix/qmgr[31630]: 97D784243D: from=<[email protected]>, size=16783, nrcpt=2 (queue active)
Apr 1 10:11:48 we amavis[28478]: (28478-04) Passed CLEAN {RelayedInbound}, [173.0.84.228]:34952 [173.0.84.228] <[email protected]> -> <[email protected]>,<[email protected]>, Queue-ID: 97D784243D, Message-ID: <[email protected]>, mail_id: Lm7rRD54sUSa, Hits: -11.569, size: 17069, queued_as: 90A3A4364C, dkim_sd=pp-dkim1:paypal.de, 4154 ms
Apr 1 10:11:48 we postfix/smtp[31983]: 97D784243D: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=18, delays=14/0.01/0/4.2, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 90A3A4364C)
Apr 1 10:11:48 we postfix/smtp[31983]: 97D784243D: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=18, delays=14/0.01/0/4.2, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 90A3A4364C)
- 第一行
nrcpt=2
表示该电子邮件是发给两个收件人的 - 在第二行,两位获奖者被揭晓
<[email protected]> -> <[email protected]>,<[email protected]>
- 在第三行和第四行,有日志表明 postfix 成功将电子邮件注入 amavis(重新注入队列 ID 为 90A3A4364C)
因此,您声称发送该消息的 amavis 是错误的。
因此,如果您想要获取被归类为垃圾邮件/病毒的收发电子邮件副本,请设置virus_admin
和spam_admin
。以下是分类工作原理的片段,取自这一页。
# Here is an overall picture (sequence of events) of how pieces fit together
# (only virus controls are shown, spam controls work the same way):
#
# bypass_virus_checks? ==> PASS
# no viruses? ==> PASS
# log virus if $log_templ is nonempty
# quarantine if $virus_quarantine_to is nonempty
# notify admin if $virus_admin (lookup) nonempty
# notify recips if $warnvirusrecip and (recipient is local or $warn_offsite)
# add address extensions if adding extensions is enabled and virus will pass
# send (non-)delivery notifications
# to sender if DSN needed (BOUNCE or ($warn_virus_sender and D_PASS))
# virus_lovers or final_destiny==D_PASS ==> PASS
# DISCARD (2xx) or REJECT (5xx) (depending on final_*_destiny)
#
# Equivalent flow diagram applies for spam checks.
# If a virus is detected, spam checking is skipped entirely.