procmail
[Top] [All Lists]

Re: Receiving System Mail

2009-01-30 18:47:48


After you figure out why procmail is not being invoked (per
your later message), you will want to change this to:

  * ^TO_root(_at_)example(_dot_)com

or

  * ^TO_root$

(if your server gets mail from localhost without a domain
tacked on).

The ^TO macro is designed to look for an email address.  Putting
".*" before the address defeats the purpose.  E.g., with yours
you would also match on words such as these:

 12:29am [~/Mail] 757[0]> lk .root | head -20 | fmt 
abscessroot aloeroot alroot alumroot amyroot aniseroot appleroot
arrowroot baboonroot babroot balsamroot bathroot beaverroot beetroot
beetrooty belderroot bethroot bigroot birthroot biscuitroot

From the man pages:

      If the regular expression contains `^TO_' it will be 
      substituted by `(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope
      |Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)', which
      should catch all destination specifications containing a
      specific address.

Thanks, that makes a lot of sense, and I made that change.  Wish I'd
started all of this 20 years ago.  Oh well, I'm having a lot more fun
with all of this than I ever did with Windoze.  Is there a way that I
can test the recipe without having to wait for crontab to do its thing?

Rem 
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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