Search code examples
emailunixprocmail

What's in your .procmailrc


Are there any handy general items you put in your .procmailrc file?


Solution

  • Many mailers prefix a mail's subject with "Re: " when replying, if that prefix isn't already there. German Outlook instead prefixes with "AW: " (for "AntWort") if that prefix isn't already there. Unfortunately, these two behaviours clash, resulting in mail subjects like "Re: AW: Re: AW: Re: AW: Re: AW: Lunch". So I now have:

    :0f
    * ^Subject: (Antwort|AW):
    |sed -r -e '1,/^$/s/^(Subject: )(((Antwort: )|(Re: )|(AW: ))+)(.*)/\1Re: \7\nX-Orig-Subject: \2\7/'
    

    Which curtails these (and an "Antwort: " prefix that I've evidently also been bothered by at some point) down to a single "Re: ".