Hi! Since the setup I use is a bit strange let's go for it first: * The system uses postfix as MTA and dovecot as LDA after alias translation by local via LMTP * The dovecot version is 2.2.5 and the pigeonhole version is 0.4.1 * The SMTP server at gentoo.org is configured to send me a backup of my emails to klondike+gentoo (at) xiscosoft.es using sendmail * The email is received by the server and then (hopefully filtered). * The email comes with two Delivered-To: headers, the first one has the correct address, the second one has the gentoo address. The interesting part of the filter is this: if envelope :detail "to" "gentoo" { addflag "\\Seen"; fileinto "gentoo"; stop; } But this doesn't seem to work, I enable debugging with the following lines: require "vnd.dovecot.debug"; require "envelope"; require "variables"; if envelope :matches "to" "*" { debug_log "envelope to `${1}'"; } if envelope :matches "from" "*" { debug_log "envelope from `${1}'"; } The relevant lines for the test e-mail I sent are these: sieve: info: started log at Dec 24 13:37:23. main script: line 9: info: DEBUG: envelope to `klondike (at) gentoo.org'. main script: line 10: info: DEBUG: envelope from `klondike (at) gentoo.org'. info: msgid=<52B97FF7.6050109@gentoo.org>: stored mail into mailbox 'INBOX'. The thing is that the to envelope should be instead klondike+gentoo (at) xiscosoft.es as show by the lmtp logs: Dec 24 13:37:23 localhost dovecot: lmtp(26249): Connect from local Dec 24 13:37:23 localhost dovecot: lmtp(26249, klondike): Cd6YHwOAuVKJZgAA0J78UA: sieve: msgid=<52B97FF7.6050109@gentoo.org>: stored mail into mailbox 'INBOX' Dec 24 13:37:23 localhost dovecot: lmtp(26249): Disconnect from local: Successful quit Dec 24 13:37:23 localhost postfix/lmtp[26248]: 657D9101E5E: to=<klondike+gentoo (at) xiscosoft.es>, relay=xiscosoft.net[private/dovecot-lmtp], delay=0.29, delays=0.05/0.03/0.03/0.18, dsn=2.0.0, status=sent (250 2.0.0 <klondike+gentoo (at) xiscosoft.es> Cd6YHwOAuVKJZgAA0J78UA Saved) I really have no idea of why sieve is behaving like this as the evelope address is sent properly by postfix's lmtp according to the logs. Any ideas? klondike PS: please do CC me when answering this e-mail as I'm not subscribed to the list yet