procmail
[Top] [All Lists]

Re: quick start of procmail

1995-10-26 09:56:27
Jeffrey;

Can someone please explain to me the syntax.

OK, I'll try.

:0
* ^From.*danielt
* ^Subject:.*dail
sysadm_daily

Why does Subject have a colon after it and not From ?

Because most mail has both a "From " and a "From:"?  Perhaps your
recipe should only look at "From:"?  All headers items have a colon
(and a usually a space) after the header name, except "From " (also
sometimes shown as From_), which isn't strictly a part of the header.

What does the period do?

The period is part of the regular expression syntax.  It means "any
char except new-line".

What if i leave out the period and just use the * ?

The "*" means "zero or more of the previous regular expression", so it
depends on what is right before the star.

For example, if you say

   ^Subject:*dail

then it means `zero or more : characters'.

If you said:

   ^Subject*dail

then it means `zero or more t characters'.  This would match
"Subjecdail", "Subjectdail", "Subjecttdail", "Subjectttdail",
"Subjecttttdail", etc.  The chances of receiving mail with this
in the header are very small.

Thankx

You're welcome.

Rodger Anderson

<Prev in Thread] Current Thread [Next in Thread>