[Novalug] procmail rules / regex

Jon LaBadie novalugml@jgcomp.com
Wed Mar 20 12:20:36 EDT 2013


DUH!

I had been reading some rules into the main .procmailrc file using
INCLUDERC.  At some point I had commented out that line.  No wonder
nothing I did worked right.

For the record, the recipie I've settled upon is:

  :0:
  * ! ^TO_((jon|jonjgc|john|jlabadie|labadie)@)
  $MailRecvDir/nottojon

Jon

On Tue, Mar 19, 2013 at 10:54:14PM +0000, James Ewing wrote:
> Not sure about procmail rules, but I'll throw some RE advice at you.
> 
> [1] I assume you mean \< and \> to mean "word boundary". If so, maybe you can pull them outside the RE.
> [2] The @ provides a Word Boundary anyway.
> 
> So how about: ^To: .*\<(jon|jongc|...|labadie)@
> 
> Also...don't forget "Undisclosed Recipients"
> 
> JIM
> 
> P.S. Your name is unlikely to appear in BOTH a To: and a CC: header, so since your rule is a negative one, adding a CC and BCC rule won't help.
> 
> ----- Original Message -----
> From: "Jon LaBadie" <novalugml@jgcomp.com>
> To: novalug@calypso.tux.org
> Sent: Tuesday, March 19, 2013 11:28:57 AM
> Subject: [Novalug] procmail rules / regex
> 
> In my procmail rules I've filtered out mailing lists and
> some other stuff.  At the end I want the mail to go to
> my default inbox or to a file called "NotToJon".
> 
> The latter is for the many aliases I give out to
> businesses or organizations.  There are several valid
> email names I want to go to my default inbox.
> 
> I'm trying to come up with a rule that says, "if it
> isn't one of the valid email names, put it in NotToJon".
> 
> This rule works fine with egrep, but not with procmail.
> See any reason?
> 
> * ! ^To: .*(\<jon\>@|\<jonjgc\>@|\<john\>@|\<jlabadie\>@|\<labadie\>@)
> 
> Also, to be complete, should I stack two similar rules for Cc: and Bcc: ?
> 
> Jon
> -- 
> Jon H. LaBadie                  novalugml@jgcomp.com
>  11226 South Shore Rd		(703) 787-0688 (H)
>  Reston, VA  20190		(609) 477-8330 (C)
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug
>>> End of included message <<<



More information about the Novalug mailing list