From owner-freebsd-chat Fri May 31 15:18:52 2002 Delivered-To: freebsd-chat@freebsd.org Received: from bast.unixathome.org (bast.unixathome.org [216.187.105.150]) by hub.freebsd.org (Postfix) with ESMTP id 5B81037B403 for ; Fri, 31 May 2002 15:18:50 -0700 (PDT) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 1A5A23F35 for ; Fri, 31 May 2002 18:19:26 -0400 (EDT) From: "Dan Langille" Organization: DVL Software Limited To: chat@freebsd.org Date: Fri, 31 May 2002 18:18:35 -0400 MIME-Version: 1.0 Subject: Re: postfix: stopping spam sent to user@host.example.org Reply-To: dan@langille.org References: <20020531193427.DE4BC3F35@bast.unixathome.org> In-reply-to: X-mailer: Pegasus Mail for Windows (v4.01) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Message-Id: <20020531221926.1A5A23F35@bast.unixathome.org> Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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: ; from= to=; 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