procmail
[Top] [All Lists]

Re: Help with redirect/deny recipe

2000-08-18 13:18:16
on 8/18/2000 10:08 AM, Matt Dunford deftly typed out:

My first question... is there a better way to identify the sender than
trapping the From line?

If it ain't broke, don't fix it.  Is that condition doing what you
want it to do? 

Thank you Matt for your help. The reason I'm concerned about that condition
is that all it's testing is the From header which can be easily spoofed. It
is working. I was just hoping for a better way to verify the origin of the
e-mail. I thought I might be able to do something like:

:0
* !^Received:.*000\.000\.000

where 000\.000\.000 is the IP range that I'd like to allow. But There are
often multiple Received headers and in my limited testing it didn't seem to
work (I could have had my regular expression wrong, though).

My second question is regarding mail bounces. The first time a message
arrives that is going to be rejected, the X-Loop header is added and the
reply is sent. Once that message bounces and returns to the list address,
where does it go?

It will probably land in your default mail box.

But it's not and I certainly don't want to cause Sendmail to loop trying to
deliver the bounce to the mailbox somehow. I just want to make sure that the
message is getting disposed of.

Sounds like a good idea, but your recipe is dumping all messages that
don't have a X-Loop header.  I'm assuming you want the opposite to
happen. 

# (untested, of course!)
# drop messages that have my X-Loop header
:0
* ^X-Loop: listaddress(_at_)domain1(_dot_)com
/dev/null

# reject the profane from my list
:0
* !^From.*((domain1|domain2|domain3)\.com)
| (formail -rk \
-A "X-Loop: listaddress(_at_)domain1(_dot_)com"; \
echo "Go away!" ) | $SENDMAIL -oi -t

# forward message to those on the list
:0
! `cat forward_list`

Thanks again. That is much better! Get rid of the bounces right off and then
move on to testing the sender.

Any idea how many addresses I can have in forward_list before the shell will
choke (this was a concern after reading the Procmail FAQ).

Thanks again for your help.

-- 
Remo Del Bello


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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