Complete.Org: Mailing Lists: Archives: discussion: December 1999:
[aclug-L] Re: procmail question
Home

[aclug-L] Re: procmail question

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: [aclug-L] Re: procmail question
From: Carl D Cravens <raven@xxxxxxxxxxx>
Date: Wed, 15 Dec 1999 22:23:05 -0600 (CST)
Reply-to: aclug-L@xxxxxxxxxxxx

On Wed, 15 Dec 1999 glandix@xxxxxxxxxxxxxx wrote:

> :0c:
> * ^From:mom&dad@xxxxxxxx
> 
> do the same thing, assuming that is their e-mail, or do i have to have
> .* before their address...

The .* is part of the pattern matching.  The dot matches *any* character.  
The * says to match zero or more of the preceding character.  Because it's
likely that there will be at least a space between the From: and the
address, you'll have to account for that.  But the .* helps match things
like...

From: (Joe and Edna) momndad@xxxxxxxx

or 

From: Joe and Edna <momndad@xxxxxxxx>

There are many valid ways to format a From: line, so the .* ensures that
you match anything between the From: and the actual part you're looking
for.  

If you want to delve into the mind-bending insanity that is regular
expressions (i.e. "pattern matching"), try 'man 7 regex', which describes
standard regular expressions.  To really harness the power of procmail,
you need to understand at least the basics of regex's.  But before you hit
that it might be good to hit the man pages for procmail, procmailrc,
procmailex (procmail examples), and maybe procmailsc (if you want a full
view of what procmail can do, though you may not find scoring to be very
useful).  

--
Carl D Cravens (raven@xxxxxxxxxxx)
If you don't support shareware, who will?


[Prev in Thread] Current Thread [Next in Thread]