[Dovecot] sieve doesn't sift yet
Hi all,
I am having difficulty getting sieve working. I created a simple set of rules which I've validated on the sieve-php page at SF. I placed this file, .dovecot.sieve, in the root of my maildir, which I understand is the default location. I also created a logfile in /var/log, but nothing has gotten written to it yet. Here is my configuration:
$ sudo dovecot -n # 1.0.13: /usr/local/etc/dovecot.conf base_dir: /var/run/dovecot/ log_path: /var/log/dovecot info_log_path: /var/log/dovecot.info ssl_disable: yes disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login verbose_proctitle: yes first_valid_gid: 0 mail_access_groups: mail mail_location: maildir:/var/spool/vmail/%n mail_debug: yes pop3_uidl_format: %08Xu%08Xv auth default: verbose: yes passdb: driver: passwd-file args: /usr/local/etc/dovecot-passwd userdb: driver: passwd userdb: driver: static args: uid=vmail gid=vmail home=/var/spool/vmail/%n
What piece of the puzzle am I still missing?
Running dovecot-sieve-1.0.2, postfix, etc under FreeBSD v7.
TIA
-- Colin Brace Amsterdam http://lim.nl
Colin Brace wrote:
Hi all,
I am having difficulty getting sieve working. I created a simple set of rules which I've validated on the sieve-php page at SF. I placed this file, .dovecot.sieve, in the root of my maildir, which I understand is the default location.
what is the root of a maildir? it is often better to give examples instead of (ambiguous) descriptions. I guess you mean the maildir itself. the expected location is the "home" directory of the user. so if the maildir is the same as the home dir, that's the right place (except that it is recommended to make the maildir a sub directory of the home dir, so that files such as the sieve script are not mixed with folders).
Note that you need to deliver with "dovecot deliver" (postfix does not do sieve) and you need to enable sieve in your configuration (see the wiki for more).
I also created a logfile in /var/log, but nothing has gotten written to it yet. Here is my configuration:
$ sudo dovecot -n # 1.0.13: /usr/local/etc/dovecot.conf base_dir: /var/run/dovecot/ log_path: /var/log/dovecot info_log_path: /var/log/dovecot.info ssl_disable: yes disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/imap-login verbose_proctitle: yes first_valid_gid: 0 mail_access_groups: mail mail_location: maildir:/var/spool/vmail/%n mail_debug: yes pop3_uidl_format: %08Xu%08Xv auth default: verbose: yes passdb: driver: passwd-file args: /usr/local/etc/dovecot-passwd userdb: driver: passwd userdb: driver: static args: uid=vmail gid=vmail home=/var/spool/vmail/%n
What piece of the puzzle am I still missing?
Running dovecot-sieve-1.0.2, postfix, etc under FreeBSD v7.
TIA
On Sun, 27 Apr 2008 02:47:18 +0200, mouss <mouss@netoyen.net> wrote:
what is the root of a maildir? it is often better to give examples instead of (ambiguous) descriptions.
Ah, sorry, thought it was obvious in the config output. At the moment, I am using this, because this is the way I originally configured it when I set up Postfix: /var/spool/vmail/colin This is where I have my .dovecot.sieve, in conformance, I hope, with that what is written in the wiki:
"If you do not define sieve variable and do not return it from extra field then by default .dovecot.sieve file from user's mail directory will be used. I.e. if user's maildir is /var/mail/virtualuser1 then user's sieve configuration will be here: /var/mail/virtualuser1/.dovecot.sieve"
In my case, would that not be /var/spool/vmail/colin, in which case I shouldn't need to define under "plugins" in "sieve" in dovecot.conf ?
Note that you need to deliver with "dovecot deliver" (postfix does not do sieve) and you need to enable sieve in your configuration (see the wiki for more).
Yes, I realize that postfix does not sieve. By "dovecot deliver", do you mean lda? This is what I have in dovecot.conf:
protocol lda { postmaster_address = postmaster /at/ lim.nl # script_path = /var/spool/vmail/%n/.dovecot.sieve mail_plugin_dir = /usr/local/lib/dovecot/lda mail_plugins = cmusieve mail_debug = yes log_path = /var/log/dovecot-deliver info_log_path = /var/log/dovecot-deliver }
As I mentioned in my original post, I haven't seen anything written to /var/log/dovecot-deliver, hence I can't figure out whether sieve is working or not.
Thanks for your help.
-- Colin Brace Amsterdam http://lim.nl
On Sun, 2008-04-27 at 09:46 +0200, Colin Brace wrote:
protocol lda { mail_debug = yes
mail_debug inside protocol lda {} does actually nothing, but dovecot -n showed you had it set outside as well. It should give enough useful output to find out the problem.
info_log_path = /var/log/dovecot-deliver
As I mentioned in my original post, I haven't seen anything written to /var/log/dovecot-deliver, hence I can't figure out whether sieve is working or not.
Nothing at all? It should always log something there. Make sure it has write permissions (like temporarily chmod a+w).
On Sun, 27 Apr 2008 21:02:53 +0300, Timo Sirainen <tss@iki.fi> wrote:
mail_debug inside protocol lda {} does actually nothing, but dovecot -n showed you had it set outside as well.
Fixed.
It should give enough useful output to find out the problem.
Nothing at all? It should always log something there. Make sure it has write permissions (like temporarily chmod a+w).
OK, I relaxed the permissions. The file is still zero bytes:
-rw-r--r-- 1 root wheel 54158 Apr 27 20:37 /var/log/dovecot -rw-rw-rw- 1 root wheel 0 Apr 27 20:15 /var/log/dovecot-deliver
Logging to /var/log/dovecot works fine. Something is must still be missing with deliver. But what?
-- Colin Brace Amsterdam http://lim.nl
On Apr 27, 2008, at 9:40 PM, Colin Brace wrote:
OK, I relaxed the permissions. The file is still zero bytes:
-rw-r--r-- 1 root wheel 54158 Apr 27 20:37 /var/log/dovecot -rw-rw-rw- 1 root wheel 0 Apr 27 20:15 /var/log/dovecot-deliver
Logging to /var/log/dovecot works fine. Something is must still be
missing with deliver. But what?
Most likely deliver is never even run then.
Timo Sirainen wrote:
Most likely deliver is never even run then.
Any suggestions on how to determine what is going wrong here?
Thanks.
-- Colin Brace Amsterdam http://lim.nl
View this message in context: http://www.nabble.com/Re%3A-sieve-doesn%27t-sift-yet-tp16926558p16927438.htm... Sent from the Dovecot mailing list archive at Nabble.com.
Timo Sirainen wrote:
Most likely deliver is never even run then.
Do I need to add an entry to Postfix's main.conf? Something like this?
dovecot unix - n n - - pipe flags=DRhu user=mail argv=/usr/lib/dovecot/mail/deliver -f ${sender} -d ${recipient}
-- Colin Brace Amsterdam http://lim.nl
View this message in context: http://www.nabble.com/Re%3A-sieve-doesn%27t-sift-yet-tp16926558p16927445.htm... Sent from the Dovecot mailing list archive at Nabble.com.
cbrace wrote:
Do I need to add an entry to Postfix's main.conf?
Sorry, I meant master.conf.
-- Colin Brace Amsterdam http://lim.nl
View this message in context: http://www.nabble.com/Re%3A-sieve-doesn%27t-sift-yet-tp16926558p16927446.htm... Sent from the Dovecot mailing list archive at Nabble.com.
cbrace wrote:
Timo Sirainen wrote:
Most likely deliver is never even run then.
Do I need to add an entry to Postfix's main.conf? Something like this?
dovecot unix - n n - - pipe flags=DRhu user=mail argv=/usr/lib/dovecot/mail/deliver -f ${sender} -d ${recipient}
(I know you meant to master.cf).
if you enable extensions in postfix, you can replace -d ${recipient} with -d ${user}@${nexthop} -n -m ${extension} with recent postfix, you can use ${domain} instead of ${nexthop}. see pipe manpage.
now this only defines a dovecot transport. you still need to use it for delivery. how to do this depends on domain classes (local or virtual). for example, to use it for virtual delivery, just run # postconf -e virtual_transport=dovecot
or you can manually edit main.cf but make sure to remove or comment out a "duplicate" setting (last setting wins).
participants (5)
-
cbrace
-
Colin Brace
-
mouss
-
Pascal Volk
-
Timo Sirainen