Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2002 18:18:35 -0400
From:      "Dan Langille" <dan@langille.org>
To:        chat@freebsd.org
Subject:   Re: postfix: stopping spam sent to user@host.example.org
Message-ID:  <20020531221926.1A5A23F35@bast.unixathome.org>
In-Reply-To: <Pine.LNX.4.43.0205311238580.14075-100000@pilchuck.reedmedia.net>
References:  <20020531193427.DE4BC3F35@bast.unixathome.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 31 May 2002 at 12:39, Jeremy C. Reed wrote:

> On Fri, 31 May 2002, Dan Langille wrote:
> 
> > I'm using postfix.  Is there a way to stop this spam?  i.e. block all
> > mail with a TO: field containing @host.example.com.
> 
> Have a look at your postfix's main.cf and read the small section about
> "header_checks".

Ahh, thank you.  Easily done.  For future readers, in 
/usr/local/etc/postfix/main.cf, I've added this line:

    header_checks = regexp:/usr/local/etc/postfix/header_checks

and header_checks contains:

/^to: *@host\.example\.org/ REJECT

Then do a "postfix reload".

Here is a sample rejection message:

   May 31 15:55:05 m20 postfix/cleanup[46233]: D37BB7A8D: reject: header
   To: <dan@host.example.org>; from=<dan@example.com>
   to=<dan@host.example.org>;

I can see myself using this feature quite a bit.  Thanks again.
-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020531221926.1A5A23F35>