我正在设置dovecot + sieve插件。 我正在起诉Maildir格式。 我使用雷鸟阅读电子邮件,所以我不需要我的服务器上的networking邮件。 基本的configuration工作正常,但现在我想在sieve中添加一些规则来redirect一些邮件,比如这个例子:
require ["envelope", "fileinto"]; if envelope :is "from" "[email protected]" { fileinto "Test"; }
但筛没有find“testing”目录,所以它把它放入“收件箱”。 /var/log/syslog输出:
dovecot: lda([email protected]): Error: sieve: msgid=<[...]>: failed to store into mailbox 'Test': Mailbox doesn't exist: Test dovecot: lda([email protected]): sieve: msgid=<[...]>: stored mail into mailbox 'INBOX'
所以我尝试添加一个邮箱手动(但理想情况下,我希望它是自动的,当sieve请求一个新的邮箱)通过使用这个conf在dovecot:
namespace inbox { inbox = yes location = mailbox Drafts { auto = subscribe special_use = \Drafts } mailbox Junk { auto = subscribe special_use = \Junk } mailbox Sent { auto = subscribe special_use = \Sent } mailbox Test { auto = subscribe } mailbox Trash { auto = subscribe special_use = \Trash } prefix = }
就像这个邮箱是在收到邮件时创build的,邮件存储在~/mail/Test/new/但是我在Thunderbird中找不到文件夹/邮箱“Test”。 其他邮箱在Thunderbird中正确显示为一个文件夹,但不是新的。
我究竟做错了什么 ? 我无法find任何人使用自定义邮箱的dovecotconfiguration示例(只有几个默认的邮箱)。 这是甚至可能与鸽舍? 更好:有一种方法来自动创build邮箱时,筛需要一个新的?
使用mailbox筛选function的:create参数 (不要忘记require !):
require ["envelope", "fileinto", "mailbox"]; if envelope :is "from" "[email protected]" { fileinto :create "Test"; }
好的,埃拉特所说的正是我正在寻找的东西。 当我尝试使用:create时,我忘了require它,但现在可以工作。 服务器在接收时创build新的邮箱。
对于那些想知道的,我还发现,在雷鸟你必须右键单击您的邮箱>订阅>订阅新文件夹,以便它检查在服务器端创build的文件夹中的邮件。 它不会自动订阅那些(除非有一个选项,但我没有看到它)