[Dovecot] Sieve isn't working
Hi,
I tried to get Sieve plugin running but I don't get it to work and actually have no idea what's wrong.
My dovecot version is 1.2.12 and dovecot -n prints this:
# 1.2.12: /usr/local/etc/dovecot.conf # OS: Linux 2.6.18-028stab064.7 i686 openSUSE 11.1 (i586) reiserfs log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.log disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 110 last_valid_uid: 110 mail_location: maildir:/var/qmail/mailnames/%d/%n/Maildir fsync_disable: yes lda: postmaster_address: postmaster@code-factory.de mail_plugins: sieve mail_plugin_dir: /usr/local/lib/dovecot/lda fsync_disable: no auth default: passdb: driver: passwd-file args: /usr/local/etc/passwd.dovecot userdb: driver: passwd userdb: driver: static args: uid=popuser gid=popuser plugin: sieve: /var/mail/mydomain/.dovecot.sieve sieve_global_path: /var/lib/dovecot/sieve/default.sieve sieve_dir: /var/mail/mydomain/sieve sieve_global_dir: /var/lib/dovecot/sieve/global/
For testing purposes I created a very simple /var/mail/mydomain/.dovecot.sieve with the following content:
require ["fileinto", "regex"];
if address :is "from" "test@test.de" { fileinto "INBOX.Webi"; stop; }
Then I sent a mail from test@test.de (the real address is ommitted here) to my mail account, but the mail is not moved to the subfolder Webi. In the log files there's no single hint what's going on. And in /var/mail/mydomain there's no .dovecot.sieve.log file. This directory is owned by popuser and that user has rights for reading and writing to this directory (and read rights for .dovecot.sieve), therefore it should not be a rights problem.
Does anybody has suggestions what could be the cause of this?
Sincerely, Steven
On 06/19/2010 05:24 PM Steven Weiß wrote:
# 1.2.12: /usr/local/etc/dovecot.conf # OS: Linux 2.6.18-028stab064.7 i686 openSUSE 11.1 (i586) reiserfs log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.log disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 110 last_valid_uid: 110 mail_location: maildir:/var/qmail/mailnames/%d/%n/Maildir fsync_disable: yes lda: postmaster_address: postmaster@code-factory.de mail_plugins: sieve mail_plugin_dir: /usr/local/lib/dovecot/lda fsync_disable: no auth default: passdb: driver: passwd-file args: /usr/local/etc/passwd.dovecot userdb: driver: passwd userdb: driver: static args: uid=popuser gid=popuser plugin: sieve: /var/mail/mydomain/.dovecot.sieve sieve_global_path: /var/lib/dovecot/sieve/default.sieve sieve_dir: /var/mail/mydomain/sieve sieve_global_dir: /var/lib/dovecot/sieve/global/
Enable mail_debug, at least in the protocol lda {} section. That will log information like module loading and what the sieve plugin wants and finds/gets.
For testing purposes I created a very simple /var/mail/mydomain/.dovecot.sieve with the following content:
require ["fileinto", "regex"];
if address :is "from" "test@test.de" { fileinto "INBOX.Webi"; stop; }
Then I sent a mail from test@test.de (the real address is ommitted here) to my mail account, but the mail is not moved to the subfolder Webi. In the log files there's no single hint what's going on. And in /var/mail/mydomain there's no .dovecot.sieve.log file. This directory is owned by popuser and that user has rights for reading and writing to this directory (and read rights for .dovecot.sieve), therefore it should not be a rights problem.
Does anybody has suggestions what could be the cause of this?
Also check your mail log, after enabling mail_debug.
Regards, Pascal
The trapper recommends today: deadbeef.1017018@localdomain.org
Hi Pascal,
thanks for the quick reply.
I enabled mail_debug and restarted dovecot, but still no entry in the log file. I assume that deliver isn't properly set up. I'm using qmail and configured /var/qmail/control/defaultdelivery as follows:
| /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
Running ps aux | grep "deliver" gives me this: qmail-lspawn | /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
I checked both paths of preline and deliver and they're correct. And I use the fixed mail address passed as -d as seen above. The user is set up in the static userdb file: mymail@mydomain.de:{PLAIN}mypasswd
As I understood the mechanics of qmail / deliver interaction it looks correct to me. But something must be wrong :-(
Greetings, Steven
Am 19.06.2010 19:00, schrieb Pascal Volk:
On 06/19/2010 05:24 PM Steven Weiß wrote:
# 1.2.12: /usr/local/etc/dovecot.conf # OS: Linux 2.6.18-028stab064.7 i686 openSUSE 11.1 (i586) reiserfs log_path: /var/log/dovecot.log info_log_path: /var/log/dovecot.log disable_plaintext_auth: no login_dir: /usr/local/var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login first_valid_uid: 110 last_valid_uid: 110 mail_location: maildir:/var/qmail/mailnames/%d/%n/Maildir fsync_disable: yes lda: postmaster_address: postmaster@code-factory.de mail_plugins: sieve mail_plugin_dir: /usr/local/lib/dovecot/lda fsync_disable: no auth default: passdb: driver: passwd-file args: /usr/local/etc/passwd.dovecot userdb: driver: passwd userdb: driver: static args: uid=popuser gid=popuser plugin: sieve: /var/mail/mydomain/.dovecot.sieve sieve_global_path: /var/lib/dovecot/sieve/default.sieve sieve_dir: /var/mail/mydomain/sieve sieve_global_dir: /var/lib/dovecot/sieve/global/
Enable mail_debug, at least in the protocol lda {} section. That will log information like module loading and what the sieve plugin wants and finds/gets.
For testing purposes I created a very simple /var/mail/mydomain/.dovecot.sieve with the following content:
require ["fileinto", "regex"];
if address :is "from" "test@test.de" { fileinto "INBOX.Webi"; stop; }
Then I sent a mail from test@test.de (the real address is ommitted here) to my mail account, but the mail is not moved to the subfolder Webi. In the log files there's no single hint what's going on. And in /var/mail/mydomain there's no .dovecot.sieve.log file. This directory is owned by popuser and that user has rights for reading and writing to this directory (and read rights for .dovecot.sieve), therefore it should not be a rights problem.
Does anybody has suggestions what could be the cause of this?
Also check your mail log, after enabling mail_debug.
Regards, Pascal
On 06/19/2010 07:18 PM Steven Weiß wrote:
Hi Pascal,
thanks for the quick reply.
I enabled mail_debug and restarted dovecot, but still no entry in the log file. I assume that deliver isn't properly set up. I'm using qmail and configured /var/qmail/control/defaultdelivery as follows:
| /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
Running ps aux | grep "deliver" gives me this: qmail-lspawn | /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
I checked both paths of preline and deliver and they're correct. And I use the fixed mail address passed as -d as seen above. The user is set up in the static userdb file: mymail@mydomain.de:{PLAIN}mypasswd
As I understood the mechanics of qmail / deliver interaction it looks correct to me. But something must be wrong :-(
Please stop top-posting.
Qmail‽
Fist configure a 'master socket', so deliver will be able to perform user lookups. see http://wiki.dovecot.org/LDA#Virtual_users
Then save a message as /tmp/testmail Finally execute:
/usr/local/libexec/dovecot/deliver -d <recipient> -f <envelopesender> </tmp/testmail
Don't forget to check your logs.
Regards, Pascal
The trapper recommends today: cafefeed.1017019@localdomain.org
Am 19.06.2010 19:30, schrieb Pascal Volk:
On 06/19/2010 07:18 PM Steven Weiß wrote:
Hi Pascal,
thanks for the quick reply.
I enabled mail_debug and restarted dovecot, but still no entry in the log file. I assume that deliver isn't properly set up. I'm using qmail and configured /var/qmail/control/defaultdelivery as follows:
| /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
Running ps aux | grep "deliver" gives me this: qmail-lspawn | /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
I checked both paths of preline and deliver and they're correct. And I use the fixed mail address passed as -d as seen above. The user is set up in the static userdb file: mymail@mydomain.de:{PLAIN}mypasswd
As I understood the mechanics of qmail / deliver interaction it looks correct to me. But something must be wrong :-(
Please stop top-posting.
My apologies for that, I'm new on a mailing list.
Qmail‽
Fist configure a 'master socket', so deliver will be able to perform user lookups. see http://wiki.dovecot.org/LDA#Virtual_users
Then save a message as /tmp/testmail Finally execute:
/usr/local/libexec/dovecot/deliver -d<recipient> -f<envelopesender> </tmp/testmail
Don't forget to check your logs.
With the manual call it worked. In the log files I can see that the sieve script was loaded and executed and the test mail was stuffed into the right folder.
The only problem now is that deliver isn't called from qmail. Do you have any idea why that's the case? I did everything as explained in the Wiki.
Greetings, Steven
Am 19.06.2010 19:30, schrieb Pascal Volk:
On 06/19/2010 07:18 PM Steven Weiß wrote:
Hi Pascal,
thanks for the quick reply.
I enabled mail_debug and restarted dovecot, but still no entry in the log file. I assume that deliver isn't properly set up. I'm using qmail and configured /var/qmail/control/defaultdelivery as follows:
| /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
Running ps aux | grep "deliver" gives me this: qmail-lspawn | /var/qmail/bin/preline -f /usr/local/libexec/dovecot/deliver -d mymail@mydomain.de
I checked both paths of preline and deliver and they're correct. And I use the fixed mail address passed as -d as seen above. The user is set up in the static userdb file: mymail@mydomain.de:{PLAIN}mypasswd
As I understood the mechanics of qmail / deliver interaction it looks correct to me. But something must be wrong :-(
Please stop top-posting.
Qmail‽
Fist configure a 'master socket', so deliver will be able to perform user lookups. see http://wiki.dovecot.org/LDA#Virtual_users
Then save a message as /tmp/testmail Finally execute:
/usr/local/libexec/dovecot/deliver -d<recipient> -f<envelopesender> </tmp/testmail
Don't forget to check your logs.
Wholy crap, I got it :-) In the maildir there was a .qmail file which overwrote the qmail delivery specified in the defaultdelivery file...I was migrating from qmail/courier to qmail/dovecot and didn't know of that file.
Thanks for your help!
Greetings, Steven
participants (2)
-
Pascal Volk
-
Steven Weiß