我有一个邮件服务器(sendmail + dovecot + procmail + spamassassin)工作正常,对于普通邮件,对于垃圾邮件我想为每个用户创建一个名为“垃圾邮件”的文件夹并将所有垃圾邮件放在那里。我将 procmailrc 配置为这样
:0:
* ^X-Spam-Status: Yes
Spam
重新启动sendmail,但没有创建垃圾邮件文件夹并且邮件发送到...dev/null?如何自动创建垃圾邮件文件夹?
答案1
在procmail上找到解决方案
DEFAULT=/var/spool/mail/$LOGNAME/new
ORGMAIL=/var/spool/mail/$LOGNAME
MAILDIR=/var/spool/mail/$LOGNAME
DELIVER="/usr/lib/dovecot/deliver -d $LOGNAME"
LOGFILE=/root/procmail.log
VERBOSE=yes
# deliver spam to spam folder
:0
* ^X-Spam-Status: Yes
.Spam/
在鸽舍上
inbox = yes
#mailbox name {
# auto=create will automatically create this mailbox.
# auto=subscribe will both create and subscribe to the mailbox.
#auto = no
# Space separated list of IMAP SPECIAL-USE attributes as specified by
# RFC 6154: \All \Archive \Drafts \Flagged \Junk \Sent \Trash
#special_use =
#}
# These mailboxes are widely used and could perhaps be created automatically:
mailbox Drafts {
special_use = \Drafts
auto = create
}
mailbox Spam {
special_use = \Junk
auto = subscribe
}
mailbox Trash {
special_use = \Trash
auto = create
}