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

Yannik Sembritzki yannik at sembritzki.me
Sat Feb 27 09:42:11 UTC 2016


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

what happens when an email with multiple recipient is (RCPT TO) is
delivered over lmtp? Will 'envelope "to"' contain multiple recipients in
this case?


Am 27.02.2016 um 00:53 schrieb Tom Hendrikx:
> 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
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJW0W9vAAoJECmWCr2wpSDlu0MQAMAuSTcNEVoxuHySwsuTzqs6
pHcrTUaI9fTmooSkwAFwExUwXBgttXnEhqa+C2wgsyMDUXGki59xAwvSbREzBwL3
84uLguNSS0nC+wh1bGNK2W+jOHq9VPxcVMT/T9agsDJJfB7I5sBfebawOCUrE7c0
8J4lXv1X5xnC7FzJ9aZ9ufd65Tb2N7j3a3QezQwgj5IC69rdp7dM1Uhg+25jlvIr
8l9C8Gc7j3FszbAWFKpvKH2kSnAskYCWvMJ/zCUmf7Z5yd0KfhSAi2qWU4X1Q4oV
NAANEIUeg6wG/QxcED3N7+1pucp4X9+Kk/oTNYSh/1y0MxeiBIyOpF2CPOk9hiU5
6jswa5qc73I6lP5EcaTxW9NCcrZRxiosKTrW2j9dKbS/WywmkwXF+F8Ziy7SZG+H
0DlKNdjUnKffe7WdvqRf4cYdBOwkwPql5c0w8qj8obMZdl8X5QxErlgYH7Ugmzmp
qVg3XjPT1cGmh5CP+l2sN52Dm0EHvPvyYPhLLB0qJXQsQ7lTrnJqFxZypxtnnNwR
wCfpzu2WiaawIPZAK3TpOY6+gKXhOOMEeppVPyXmH/YiTdNuETJ2bawfFfq3YXm6
3A+vOBF72Oem9t2YKAf3N4zJFaEK2WmYIBm3WKrUEcX6bnhzJ/QYx9hAFOYwVWqc
CgPSSBIFTxtEMWM1rHsw
=/Vno
-----END PGP SIGNATURE-----



More information about the dovecot mailing list