OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: redirect by sender

From: Wietse Venema (wietseporcupine.org)
Date: Tue Apr 01 2008 - 19:35:58 CDT


Barbara M.:
>
> I need to redirect mail that flow in a postfix (2.1.6) smtp server selecting by
> SENDER.
> I.E.: all mail that have a specified FROM must be redirected to a local account
> or another specified address (better of all: to a local file like
> /tmp/discarded). No matter the original destination address.
>
> What is the simplest way?

/etc/postfix/main.cf:
    smtpd_sender_restrictions =
        check_sender_access hash:/etc/postfix/sender_access

/etc/postfix/sender_access:
     joeexample.com redirect joeexample.net

However, this is not a secret bugging device.
When mail is undeliverable, it will be returned to the sender.

        Wietse

http://www.postfix.org/postconf.5.html#check_sender_access
http://www.postfix.org/access.5.html