Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Feb 2003 02:48:48 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Steven Lake <raiden@shell.core.com>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Configuring sendmail to deliver per sender
Message-ID:  <20030219004848.GB566@gothmog.gr>
In-Reply-To: <Pine.GSO.4.44L0.0302181658570.24753-100000@shell.core.com>
References:  <Pine.GSO.4.44L0.0302181658570.24753-100000@shell.core.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2003-02-18 17:03, Steven Lake <raiden@shell.core.com> 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




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