From owner-freebsd-questions Tue Feb 18 16:48:54 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD2C337B401 for ; Tue, 18 Feb 2003 16:48:52 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44EA243F3F for ; Tue, 18 Feb 2003 16:48:51 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a042.otenet.gr [212.205.215.42]) by mailsrv.otenet.gr (8.12.6/8.12.6) with ESMTP id h1J0mmFw015858; Wed, 19 Feb 2003 02:48:49 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.7/8.12.7) with ESMTP id h1J0mm9p000802; Wed, 19 Feb 2003 02:48:48 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.7/8.12.7/Submit) id h1J0mmiO000801; Wed, 19 Feb 2003 02:48:48 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 19 Feb 2003 02:48:48 +0200 From: Giorgos Keramidas To: Steven Lake Cc: questions@FreeBSD.ORG Subject: Re: Configuring sendmail to deliver per sender Message-ID: <20030219004848.GB566@gothmog.gr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-02-18 17:03, Steven Lake wrote: > Hi all. How do I get sendmail to forward off mail coming from a > particular sender to a particular email address? So regardless of who > it's addressed TO, I want it to forward mail to a different mailbox or to > /dev/null depending on the address. > > So say I get an email going from "joefriday@pbs.org" going to > "user1@mydomain.net", I want that email to go to > "user2@mydomain.net" instead, but all other mail labled for user1 I > want it to deliver normally. One way to do this is to install procmail as a local delivery agent, and write something like the following in your system-wide rules at /usr/local/etc/procmailrc: :0 * ^(From|From:|Sender:) .*joefriday@pbs.org * ^TO.*user1@mydomain.net ! user2@mydomain.net Done :) > The other situation would be mail coming into from > "annoyingjerk@loser.com" going to any user on my network. That's easy. Try reading /usr/share/sendmail/cf/README. Especially the part about access_db. Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message