Aleksandar Lazic
2011-Sep-11 20:35 UTC
[Dovecot] Sieve envelope :detail "to" "xxx" does not deliver to fileinto destination
Dear Listmember. I try to migrate from my current courier-mta setup fo postfix dovecot setup. I use the following scirpt to filter to the destination mailbox. ### /var/vmail/none.at/al/sieve/lists.sieve require ["fileinto", "subaddress", "envelope" ]; if envelope :detail "to" "pdnsusers" { fileinto "Lists.pdnsusers"; } ### postfix/master ### dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -a ${original_recipient} # flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -m ${extension} -a ${original_recipient} ### Log ### Sep 11 21:47:48 lvps46-163-74-15 postfix/smtpd[7788]: connect from Sep 11 21:48:12 lvps46-163-74-15 postfix/smtpd[7788]: 495EF9FECAF9: Sep 11 21:48:27 lvps46-163-74-15 postfix/cleanup[7795]: 495EF9FECAF9: message-id=<> Sep 11 21:48:27 lvps46-163-74-15 postfix/qmgr[7785]: 495EF9FECAF9: from=<al at bitrace.net>, size=268, nrcpt=1 (queue active) Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda: Debug: Loading modules from directory: /usr/lib/dovecot/modules Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda: Debug: Module loaded: /usr/lib/dovecot/modules/lib90_sieve_plugin.so Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda: Debug: auth input: al at none.at uid=5000 gid=5000 home=/var/vmail/none.at/al Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: Effective uid=5000, gid=5000, home=/var/vmail/none.at/al Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: maildir: root exists (/var/vmail/none.at/al/Maildir) Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: maildir++: root=/var/vmail/none.at/al/Maildir, index=, control=, inbox=/var/vmail/none.at/al/Maildir, altSep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: none: root=, index=, control=, inbox=, altSep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: Destination address: al-pdnsuser at none.at (source: -a parameter) Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: sieve: using sieve path for user's script: /var/vmail/none.at/al/.dovecot.sieve Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: sieve: opening script /var/vmail/none.at/al/.dovecot.sieve Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: sieve: script binary /var/vmail/none.at/al/.dovecot.svbin successfully loaded Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: sieve: binary save: not saving binary /var/vmail/none.at/al/.dovecot.svbin, because it is already stored Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): Debug: sieve: executing script from /var/vmail/none.at/al/.dovecot.svbin Sep 11 21:48:27 lvps46-163-74-15 dovecot: lda(al at none.at): sieve: msgid=unspecified: stored mail into mailbox 'INBOX' Sep 11 21:48:27 lvps46-163-74-15 postfix/pipe[7797]: 495EF9FECAF9: to=<al-pdnsuser at none.at>, relay=dovecot, delay=28, delays=28/0.02/0/0.22, dsn=2.0.0, status=sent (delivered via dovecot service) Sep 11 21:48:27 lvps46-163-74-15 postfix/qmgr[7785]: 495EF9FECAF9: removed Sep 11 21:48:28 lvps46-163-74-15 postfix/smtpd[7788]: disconnect from xxx ### dovecot -n => attachment dovecot_-n Due to the fact that I'am new to dovecot and sieve I hope anybody can help the solve this issue. My target is to filter the mailinglists based on address extention or is it better to filter on to header? Is there a 'log' or 'print' command in the sieve filter or how can I write a message to the log file? Many thanks for your help BR Aleks -------------- next part -------------- # 2.0.14: /etc/dovecot/dovecot.conf # OS: Linux 2.6.18-028stab092.1 x86_64 Ubuntu 10.04.3 LTS auth_mechanisms = plain login digest-md5 cram-md5 disable_plaintext_auth = no log_timestamp = "%Y-%m-%d %H:%M:%S " mail_debug = yes mail_privileged_group = mail 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 = /etc/dovecot/dovecot-sql.conf driver = sql } protocols = imap recipient_delimiter = - service auth { unix_listener auth-userdb { group = vmail mode = 0755 user = vmail } user = root } ssl_cert = </etc/dovecot/certs/dovecot.pem ssl_cipher_list = ALL:!aNULL:!ADH:!eNULL:!LOW:!SSLv2:!EXP:!kEDH ssl_key = </etc/dovecot/private/dovecot.pem userdb { driver = passwd } userdb { args = uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes driver = static } protocol lda { mail_plugins = sieve recipient_delimiter = - }