我正在尝试让插件在 15.10 服务器上运行(我无法进行 dist-upgrade,它在 vps 上),并且在尝试将消息移入或移出我的垃圾邮件文件夹时dovecot-antispam
收到错误消息。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
这是安装的最后一部分,否则dovecot
和sieve
将按预期工作,以及amavisd-new
/ spamassassin
/等。我没有使用DSPAM
。
我在我的邮件客户端中看到的错误消息(不管哪一个,它们都显示相同的错误消息)似乎只有一个 Google 结果和Dovecot
几年前的邮件列表线程。
http://www.dovecot.org/list/dovecot/2012-September/137992.html
我也读过这个 Ask Ubuntu 帖子:
还没有运气。
15-lda.conf
:
protocol imap {
mail_plugins = $mail_plugins antispam
}
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
}
/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
我确实启用了详细日志记录,并且在我的日志中看到以下内容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([email protected]): Disconnected: Logged out in=91 out=905
为了测试并确保它正在读取配置文件,我在文件夹列表中添加了单词“垃圾”。 它不会影响任何东西。
到目前为止,我真的不知道该怎么做。你们有人成功使用过这个 Dovecot 插件吗?这是我邮件服务器拼图的最后一块。
以下是我在 Roundcube 中看到的内容:
编辑:进一步的研究让我dovecot 列表上的这个最新帖子 .... 最后发帖者放弃了,并使用了不同的方法。