need help on a procmail rule

Amedee Van Gasse (ubuntu) amedee-ubuntu at amedee.be
Thu May 28 23:19:11 UTC 2009


Florian Diesch schreef:
> "Amedee Van Gasse (ubuntu)" <amedee-ubuntu at amedee.be> wrote:
> 
>> I would like some advice on procmail. I know it a bit, but my knowledge
>> of regular expressions is not so good.
>>
>> I would like to move all mail from one sender to a certain mailfolder
>> For that I use:
>>
>> :0:
>> * ^From:.*jdoe1 at example\.com
>> .JohnDoe/
>>
>> This works.
>>
>> But I would also like to move all replies, quotes,... with his name
>> somewhere in the body to that mailfolder. Sometimes he signs with John
>> Doe, sometimes with his middle name John F. Doe
>> I tried this:
>>
>> :0:
>> * ^.*John (|F\. )Doe
>> .JohnDoe/
>>
>> But that didn't work.
> 
> 
> Not tested but should work:
> 
> :0 B
>  * John (F\. )?Doe
>  .JohnDoe/

Thank you Florian. It worked like a charm!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090529/ae5f9fbe/attachment.sig>


More information about the ubuntu-users mailing list