procmail
[Top] [All Lists]

Re: Filtering troubles

1999-07-10 09:02:55
"Kristian J. Allen" <kjallen(_at_)phor(_dot_)com> writes:
I am having a problem getting procmail to filter the mail at the proper time. 
I'm running Solaris 2.7 with sendmail 8.9.1 (not Suns prepackaged version) and
procmail has installed with no problem. I then added the following lines to my
 
sendmail.mc:

FEATURE(local_procmail)
MAILER(mail)


And generated the proper sendmail.cf file. I created a simple /etc/procmailrc 
file, which should give me two copies of everything:

LOGFILE=/var/log/procmail.log
VERBOSE=on

:0c
* ^TOxxx(_at_)phor(_dot_)com
! xxx(_at_)phor(_dot_)com


Now, procmail is used as the delivery agent but for some reason the mail does 
not get filtered. IF I call procmail from the command line and proceed to 
create 
a message it works properly (and is shown in the log files). But if I send mail
using mail, or sendmail directly I dont recieve any luck. Here is a snippit 
from 
the log files:

procmail: [12117] Fri Jun 18 12:44:41 1999
procmail: Match on 
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(
-Resent)?)-To):(.*[^a-zA-Z])?)xxx(_at_)phor(_dot_)com"
procmail: Executing "/usr/lib/sendmail,-oi,xxx(_at_)phor(_dot_)com"
procmail: Assigning "LASTFOLDER=/usr/lib/sendmail -oi xxx(_at_)phor(_dot_)com"
From xxx  Fri Jun 18 12:44:41 1999
SUBJECT: wtot
 Folder: /var/mail/xxx                                                    3549
procmail: [12139] Fri Jun 18 12:49:27 1999
procmail: No match on 
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparent
ly(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)xxx(_at_)phor(_dot_)com"
From xxx  Fri Jun 18 12:49:27 1999
 Folder: /var/mail/xxx         

The first is from when procmail is called directly and the second is sending 
mail through some mailer. What is odd is the regular expressions are different
for each. 've read the man pages and searched the archives w/o much luck. Any 
tips or pointers would be greatly appreciated. Thank you for your time.

The first of the regexps is indeed the expanded version of
"^TOphor.com".  The latter is the the result of the condition
"^TO_phor.com".  There's another rcfile involved.  Do you have multiple
copies of procmail, say, one in /usr/local/bin and one in /usr/bin?
The sendmail.cf files generated by the sendmail.mc file you gave will
invoke the one in /usr/local/bin.  Perhaps it was compiled to use
/usr/local/etc/procmailrc instead of /etc/procmailrc?  If so, I would
suggest removing all but one version of procmail, preferably the newest
version (3.13.1) and preferably compiled to use /etc/procmailrc as
that's just the standard location.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Filtering troubles, Philip Guenther <=