Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Rick Romero

Quoting Marcus Rueckert da...@opensu.se:


On 2010-03-04 15:27:20 -0600, Rick Romero wrote:

I'm by no means a procmail expert, but this seems to work (though
[Dovecot] gets put before the Re:)


and with an LDA that speaks only sieve?
how do you do it there?



This is better for procmail (doesn't change Subject if [Dovecot]  
already there)

:0 fhw
* ^List-Id:.*Dovecot Mailing List
{
  :0
  * !^Subject:.*\[Dovecot\]
  {
:0 fhw
* ^Subject:\/.*
| formail -I Subject: [Dovecot] $MATCH
  }
}


I don't know enough about Sieve to give an example..
what you want is:
1. List-Id head contains Dovecot Mailing List
2. Subject does not contain [Dovecot]
3. Pass email to formail to modify Subject ( built in Sieve equivalent?)

HTH

Rick








Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Joseph Yee


On 4-Mar-10, at 4:36 PM, Rick Romero wrote:


Quoting Marcus Rueckert da...@opensu.se:


On 2010-03-04 15:27:20 -0600, Rick Romero wrote:

I'm by no means a procmail expert, but this seems to work (though
[Dovecot] gets put before the Re:)


and with an LDA that speaks only sieve?
how do you do it there?



This is better for procmail (doesn't change Subject if [Dovecot]  
already there)

:0 fhw
* ^List-Id:.*Dovecot Mailing List
{
 :0
 * !^Subject:.*\[Dovecot\]
 {
   :0 fhw
   * ^Subject:\/.*
   | formail -I Subject: [Dovecot] $MATCH
 }
}


I don't know enough about Sieve to give an example..
what you want is:
1. List-Id head contains Dovecot Mailing List
2. Subject does not contain [Dovecot]
3. Pass email to formail to modify Subject ( built in Sieve  
equivalent?)


HTH

Rick



So what happen if I had this promail recipe and I reply to list?

If the subject line is Dovecot Mailing List, will it become Re:  
Dovecot Mailing List or Re: [Dovecot] Mailing List?  (I think it's  
the latter case)


If it's the latter one, I vote to keep the prefix now.

The prefix helps visual eye filtering, works for people (including me)  
who keep all new email to inbox rather than direct them to other  
folder before reading them.


I vote to keep the prefix even it's the first scenario, but I'm not  
strong into must keep prefix in both cases.




Joseph


Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Roderick A. Anderson

Rick Romero wrote:

Quoting Marcus Rueckert da...@opensu.se:


On 2010-03-04 15:27:20 -0600, Rick Romero wrote:

I'm by no means a procmail expert, but this seems to work (though
[Dovecot] gets put before the Re:)


and with an LDA that speaks only sieve?
how do you do it there?



This is better for procmail (doesn't change Subject if [Dovecot] already 
there)

:0 fhw
* ^List-Id:.*Dovecot Mailing List
{
  :0
  * !^Subject:.*\[Dovecot\]
  {
:0 fhw
* ^Subject:\/.*
| formail -I Subject: [Dovecot] $MATCH
  }
}


I don't know enough about Sieve to give an example..
what you want is:
1. List-Id head contains Dovecot Mailing List
2. Subject does not contain [Dovecot]
3. Pass email to formail to modify Subject ( built in Sieve equivalent?)


if header :contains List-Id dovecot.dovecot.org {
   fileinto Dovecot;
   stop;
}

I just removed my Subject based filter and put this in so +1.


\\||/
Rod
--


HTH

Rick










Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Karsten Bräckelmann
   I'm by no means a procmail expert, but this seems to work (though
   [Dovecot] gets put before the Re:)

 This is better for procmail (doesn't change Subject if [Dovecot]  
 already there)
 :0 fhw
 * ^List-Id:.*Dovecot Mailing List
 {
:0

The first one is not a filter, and we don't wanna wait for it either.
And all this unnecessary cascading of recipes, to get an AND, which is
default with multiple conditions... See, that's why people perceive
procmail syntax as hard to understand. ;)


# 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: \/.*
| formail -I Subject: [Dovecot] ${MATCH}


-- 
char *t=\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4;
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
(c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}



Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Rick Romero

Quoting Joseph Yee j...@ca.afilias.info:



On 4-Mar-10, at 4:36 PM, Rick Romero wrote:


Quoting Marcus Rueckert da...@opensu.se:


On 2010-03-04 15:27:20 -0600, Rick Romero wrote:

I'm by no means a procmail expert, but this seems to work (though
[Dovecot] gets put before the Re:)


and with an LDA that speaks only sieve?
how do you do it there?



This is better for procmail (doesn't change Subject if [Dovecot]  
already there)

:0 fhw
* ^List-Id:.*Dovecot Mailing List
{
:0
* !^Subject:.*\[Dovecot\]
{
  :0 fhw
  * ^Subject:\/.*
  | formail -I Subject: [Dovecot] $MATCH
}
}


I don't know enough about Sieve to give an example..
what you want is:
1. List-Id head contains Dovecot Mailing List
2. Subject does not contain [Dovecot]
3. Pass email to formail to modify Subject ( built in Sieve equivalent?)

HTH

Rick



So what happen if I had this promail recipe and I reply to list?

If the subject line is Dovecot Mailing List, will it become Re:  
Dovecot Mailing List or Re: [Dovecot] Mailing List?  (I think  
it's the latter case)


If it's the latter one, I vote to keep the prefix now.

The prefix helps visual eye filtering, works for people (including  
me) who keep all new email to inbox rather than direct them to other  
folder before reading them.


I vote to keep the prefix even it's the first scenario, but I'm not  
strong into must keep prefix in both cases.


The procmail recipe would mark a reply as:
[Dovecot] Re: Mailing List

UNLESS you replied to it.  Then your MUA would prepend the [Dovecot]  
with Re: just like it does now.


So it wouldn't be exactly the same.  You'd have to figure out how to  
insert text... It's just getting bigger and uglier - though I'm sure  
some expert could trim it...  also untested...


:0 fhw
* ^List-Id:.*Dovecot Mailing List
{
  :0 fhw
  * !^Subject:.*\[Dovecot\]
  {
  :0 fhw
  * ^Subject: Re:\/.*
  {
 :0 fhw
 * ^Subject:\/.*
 | formail -I Subject: Re: [Dovecot] $MATCH
  }
  :0 fhw
  * !^Subject: Re:\/.*
  {
 :0 fhw
 * ^Subject:\/.*
 | formail -I Subject: [Dovecot] $MATCH
  }
  }
}








Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Rick Romero

Quoting Karsten Bräckelmann guent...@rudersport.de:


  I'm by no means a procmail expert, but this seems to work (though
  [Dovecot] gets put before the Re:)



This is better for procmail (doesn't change Subject if [Dovecot]
already there)
:0 fhw
* ^List-Id:.*Dovecot Mailing List
{
   :0


The first one is not a filter, and we don't wanna wait for it either.
And all this unnecessary cascading of recipes, to get an AND, which is
default with multiple conditions... See, that's why people perceive
procmail syntax as hard to understand. ;)


# 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:\/.*
| formail -I Subject: [Dovecot] ${MATCH}


Added partial Re: adjuster - Use a 2nd recipe for the Subject: Re: [Dovecot] ?
THANK YOU!   :)

Rick



Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Karsten Bräckelmann
On Thu, 2010-03-04 at 17:46 -0600, Rick Romero wrote:
 Quoting Karsten Bräckelmann guent...@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.

  | formail -I Subject: [Dovecot] ${MATCH}
 
 Added partial Re: adjuster - Use a 2nd recipe for the Subject: Re: [Dovecot] ?
 THANK YOU!   :)

You're welcome. :)


-- 
char *t=\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4;
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
(c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}



Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Rick Romero

Quoting Karsten Bräckelmann guent...@rudersport.de:


On Thu, 2010-03-04 at 17:46 -0600, Rick Romero wrote:

Quoting Karsten Bräckelmann guent...@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




Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Frank Cusack

On 3/4/10 7:07 PM -0600 Rick Romero wrote:

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


Unless you use a mailer which uses something besides Re:, say Aw:

-frank


Re: [Dovecot] [dovecot] - filters

2010-03-04 Thread Karsten Bräckelmann
On Thu, 2010-03-04 at 19:07 -0600, Rick Romero wrote:
 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.

The system (mailman) prepends the tag, if there is none. Period.

You simply cannot make that work exactly the same on your end. Because
it is the mailing list software, that does it currently -- before
sending out the mail. Exactly the same for everyone. If *you* will do
it, it will break the exact moment someone else does it on his end, too.
But does not use the exact same recipe as you do...

Of course, if you happen to send a mail without the tag, but starting
Re:, mailman will in fact inject the tag before the Re:...

 Subject: Re: This is a test

Re: RE: Re[4]: Re: Fwd: Antw: Re: Real Subject hidden over here

I've seen it all. And even more variants.

 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

You will get both. The first one is an example replying, after adding
the tag. The second is an example in your Inbox *shudder* [1] of someone
not adding the stupid tag on his client side end, but you adding it.

 Now, If I replied to the second one, it would become
 Subject: Re: [Dovecot] Re: This is a test

You are free to modify the Subject and get rid of one of those.

You are free to reply to the list, and not Cc me personally. I do read
the list, you know...

 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.

ANY even half-decent MUA does respect these headers. References and
In-Reply-To. My threading will not be messed up, even if you change the
Subject entirely.

Of course, my threading is being messed up by someone actually replying,
but not realizing that deleting the entire body and subject will not
generate a fresh message, but still is a reply -- but this is an
entirely unrelated story. ;)

 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]'

IMHO, none is required. This whole concept of Subject tagging is utterly
broken and useless. There are headers for that your MDA or MUA can use
for filtering, sorting or any other kind of logic the user requires,
just because he doesn't filter into dedicated folders.

 I assume $MATCH would be the last conditional.

Now you lost me. $MATCH is the content you previously captured with the
\/ start matching here. It is not a condition.

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

True.  There's always someone who will complain.


[1] Yes, I am strictly against keeping ML bulk in your Inbox, just
because your retarded MUA (which hardly is worth that name) on your
phone can't handle folders.
This is an IMAP server list. Do filter server side. No excuse.

-- 
char *t=\10pse\0r\0dtu...@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4;
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;il;i++){ i%8? c=1:
(c=*++x); c128  (s+=h); if (!(h=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}