删除被 SpamAssassin 标记为垃圾邮件的电子邮件的最直接方法是什么?
我使用 Ubuntu Intrepid,使用 Postfix 和 SpamAssassin。 我见过使用 procmail 的方法(例如 建议@ Apache 的方法),但我寻找不使用 procmail 的解决方案。
这是一个编程问题,因为正确的答案将是完成手头任务的某种形式的代码(我对反对票的回应)。
情况更新:我使用了本教程,效果非常好: https://help.ubuntu.com /community/PostfixAmavisNew
I'm on Ubuntu Intrepid, using Postfix and SpamAssassin. I've seen approaches using procmail (like the one suggested @ Apache), but I'm looking for a solution that does not use procmail.
This is a programming question because the correct answer will be some form of code that accomplishes the task at hand (my response to the negative votes).
UPDATE to the situation: I used this tutorial and it worked out excellently: https://help.ubuntu.com/community/PostfixAmavisNew
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这实际上取决于您想要在哪个级别删除垃圾邮件:
在邮件客户端级别,使用电子邮件客户端规则(如 Thunderbird 中可用的规则)很简单:只需设置一个规则,删除在邮件客户端中标记为垃圾邮件的任何电子邮件。主题。
在用户级别,如果机器自动接收邮件,您可以设置一些 cron 作业来定期检查本地邮箱并再次删除标记为垃圾邮件的邮件。
如果您的本地商店使用
maildir
,这很容易,因为每封电子邮件都只是一个文件,而不是mbox
格式,后者需要更多工作,因为它是单个文件。为 postfix 设置
maildir
是微不足道。在服务器级别,使用
Amavisd
将允许您可以更好地控制邮件的处理方式。Amavisd
具有阈值设置,您可以根据 spamassassin 给出的垃圾邮件分数定义规避操作。例如,任何超过 15 分的内容都会被隔离,任何超过 30 分的内容都会被删除。
有一些关于在 Ubuntu 上安装 Amavisd 的说明。
重点是,据我所知,
spamassassin
的工作是识别电子邮件并给予垃圾邮件分数。 您希望如何处理这些内容不取决于spamassassin
,而是由链上的其他模块决定。It really depends at which level you want to delete the spam:
At the mail client level, using Email client rules (like the ones available in Thunderbird) is easy: just set a rule that delete any email marked as SPAM in the subject.
At the user level, if mail is received automatically by the machine, you could set some cron job that periodically inspect the local mailbox and again delete mails marked as SPAM.
It's easy if your local store uses
maildir
since each email is just a file, as opposed to thembox
format which would require some more work since it's a single file.Setting up
maildir
for postfix is trivial.At the server level, using
Amavisd
will allow you to have more control over how mail is handled.Amavisd
has threshold settings where you can define an evasive action depending on the spam score given by spamassassin.For instance, anything above 15 points is put in quarantine and anything above 30 points is deleted.
There are some instructions for installing Amavisd on Ubuntu.
The point is, as far as I know,
spamassassin
's job is to identify and give spam points to emails. How you want these to be handled is not up tospamassassin
but the other modules down the chain.