[Dovecot] Dovecot - Sieve script loaded but filtering doesn't works ?
Hello,
I'm trying to install dovecot as LDA, IMAP server and Sieve functions, all of this with a Postfix, Spamassassin and a MySQL Auth.
When I use a Sieve script, it 's loaded but actions are not respect with this logs :
Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): Debug: sieve: using sieve path for user's script: /vmail/sieve/info.xx.com/info.sieve Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): Debug: sieve: opening script /vmail/sieve/info.xx.com/info.sieve Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): Debug: sieve: script binary /vmail/sieve/info.xx.com/info.svbin successfully loaded Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): Debug: sieve: binary save: not saving binary /vmail/sieve/info.xx.com/info.svbin, because it is already stored Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): Debug: sieve: executing script from /vmail/sieve/info.xx.com/info.svbin Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): sieve: msgid=20130318093119.7EAAEC063D@nflda02.xx.lan: stored mail into mailbox 'INBOX' Mar 18 10:31:19 localhost postfix/pipe[25000]: 7EAAEC063D: to=info@info.xx.com, relay=dovecot, delay=0.54, delays=0.15/0.03/0/0.37, dsn=2.0.0, status=sent (delivered via dovecot service)
The sieve script just trying to redirect to INBOX.Test folder but doesn't works..
Bellow my dovecot and postfix configuration :
# 2.0.9: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-358.0.1.el6.x86_64 x86_64 CentOS release 6.4 (Final) ext4 mail_debug = yes mail_gid = 5000 mail_location = maildir:/vmail/%d/%n:INDEX=/vmail/index/%d/%n mail_privileged_group = vmail mail_uid = 5000 mbox_write_locks = fcntl namespace { inbox = yes location = prefix = separator = . subscriptions = yes type = private } passdb { driver = pam } passdb { args = /etc/dovecot/conf.d/dovecot-sql.conf.ext driver = sql } plugin { sieve = /vmail/sieve/%d/%n.sieve sieve_dir = /vmail/sieve/%d } service auth { unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } } ssl_cert =
# /etc/postfix/master.conf alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailbox_command = /usr/libexec/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost mydomain = xx.lan myhostname = nflda02.xx.lan mynetworks = 192.168.0.0/24, 192.168.3.0/24, 127.0.0.0/8 myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550 virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /vmail/ virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_transport = dovecot virtual_uid_maps = static:5000
Sorry for this easy question, I'm new on LINUX.
Thanks in advance.
-- Clément PAULET
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 18 Mar 2013, Clement PAULET wrote:
When I use a Sieve script, it 's loaded but actions are not respect with this logs :
The sieve script just trying to redirect to INBOX.Test folder but doesn't works..
First of all, how does your script looks like?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUUcHRl3r2wJMiz2NAQKoswf/WczI0q9k0WqWzRPr7lwuBEeiQQlYBDaq Lap8YNnbxDsczxgYZ/i0gDrq7f612A0nKWHBC806DxH4dHNyUwBPYVqFAT7edvk4 ns99f4bNh6GsufC1CY5tY/1DjT5ykEzkTmaV443YH50jQ4iPnDohOMsBBRlhoWN4 8KCLCNafCYXf48QjnAfoLt4TjaxyYb//7otYJN2CqLOGbvWoJwrpNgmuhvST+PNm RQXLG1lpxzt7QMP++fTMXa6A/SwVsglhAUS6xFdAuoOBsx1jPtvA+mot9gqpi02I j2WquMsycviWprYD2FsET903TWU/5+boxg2UBOettsTqhfwABkIcvQ== =ygun -----END PGP SIGNATURE-----
Hi Clement,
Clement PAULET wrote:
When I use a Sieve script, it is loaded but actions are not respected Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): sieve: msgid=20130318093119.7EAAEC063D@nflda02.xx.lan: stored mail into mailbox 'INBOX'
If the mailbox "INBOX.Test" does not exist, the message will be delivered to mailbox "INBOX": http://wiki2.dovecot.org/LDA
Try to set the global dovecot configuration directive lda_mailbox_autocreate = yes This will always autocreate folders if they do not exist yet.
Alternatively you can use fileinto :create "INBOX.Test"; to autocreate the folder in your Sieve script.
Regards Daniel
Hi Daniel,
Thanks for your help.
In fact my problem was due to my sieve script (missing header search).
#Sieve script with missing header settings if address "To" "info@info.xx.com" { fileinto "Test"; }
#Sieve script replace with header settings if allof (header :contains "To" "info@info.xx.com") { fileinto "INBOX.Test"; stop; }
As a precautionary measure I also add the autocreate directive.
I must yet to define a specific folder for the message marked as SPAM (not a simple folder). I believe that is possible directly in dovecot configuration
Have a nice day
Clement
Le 2013-03-21 13:30, Daniel Parthey a écrit :
Hi Clement,
Clement PAULET wrote:
When I use a Sieve script, it is loaded but actions are not respected Mar 18 10:31:19 localhost dovecot: lda(info@info.xx.com): sieve: msgid=20130318093119.7EAAEC063D@nflda02.xx.lan: stored mail into mailbox 'INBOX'
If the mailbox "INBOX.Test" does not exist, the message will be delivered to mailbox "INBOX": http://wiki2.dovecot.org/LDA
Try to set the global dovecot configuration directive lda_mailbox_autocreate = yes This will always autocreate folders if they do not exist yet.
Alternatively you can use fileinto :create "INBOX.Test"; to autocreate the folder in your Sieve script.
Regards Daniel
participants (3)
-
Clement PAULET
-
Daniel Parthey
-
Steffen Kaiser