Assume and e-mail address of: me+dovecot at 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+dovecot at 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+dovecot at 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? -- Jerry ? Dovecot.user at seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __________________________________________________________________
On 4/22/2011 3:23 PM, Jerry wrote:> Assume and e-mail address of: me+dovecot at 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+dovecot at 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+dovecot at 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.
On Fri, 22 Apr 2011 16:44:15 +0200 Stephan Bosch <stephan at rename-it.nl> articulated:> On 4/22/2011 3:23 PM, Jerry wrote: > > Assume and e-mail address of: me+dovecot at 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+dovecot at 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+dovecot at 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" {}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 ? Dovecot.user at seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __________________________________________________________________
Le vendredi 22 avril 2011 16:44, Stephan Bosch a ?crit?:> On 4/22/2011 3:23 PM, Jerry wrote: > > Assume and e-mail address of: me+dovecot at 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+dovecot at 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+dovecot at 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.one can easily make complex scripts such as who manages the spam mailling and reject vacation. I recommend writing the simplest possible examples are all available in the manual s /// ;) -- http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7 gpg --keyserver pgp.mit.edu --recv-key 092164A7 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20110422/773bfcd2/attachment-0001.bin>