Dovecot sieve - How to check which username a mail is being delivered to?

Tom Hendrikx tom at whyscream.net
Fri Feb 26 23:53:53 UTC 2016


On 26-02-16 21:44, Yannik Sembritzki wrote:
> Hi everyone,
> 
> I am looking for a way to check which mailbox an email is being
> delivered to in a global sieve filter.
> 
> After not being able to find some kind of variable that is populated by
> dovecot automatically, I tried to use the `Delivered-To` header.
> I tried a check like this:
> 
>     header :is "delivered-to" "<user at domain.org>"
> 

You're probably better off using envelope recipient:

envelope :is "to" "recipient at example.org"

Regards,
	Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://dovecot.org/pipermail/dovecot/attachments/20160227/aa54fc5a/attachment.sig>


More information about the dovecot mailing list