On 4/22/2011 3:23 PM, Jerry wrote:
Assume and e-mail address of: me+dove...@domain.com
I have a sieve script that sorts mail into the appropriate folders
using "+" addressing. I want to extend it to also work with mailing
list like this one. A post from the dovecot forum arrives with a
Delivered-To: me+dove...@domain.com when I receive it. The "To"
is to dovecot. I cannot figure out a way to get sieve to filter on the
"Delivered-To" portion rather than the "To" portion using plus
addressing. There are several other names; i.e, john, joe, bill, nancy,
etcetera that would have the plus suffix of (in this scenario anyway)
dovecot. Filtering on each individual address would be a real PIA. I
believe it is not supported though.
EXAMPLE:
This works fine when filtering on the "To" attribute:
Assuming email address: me+dove...@domain.com
## Plus Addressing
if envelope :detail "To" "dovecot"
{fileinto "Dovecot"; stop;}
Unfortunately, I cannot substitute the "Delivered-To" attribute in
place of the "To" one. I know and currently do sort based on the
"List-ID" attribute; however, I have other reasons for wanting to sort
only on the delivery address.
Is there anyway to actually incorporate the plus addressing feature
with the delivery address?
You are referring to the delivered-to message header, but you are trying
to use the envelope test, which is suitable only for testing the message
envelope. Use the address test in stead.
if address :detail "delivered-to" "dovecot" {}
Regards,
Stephan.