[Dovecot] Sieve script does not run in dovecot 2.0 on squeeze
Hi,
I want to use Sieve filtering with my Dovecot 2.0.20 installation on Debian squeeze.
ManageSieve works fine so far, I can edit and activate/deactive scripts (using Thunderbird + Plugin) and they show up in the filesystem where I expect them to be, see below.
# ls -la /home/k2009999/ total 16 drwxr-xr-x 4 k2009999 mail 4096 Apr 30 10:46 . drwxr-xr-x 4 root root 4096 Apr 24 17:04 .. drwx------ 7 k2009999 Domain Users 4096 Apr 30 10:56 Maildir lrwxrwxrwx 1 k2009999 Domain Users 21 Apr 30 10:46 currently-active-script.sieve -> sieve/outoffice.sieve drwxr-xr-x 3 k2009999 mail 4096 May 2 16:44 sieve
ls -la /home/k2009999/sieve/ total 16 drwxr-xr-x 3 k2009999 mail 4096 May 2 16:44 . drwxr-xr-x 4 k2009999 mail 4096 Apr 30 10:46 .. -rw-r--r-- 1 k2009999 mail 36 Apr 26 17:21 outoffice.sieve drwxr-xr-x 2 k2009999 Domain Users 4096 May 2 16:44 tmp
#less outoffice.sieve redirect "user@dominio.uk";
In dovecot.conf I have
mail_location = maildir:~/Maildir
plugin { quota = dirsize sieve=~/currently-active-script.sieve sieve_dir=~/sieve sieve_storage=~/sieve }
protocols = imap sieve
protocol sieve { managesieve_logout_format = bytes ( in=%i : out=%o ) }
service managesieve-login { user = dovecot inet_listener sieve { port = 4190 } process_limit = 2000 }
userdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap }
In postfix I have
home_mailbox = Maildir/
the problem is that the script does not run and so the mail is delivered the initial recipient.
I use LDAP to delivery the mail.
any idea. Thank you.
Th. Victor Oñate
On 05/03/2012 04:54 AM, Victor Oñate wrote:
In dovecot.conf I have
mail_location = maildir:~/Maildir
plugin { quota = dirsize sieve=~/currently-active-script.sieve sieve_dir=~/sieve sieve_storage=~/sieve }
protocols = imap sieve
protocol sieve { managesieve_logout_format = bytes ( in=%i : out=%o ) }
service managesieve-login { user = dovecot inet_listener sieve { port = 4190 } process_limit = 2000 }
userdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap }
After you have fixed your Postfix configuration (see below), you probably need to add:
protocol lda { mail_plugins = $mail_plugins sieve }
In postfix I have
home_mailbox = Maildir/
You need to configure Postfix to use local delivery agent (LDA) which supports sieve, such as Dovecot's LDA with sieve plugin. Have a look at: http://wiki.dovecot.org/LDA/Postfix
the problem is that the script does not run and so the mail is delivered the initial recipient.
I use LDAP to delivery the mail.
any idea. Thank you.
Hope this helps.
-- Janne Snabb / EPIPE Communications snabb@epipe.com - http://epipe.com/
Hi.
thanks.. I fixed my Postfix configuration, this are a lines add in my main.cf
# Configuración LDAP
dovecot_destination_recipient_limit = 1 virtual_transport = dovecot
virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cfg ldap:/etc/postfix/ldap-aliases.cfg.ext virtual_alias_recursion_limit = 10000 virtual_alias_expansion_limit = 10000 transport_maps = ldap:/etc/postfix/ldap-transport.cfg
and my master.cf add
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -f ${sender} -d ${recipient}
and my dovecot.conf add
protocol lda { mail_plugins = $mail_plugins sieve }
but the script still does not run. see the logs
May 3 09:27:41 correo-s postfix/tlsmgr[16984]: warning: request to update table btree:/var/spool/postfix/smtpd_scache in non-postfix directory /var/spool/postfix May 3 09:27:41 correo-s postfix/tlsmgr[16984]: warning: redirecting the request to postfix-owned data_directory /var/lib/postfix May 3 09:27:41 correo-s postfix/tlsmgr[16984]: warning: request to update table btree:/var/spool/postfix/smtp_scache in non-postfix directory /var/spool/postfix May 3 09:27:41 correo-s postfix/tlsmgr[16984]: warning: redirecting the request to postfix-owned data_directory /var/lib/postfix May 3 09:27:41 correo-s postfix/smtpd[16982]: connect from server[X.X.X.X] May 3 09:27:41 correo-s postfix/smtpd[16982]: 5B38216EE: client=cliente[X.X.X.x] May 3 09:27:41 correo-s postfix/cleanup[16986]: 5B38216EE: message-id=4FA28EDD.90702@dominio.uk May 3 09:27:41 correo-s postfix/smtpd[16982]: disconnect from server[X.X.X.X] May 3 09:27:41 correo-s postfix/qmgr[16893]: 5B38216EE: from=user1@dominio.uk, size=846, nrcpt=1 (queue active) May 3 09:27:41 correo-s postfix/local[16987]: 5B38216EE: to=user2@dominio.uk, relay=local, delay=0.04, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir) May 3 09:27:41 correo-s postfix/qmgr[16893]: 5B38216EE: removed 2012-05-03 09:27:45 auth: Warning: userdb(k2009999,10.40.21.50): Multiple values found for 'Maildir', using value 'user2@dominio.uk'
As you can see the mail is delivered correctly to the destination without taking intoaccount the sieve script
I use ldap as a backend user then I think we should do something in the file .
transport_maps = ldap:/etc/postfix/ldap-transport.cfg
this is my dap-transport.cfg file:
bind = no version = 3 timeout = 20 start_tls = no tls_require_cert = no server_host = ldap://server-ldap.uk scope = sub search_base = dc=domain,dc=uk query_filter = (&(mail=%s)(!(maildrop=mail-squeeze.dominio.uk))) result_format = smtp:[%s] result_attribute = maildrop debuglevel = 0 dereference = 3
Any idea. Thank you. Victor Oñate
2012/5/3 Janne Snabb snabb@epipe.com:
On 05/03/2012 04:54 AM, Victor Oñate wrote:
In dovecot.conf I have
mail_location = maildir:~/Maildir
plugin { quota = dirsize sieve=~/currently-active-script.sieve sieve_dir=~/sieve sieve_storage=~/sieve }
protocols = imap sieve
protocol sieve { managesieve_logout_format = bytes ( in=%i : out=%o ) }
service managesieve-login { user = dovecot inet_listener sieve { port = 4190 } process_limit = 2000 }
userdb { args = /etc/dovecot/dovecot-ldap.conf driver = ldap }
After you have fixed your Postfix configuration (see below), you probably need to add:
protocol lda { mail_plugins = $mail_plugins sieve }
In postfix I have
home_mailbox = Maildir/
You need to configure Postfix to use local delivery agent (LDA) which supports sieve, such as Dovecot's LDA with sieve plugin. Have a look at: http://wiki.dovecot.org/LDA/Postfix
the problem is that the script does not run and so the mail is delivered the initial recipient.
I use LDAP to delivery the mail.
any idea. Thank you.
Hope this helps.
-- Janne Snabb / EPIPE Communications snabb@epipe.com - http://epipe.com/
participants (2)
-
Janne Snabb
-
Victor Oñate