“未配置反垃圾邮件插件”

Tac*_*Bob 16 server mail dovecot spamassassin

我正在尝试让dovecot-antispam插件在 15.10 服务器上运行(我无法进行升级,它在 vps 上)并且anti spam plugin not configured在尝试将邮件移入或移出垃圾邮件文件夹时收到错误消息。

dovecot-antispam Version: 2.0+20130822-2build1
dovecot-core Version: 1:2.2.9-1ubuntu5
dovecot-sieve Version: 1:2.2.9-1ubuntu5
Run Code Online (Sandbox Code Playgroud)

这是安装的最后一部分,否则dovecot和/ /etcsieve一起按预期工作。我没有使用.amavisd-newspamassassinDSPAM

我在邮件客户端中看到的错误消息(不管是哪一个,它们都显示相同的错误消息)似乎只有一个 Google 结果,以及Dovecot几年前的邮件列表线程。

http://www.dovecot.org/list/dovecot/2012-September/137992.html

我还阅读了这个 Ask Ubuntu 线程:

带有反垃圾邮件插件的 dovecot

还没有运气。

15-lda.conf

protocol imap {
    mail_plugins = $mail_plugins antispam
}
Run Code Online (Sandbox Code Playgroud)

90-antispam.conf

plugin {
    antispam_backend = pipe
    antispam_signature = X-Spam-Flag
    antispam_signature_missing = error

    antispam_trash = trash;Garbage;Trash;Deleted Items;Deleted Messages
    antispam_trash_pattern = trash;Trash;Deleted *
    antispam_trash_pattern_ignorecase = TRASH

    antispam_spam = Spam;Junk
    antispam_spam_pattern = spam;Spam;junk;Junk
    antispam_spam_pattern_ignorecase = SPAM;JUNK

    antispam_pipe_tmpdir = /var/tmp
    antispam_pipe_program = /usr/bin/sa-learn-pipe.sh

    antispam_debug_target = syslog
    antispam_verbose_debug = 1
}
Run Code Online (Sandbox Code Playgroud)

/usr/bin/sa-learn-pipe.sh

#!/bin/bash

echo /usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt
echo "$$-start ($*)" >> /tmp/sa-learn-pipe.log

#echo $* > /tmp/sendmail-parms.txt
cat<&0 >> /tmp/sendmail-msg-$$.txt

/usr/bin/sa-learn $* /tmp/sendmail-msg-$$.txt && rm -f /tmp/sendmail-msg-$$.txt &

echo "$$-end" >> /tmp/sa-learn-pipe.log

exit 0
Run Code Online (Sandbox Code Playgroud)

我确实启用了详细日志记录,并且在我的文件中看到以下内容syslog

Jun  3 22:08:23 pile imap: antispam: plugin initialising (2.0-notgit)
Jun  3 22:08:23 pile imap: antispam: verbose debug enabled
Jun  3 22:08:23 pile imap: antispam: "Spam" is exact match spam folder
Jun  3 22:08:23 pile imap: antispam: "Junk" is exact match spam folder
Jun  3 22:08:23 pile imap: antispam: "spam" is wildcard match spam folder
Jun  3 22:08:23 pile imap: antispam: "Spam" is wildcard match spam folder
Jun  3 22:08:23 pile imap: antispam: "junk" is wildcard match spam folder
Jun  3 22:08:23 pile imap: antispam: "Junk" is wildcard match spam folder
Jun  3 22:08:23 pile imap: antispam: "spam" is case-insensitive wildcard match spam folder
Jun  3 22:08:23 pile imap: antispam: "junk" is case-insensitive wildcard match spam folder
Jun  3 22:08:23 pile imap: antispam: no unsure folders
Jun  3 22:08:23 pile imap: antispam: "trash" is exact match trash folder
Jun  3 22:08:23 pile imap: antispam: "Garbage" is exact match trash folder
Jun  3 22:08:23 pile imap: antispam: "Trash" is exact match trash folder
Jun  3 22:08:23 pile imap: antispam: "Deleted Items" is exact match trash folder
Jun  3 22:08:23 pile imap: antispam: "Deleted Messages" is exact match trash folder
Jun  3 22:08:23 pile imap: antispam: "trash" is wildcard match trash folder
Jun  3 22:08:23 pile imap: antispam: "Trash" is wildcard match trash folder
Jun  3 22:08:23 pile imap: antispam: "Deleted *" is wildcard match trash folder
Jun  3 22:08:23 pile imap: antispam: "trash" is case-insensitive wildcard match trash folder
Jun  3 22:08:23 pile imap: antispam: pipe backend program = /usr/bin/sa-learn-pipe.sh
Jun  3 22:08:23 pile imap: antispam: pipe backend tmpdir /var/tmp
Jun  3 22:08:23 pile dovecot: imap(user@domain.net): Disconnected: Logged out in=91 out=905
Run Code Online (Sandbox Code Playgroud)

只是为了测试并确保它正在读取配置文件,我在文件夹列表中添加了“垃圾”一词。它不影响任何事情。

在这一点上,我真的不知道该去哪里。你们有没有人让这个 Dovecot 插件成功运行?这是我的邮件服务器拼图的最后一块。

这是我在 Roundcube 中看到的:

Roundcube 生成的错误消息

编辑:进一步的研究让我找到了最近关于 dovecot 列表的帖子 ......海报最终放弃并使用了不同的方法。