Hi all,
Similar to someone who posted here yesterday, I am having trouble getting
sieve filters working.
I have installed pigeonhole. I can create, edit, and save scripts from both
the Thunderbird sieve extension as well as the Roundcube sieve plugin via
managesieve running on port 4190. The .sieve file is properly saved in
~/sieve with a symlink from ~/.dovecot.sieve.
But the filters are not being invoked on incoming mail. I have mail_debug
enabled, but I don't see anything useful in /var/log/dovecot.
Anyone have any ideas?
Thanks
$ dovecot -n
# 2.0.11: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.1-RELEASE amd64 ufs
auth_verbose = yes
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
first_valid_gid = 0
info_log_path = /var/log/dovecot
log_path = /var/log/dovecot
mail_access_groups = mail
mail_debug = yes
mail_location = maildir:/home/colin/vmail/%d/%n
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
passdb {
args = /usr/local/etc/dovecot-passwd
driver = passwd-file
}
plugin/sieve = ~/.dovecot.sieve
plugin/sieve_dir = ~/sieve
plugin/sieve_global_dir = /var/lib/dovecot/sieve/global/
plugin/sieve_global_path = /var/lib/dovecot/sieve/default.sieve
protocols = imap sieve
service auth {
unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
}
unix_listener auth-master {
group = mail
mode = 0660
user = vmail
}
user = root
}
service imap-login {
executable = /usr/local/libexec/dovecot/imap-login
vsz_limit = 64 M
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
service pop3-login {
executable = /usr/local/libexec/dovecot/imap-login
vsz_limit = 64 M
}
ssl_cert = </etc/ssl/venus.crt
ssl_key = </etc/ssl/venus.key
userdb {
driver = passwd
}
userdb {
args = uid=vmail gid=vmail home=/home/colin/vmail/%d/%n
driver = static
}
verbose_proctitle = yes
protocol lda {
mail_plugins = sieve
}
-----
Colin Brace
Amsterdam
http://lim.nl
--
View this message in context:
http://old.nabble.com/sieve-filters-not-being-invoked-tp31569757p31569757.html
Sent from the Dovecot mailing list archive at Nabble.com.
Op 8-5-2011 11:56, Colin Brace schreef:> Hi all, > > Similar to someone who posted here yesterday, I am having trouble getting > sieve filters working. > > I have installed pigeonhole. I can create, edit, and save scripts from both > the Thunderbird sieve extension as well as the Roundcube sieve plugin via > managesieve running on port 4190. The .sieve file is properly saved in > ~/sieve with a symlink from ~/.dovecot.sieve. > > But the filters are not being invoked on incoming mail. I have mail_debug > enabled, but I don't see anything useful in /var/log/dovecot. > > Anyone have any ideas?Is your MTA storing messages using the Dovecot LDA (http://wiki2.dovecot.org/LDA) ? Check that thoroughly. Enable mail_debug to get more verbose logs. To definitively check whether Sieve is working or not, you can invoke dovecot-lda manually. If it works then, the problem most likely lies with your MTA. At my end, the logs look as follows (manual invocation, mail_debug=yes): May 9 11:08:34 host dovecot: lda: Debug: Loading modules from directory: /usr/lib/dovecot/modules May 9 11:08:34 host dovecot: lda: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_sieve_plugin.so May 9 11:08:34 host dovecot: lda(stephan): Debug: Effective uid=1011, gid=1011, home=/home/stephan May 9 11:08:34 host dovecot: lda(stephan): Debug: maildir: root exists (/home/stephan/Maildir) May 9 11:08:34 host dovecot: lda(stephan): Debug: maildir++: root=/home/stephan/Maildir, index=, control=, inbox=/home/stephan/Maildir May 9 11:08:34 host dovecot: lda(stephan): Debug: userdb lookup skipped, username taken from USER environment May 9 11:08:34 host dovecot: lda(stephan): Debug: none: root=, index=, control=, inboxMay 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: using sieve path for user's script: /home/stephan/.dovecot.sieve May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: opening script /home/stephan/.dovecot.sieve May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: script binary /home/stephan/.dovecot.svbin successfully loaded May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: binary save: not saving binary /home/stephan/.dovecot.svbin, because it is already stored May 9 11:08:34 host dovecot: lda(stephan): Debug: sieve: executing script from /home/stephan/.dovecot.svbin May 9 11:08:34 host dovecot: lda(stephan): sieve: msgid=<20090729182144.4c9baf96 at example.com>: stored mail into mailbox 'INBOX' Regards, Stephan.
On Mon, 09 May 2011 11:14:44 +0200, Stephan Bosch wrote:> Is your MTA storing messages using the Dovecot LDA > (http://wiki2.dovecot.org/LDA [1]) ? Check that thoroughly. Enable > mail_debug to get more verbose logs. To definitively check whether > Sieve > is working or not, you can invoke dovecot-lda manually. If it works > then, the problem most likely lies with your MTA.Thanks, I am almost there. It turns out I was missing this line from Postfix master.cf: dovecot unix - n n - - pipe flags=DRhu user=vmail:mail argv=/usr/local/libexec/dovecot/deliver -d ${recipient} In the dovecot-lda log, I am now seeing some action, but there is a permissions problem somewhere: May 09 12:43:13 lda: Debug: Loading modules from directory: /usr/local/lib/dovecot May 09 12:43:13 lda: Debug: Module loaded: /usr/local/lib/dovecot/lib90_sieve_plugin.so May 09 12:43:13 lda: Error: userdb lookup: connect(/var/run/dovecot//auth-userdb) failed: Permission denied (euid=200(vmail) egid=6(mail) missing +w perm: /var/run/dovecot//auth-userdb, euid is not dir owner) May 09 12:43:13 lda: Fatal: Internal error occurred. Refer to server log for more information. Any idea where the problem is? -- Colin Brace Amsterdam http://lim.nl Links: ------ [1] http://wiki2.dovecot.org/LDA [2] mailto:20090729182144.4c9baf96 at example.com
On Mon, 09 May 2011 13:00:45 +0200, Colin Brace wrote:> In thedovecot-lda log, I am now seeing some action, but there is a> >permissions problem somewhere:> > May 09 12:43:13 lda: Debug: Loadingmodules from directory:> /usr/local/lib/dovecot > May 09 12:43:13 lda:Debug: Module loaded:> /usr/local/lib/dovecot/lib90_sieve_plugin.so >May 09 12:43:13 lda: Error: userdb lookup:>connect(/var/run/dovecot//auth-userdb) failed: Permission denied>(euid=200(vmail) egid=6(mail) missing +w perm:>/var/run/dovecot//auth-userdb, euid is not dir owner)> May 09 12:43:13lda: Fatal: Internal error occurred. Refer to server> log for moreinformation. Following up my earlier mail, perhaps I am being obtuse here; I've changed the permissions of auth-userdb to 666, although I have no idea what these files in /var/run/dovecot are. These appears to solve the problem above. Renabling dovecot lda in Postfix, I try sending myself a message; however it gets bounced: "user unknown" (/var/log/maillog): [...] May 9 17:33:08 venus postfix/pipe[73445]: 8BCF629F3F: to=, relay=dovecot, delay=0.34, delays=0.3/0/0/0.03, dsn=5.1.1, status=bounced (user unknown) May 9 17:33:08 venus postfix/cleanup[73442]: C61332A0AB: message-idMay 9 17:33:08 venus postfix/bounce[73447]: 8BCF629F3F: sender non-delivery notification: C61332A0AB May 9 17:33:08 venus postfix/qmgr[73435]: C61332A0AB: from=, size=3183, nrcpt=1 (queue active) May 9 17:33:08 venus postfix/qmgr[73435]: 8BCF629F3F: removed May 9 17:33:08 venus postfix/smtpd[73444]: disconnect from localhost[127.0.0.1] May 9 17:33:08 venus postfix/lmtp[73443]: C5E4729ED5: to=, relay=venus[/var/run/dspam.sock], delay=1.1, delays=0.45/0/0/0.61, dsn=2.6.0, status=sent (250 2.6.0 Message accepted for delivery) May 9 17:33:08 venus postfix/qmgr[73435]: C5E4729ED5: removed If I comment out this line in main.cf, and restart Postfix, things work again: # virtual_transport = dovecot Any ideas on what is going wrong here? I feel I am almost there. -- Colin Brace Amsterdam http://lim.nl -- Colin Brace Amsterdam http://lim.nl