On Mon, Feb 23, 2015 at 01:00:03PM +0100, Pol Hallen wrote: > using: > > check_sender_access hash:/etc/postfix/local_domains > > I can put OK or REJECT filtering by sender.
The "OK" case needs to be handled with great care to avoid becoming an open relay. * Use "check_sender_access" only in smtpd_sender_restrictions, OR * Postfix >= 2.10, use smtpd_relay_restrictions to control relay access, and avoid check_sender_access there, OR * Make sure that in smtpd_recipient_restrictions check_sender_access appears only *after* reject_unauth_destination. > I need filter only a domain (i.e. yahoo.com external domain) then redirect > that email(s) to external email address. > > What the best way? What do you need to do to email with a yahoo.com envelope sender and why? Is it even the envelope sender you should be looking at? Are you trying to deal with the breakage introduced by DMARC? Be very specific, give a detailed example (include explicit envelope and if applicable header addresses in the example both as they come in to your server, and as you want them to leave you can make up the addresses so long as you're specific about the required transformation). -- Viktor.