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"
      }
  }
}






Reply via email to