OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: Reject email from a single address

From: D.J. Fan (mr88talenthotmail.com)
Date: Mon Aug 01 2005 - 10:47:50 CDT


>On 8/1/05, Christian Gayton <c.gaytonnet-lines.com> wrote:
> >
> > Hi,
> > We'd like to reject emails coming from a know specific address
> > (someonesomewhere.com)
> > What is the best and simple way (his provider can't be considered as
> > spammer
> > and blacklisted)
> > Thx
> > Christian

>Alternately you could consider using header_check
>
>in main.cf <http://main.cf>:
>header_check=regexp:/etc/postfix/header_check
>
>in /etc/postfix/header_check:
>*/^From:<emailaddress>/ REJECT
>
>postmap header_check
>postfix reload
>
> >

It may be worth mentioning that header_checks (not header_check, btw) would
be much less efficient than check_sender_access in this case. How the
mumble_checks compare data:

http://www.postfix.org/header_checks.5.html

"Postfix provides a simple built-in content inspection
       mechanism that examines incoming mail one message header
       or one message body line at a time. Each input is compared
       against a list of patterns, and when a match is found the
       corresponding action is executed."

as opposed to the check_sender_access which would look up each envelope
sender address in a table (with only one entry in it at this time).

It might also be worth mentioning that a smart sender will simply fake their
address to get around your check. If the sender does this, you may be able
to use header_checks to filter on the initial Received: line, but only if it
reflects the sender's desktop machine and there is no possibility that it is
the same as anyone elses (most notably anyone else on the same network as
the sender).

Use mumble_checks when you need to use them, but don't if there are more
efficient alternatives.
I find http://www.quanetic.com/regex.php useful for testing the regular
expressions that mumble_checks requires.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/