Sean
My question referring to LOCAL_RULE_0 came from a program called
"email-sanitizer". It was their idea, not mine. I didn't think it was
necessary as I said. Since the M4 file referred to sendmail 8.8.9 and I am
using 8.12.3, I guessed that one of the rules (not all) below did the same
thing in the newer version of sendmail.
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
MAILER(procmail)dnl
As for the rules, including adding the -t, They are all Redhat. This is the
way the sendmail.mc file comes.
As for the .mc file, since the commands listed are M4 macros, I didn't
think it would be necessary to say that it was the sendmail.mc file
The intent of the script, since perhaps, it wasn't obvious was to toss a
piece of mail that met a certain criteria and indicate why the mail was
tossed to a log file. The piece of mail that matches shouldn't be delivered.
My understanding is that only one action line can follow the condition,
hence the two conditions that match everything inside of the actual
conditional. One does the logging and the other causes the mail to be
tossed. Isn't that correct. I would like to see a more efficient way of
doing this.
Once delivered, it doesn't need to be thrown away. The issue is that the
pipe to echo doesn't READ the message, and therefore procmail sees it as a
delivery failure. Add the 'i' flag (see 'man procmailrc') to the logging
line, and you can eliminate the discard delivery.
I don't understand what the i option is going to do here, explain.
I emit elements to my regular procmail log, and have a simple script
invoked by crontab that grabs the ^SPAM: lines and emails them.
I wanted to avoid parsing a file. The criteria was single line entry
delimited by colons. This is why I didn't use the standard logging
Refer to the Sendmail Bat book, 19.6.32. LOCAL_RULE_0 is not synonymous
with LDA.
Even though that is what I probably said, it is not what I meant. I meant
that incoming traffic is being caught by procmail due to one of the rules
in the M4 file. There for I don't need the LOCAL_RULE to accomplish the
same thing.
MAILER(procmail) isn't necessary for using procmail as LDA. It is
unrelated - it has to do with being able to deliver "to" procmail much as
you deliver "to" a file or to SMTP.
Doesn't this also cause all mail going through the MTA (Sendmail) to be
filtered.
No, LDA is only for mail being delivered to local _USERS_. Delivery to
aliases (to programs, or to remote users, or lists of same), as well as
outbound delivery, are not subject to handling by the LDA.
So unlike adding regexs to sendmail, your saying I can test by sending a
user mail that will go out through sendmail, but will be caught by procmail
on the way in.
(i.e mailing out as local nagray to nagray(_at_)austin(_dot_)rr(_dot_)com and having
fetchmail pull down mail for local nagray from nagray(_at_)austin(_dot_)rrr(_dot_)com, If I
was filtering the out the word "sex" I should be able to send but not recieve)
That's cool.
Procmail treats /etc/procmailrcs/ special - see the manpage. No need to
create a similar directory there which may be cause for later
confusion. Yes, I put global recipe components into /etc/procmailrcs and
include them into the /etc/procmailrc script.
/etc/procmailrcs is not used by my version.
--
Nix
Vidae Credendes!
Senior Network Engineer
Bruzenak inc.
nagray(_at_)bruzenak(_dot_)com
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail