[Dovecot] [dovecot] - filters

Rick Romero rick at havokmon.com
Fri Mar 5 03:07:33 EET 2010


Quoting "Karsten Bräckelmann" <guenther at rudersport.de>:

> On Thu, 2010-03-04 at 17:46 -0600, Rick Romero wrote:
>> Quoting "Karsten Bräckelmann" <guenther at rudersport.de>:
>
>> > # Force-inject [Dovecot] Subject tagging, just because I insist on the
>> > # list traffic hitting my Inbox, and am unwilling to filter it.
>> >
>> > :0 fw
>> > *   ^List-Id: .*Dovecot Mailing List
>> > * ! ^Subject: .*\[Dovecot\]
>> > *   ^Subject: \/.*
>>   * ! ^Subject: Re:\/.*
>
> Corrected quoting, I did not write that last line.
>
> I don't think it does what you intend anyway, unless you want to prevent
> the Subject tagging, if the Subject begins with a Re: marker. Also, I've
> never used the \/ match buffer in a negated condition, but my gut
> feeling is that it will make the original intent fail.

Oh, I thought the backslash was escaping the / ..  I was just going by  
an example I had - even though now that I think about it, that really  
makes no sense.  \o/
In any case, yes, I want to skip Matching replies, because otherwise  
you won't match how the system prepends [Dovecot] now.

For example.
Subject: This is a test
is replied to and becomes:
Subject: Re: This is a test

I would think those of us who prefer to have the prefix would want:
Subject: Re: [Dovecot] This is a test
and not
Subject: [Dovecot] Re: This is a test

Now, If I replied to the second one, it would become
Subject: Re: [Dovecot] Re: This is a test
and that would really hose things up.  Of course, were I to do that,  
YOUR threading might get all hosed up because all of a Sudden there's  
a subject change.  Yes, I know there's a header for threading, but I'm  
not sure what MUA's respect it.

So I think 2 recipes are required -
1. Marks 'original' not prefixed Subjects - prefix is '[Dovecot]'
2. Marks replied not prefixed Subjects - prefix is 'Re: [Dovecot]'


So like:
:0 fw
*   ^List-Id: .*Dovecot Mailing List
* ! ^Subject: .*\[Dovecot\]
* ! ^Subject: Re:.*
*   ^Subject: \/.*

:0 fw
*   ^List-Id: .*Dovecot Mailing List
* ! ^Subject: .*\[Dovecot\]
*   ^Subject: Re:.*

I assume $MATCH would be the last conditional.

I think overall - whether we add or remove the prefix via local  
filter, someone is going to have issues with it :)

Rick




More information about the dovecot mailing list