这是我当前的过滤器:
require ["vacation"];
# rule:[Filter Test]
if allof (exists "from")
{
vacation :days 365 :addresses "[email protected]" :subject "Mailbox disabled" :from "[email protected]" text:
The mailbox [email protected] is no longer active. Please reply to this message and request the new address.
Thank you.
我观察到它可以工作一次,并且回复会返回给发件人。任何后续电子邮件都不会收到回复。如果我从另一个邮箱发送消息,它会收到回复。什么可能导致这种行为?
因此,我真正想要的是每次收到消息时都会发送的自动回复。Roundcube 有一个名为“回复”的配置选项,我以为它可以做到这一点,但它没有效果。我已将此事发布到 Roundcube 社区。
另一更新
这真是令人困惑。几个小时后,我决定修改脚本。现在我又收到消息“sieve:用户存储中没有活动脚本”,这正是我最初发帖的原因。
更新
我最终在 /etc/dovecot/conf.d/90-sieve.conf 中注释掉了用户脚本位置。执行此操作后,我在 Roundcube 中创建的所有过滤器都可以正常工作。
那么,该规范的目的是什么,默认值是什么
我是 ManagedSieved 的新手。调试日志显示用户没有个人脚本。我已将用户脚本位置指定为:
sieve = /var/mail/vhosts/%d/%u/sieve/*.sieve
这不起作用。当我使用 Roundcube 创建过滤器时,它位于此处:
/var/mail/vhosts/vietfeir.com/dennis_gray/sieve
该文件的名称是 roundcube.sieve
现在我该如何设置用户脚本位置以指向那里?我还无法找出正确的语法。
我有以下由 Roundcube 创建的测试脚本。它的名字是 roundcube.sieve:
# rule:[Redirect Test]
if allof (header :contains "subject" "redirect")
{
redirect "[email protected]";
}
我已打开调试并在日志中看到如下消息:
Apr 17 10:11:10 lmtp([email protected]): Debug: 0B58A06ZtlzrbAAAywx1xA: sieve: file storage: Storage path
`/var/mail/vhosts/vietfeir.com/d0325mgray/.dovecot.sieve' not found
Apr 17 10:11:10 lmtp([email protected]): Debug: 0B58A06ZtlzrbAAAywx1xA: sieve: User has no active script i
n storage `/var/mail/vhosts/vietfeir.com/d0325mgray/sieve'
Apr 17 10:11:10 lmtp([email protected]): Debug: 0B58A06ZtlzrbAAAywx1xA: sieve: User has no personal script
我创建的 Roundcube 脚本肯定存储在用户路径中,所以我不知道为什么它会报告不是这样。
before.sieve 脚本正在执行,没有问题。
dovecot -n 的输出:
# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.21 (92477967)
# OS: Linux 4.15.0-47-generic x86_64 Ubuntu 18.04.2 LTS ext4
auth_mechanisms = plain login
log_path = /var/log/dovecot.log
mail_location = maildir:/var/mail/vhosts/%d/%n/
mail_privileged_group = mail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapflags notify
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Spam {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
args = /etc/dovecot/deny-users
deny = yes
driver = passwd-file
}
passdb {
args = /etc/dovecot/dovecot-sql.conf.ext
driver = sql
}
plugin {
sieve_before = /var/mail/before.sieve
sieve_extensions = +notify +imapflags
sieve_trace_dir = /var/mail
sieve_trace_level = matching
}
postmaster_address = [email protected]
protocols = imap lmtp sieve
service auth-worker {
user = vmail
}
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0666
user = postfix
}
unix_listener auth-userdb {
mode = 0600
user = vmail
}
user = dovecot
}
service imap-login {
inet_listener imap {
port = 0
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
service pop3-login {
inet_listener pop3 {
port = 0
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
ssl = required
ssl_cert = </etc/letsencrypt/live/civicrm.vietfeir.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_key = # hidden, use -P to show it
userdb {
driver = passwd
}
userdb {
args = uid=vmail gid=vmail home=/var/mail/vhosts/%d/%n
driver = static
}
protocol lmtp {
mail_plugins = " sieve sieve"
}
protocol lda {
mail_plugins = " sieve"
}
答案1
我很满意,现在我理解了这些过滤器的工作原理。当我用 Roundcube 创建过滤器时,它会将其放在
/var/mail/vhosts/[domain]/[user]/sieve/roundtree.sieve
然后它在
/var/mail/vhosts/[domain]/[user]/.dovecot.sieve
然后,在第一次调用过滤器时,它会被编译成同一目录中的 .dovecot.svbin。
现在我可以认为这件事已经结束了。