On Fri, 22 Apr 2011 16:44:15 +0200
Stephan Bosch <[email protected]> articulated:

> On 4/22/2011 3:23 PM, Jerry wrote:
> > Assume and e-mail address of: [email protected]
> >
> > 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: [email protected] 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: [email protected]
> >
> > ## 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" {}

Thanks, that works fine. Strangely enough, I never saw a single example
of plus addressing with sieve that used that syntax. I was incorrectly
under the impression that only "envelope" would work.

-- 
Jerry ✌
[email protected]

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__________________________________________________________________

Reply via email to