[wplug] procmail help

Cameron McBride cameron.mcbride at gmail.com
Thu May 25 16:29:13 EDT 2006


As a small addition:

On 5/19/06, Chester R. Hosey <chosey at nauticom.net> wrote:
> Gentgeen wrote:
> > 1st - I am sure there is probably a "prettier way" to do that, but it is
> > working right now (at least the To and Cc).  If anyone wants to help me
> > make it prettier, great. :-)
>
> You can use the pipe character to specify either-or matches.
>
> > :0:
> > * ^(To).*kvsquire at comcast.net
> > $MAILDIR/Other_Acct/kvsquire/.
> >
> > :0:
> > * ^(Cc).*kvsquire at comcast.net
> > $MAILDIR/Other_Acct/kvsquire/.
>
> This could be consolidated as follows:
>
> :0:
> * ^(To|Cc).*kvsquire at comcast.net
> $MAILDIR/Other_Acct/kvsquire/.
>
> Also, it's probably not a bad idea to specify the header-tag delimiter
> specifically -- all header tags should end in a colon, so it doesn't
> hurt to make it explicit:
>
> :0:
> * ^(To|Cc):.*kvsquire at comcast.net
> $MAILDIR/Other_Acct/kvsquire/.

It might be even easier to use '^TO_' in this case, which is expanded
to some nice regex that should catch anything to an address.

These procmail expansions are discussed in the MISCELLANEOUS section
of the procmailrc manpage.

Cameron



More information about the wplug mailing list