Limit Sender Address, Reject and Copy message if not authorized
hello all, I have a server with postfix and I want the following setup: 1. Only certain sender addresses can send email to patterned email addresses. For example, protecte...@example.com and protecte...@example.com only allow the following senders a...@domain.com d...@domain.com 2. if any sender other than above address send message to protecte...@example.com or protecte...@example.com, I want postfix reject the message, but in the backend, send the message copy to ad...@example.com. how can I do this? any hints are welcome. Thanks a lot.
Re: Limit Sender Address, Reject and Copy message if not authorized
Thank you Wietse. What if I change the requirement so all emails sent by non-authorized senders to these protected addresses, should be delivered to ad...@bitbridge.com. No rejection. What can I do to get it implemented. Thanks again. > On Nov 10, 2014, at 10:10 AM, wie...@porcupine.org (Wietse Venema) wrote: > > shamu...@gmail.com: >> hello all, I have a server with postfix and I want the following setup: >> >> 1. Only certain sender addresses can send email to patterned email >> addresses. >> For example, protecte...@example.com and protecte...@example.com only allow >> the following senders >> a...@domain.com >> d...@domain.com > > A similar problem is covered in > http://www.postfix.org/RESTRICTION_CLASS_README.html > >> 2. if any sender other than above address send message to >> protecte...@example.com or protecte...@example.com, I want postfix reject >> the message, but in the backend, send the message copy to ad...@example.com. > > Postfix does not deliver rejected email. > > But you can grab a copy of rejected mail with a Milter (see today's > related thread). A similar trick could be used with an SMTP-based > before-queue filter. The idea is that the filter is configured to > reject mail after the remote SMTP client has sent the entire message. > > http://www.postfix.org/MILTER_README.html > http://www.postfix.org/SMTPD_PROXY_README.html > >Wietse
Rewrite Sender Address Before Delivery
I have a virtual alias table like this exam...@my-domain.com exam...@other-domain.com other-domain.com is not controlled by me, it could be gmail.com or hotmail.com if a sender some...@sender-domain.com sends an email to exam...@my-domain.com, postfix forwards this message correctly to exam...@other-domain.com. however, messages have been marked as SPAM by other-domain.com. I want postfix to rewrite this message's Sender as exam...@my-domain.com so that other-domain.com's mail server doesn't marked this mail as spam. did I set this up starting with a wrong way? if not using alias, what can I do to serve this purpose? My goal is to make exam...@my-domain.com as a masked email address. Thank you. Tony