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 [email protected]. No rejection.
What can I do to get it implemented. Thanks again. > On Nov 10, 2014, at 10:10 AM, [email protected] (Wietse Venema) wrote: > > [email protected]: >> 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, [email protected] and [email protected] only allow >> the following senders >> [email protected] >> [email protected] > > 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 >> [email protected] or [email protected], I want postfix reject >> the message, but in the backend, send the message copy to [email protected]. > > 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
