我配置了一个邮件服务器(spamassassin+procmail+sendmail+dovecot) 我希望将所有垃圾邮件重定向到我设置的垃圾邮件文件夹 /etc/procmail
DEFAULT=/var/spool/mail/$LOGNAME/new
ORGMAIL=/var/spool/mail/$LOGNAME
MAILDIR=/var/spool/mail/$LOGNAME
# 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 = create
}
mailbox Trash {
special_use = \Trash
auto = create
}
当我发送垃圾邮件进行测试时,它不会在 Thunderbird 上自动创建文件夹,并且我看到该文件夹(存在于系统上)具有 root 权限而不是用户权限,当然如果在另一封邮件发送后执行 chown 返回到原始权限(根!)
DROPPRIVS=yes
在开头添加/etc/procmailrc
man procmailrc
:找到的解决方案:
变成了
现在它可以工作了