How can I configure Postfix to silently drop / discard mails that were sent from one of my users to an external address?
I'm already able to discard all mails to external addresses using the following transport_maps
example.com :
* discard:
However I want to apply this rule to one user within my Postfix server only.
Also mails addressed to external and local addresses should get deliverd to the local users only.
Why do I need this?
The company I work at thinks that an intern should not sent mails directly to the customer. So the intern would send a mail using the customers address for to
and adding his supervisor into the cc
. Then Postfix shoud only deliver the mail to the supervisor so that he can check and sent the mail to the customer without searching for the customers address.
!/example.com/i DISCARD
as local_domains but this will discard the entire mail - also for local users – Martin Dec 17 '12 at 16:10sender_dependent_default_transport_maps
, and it works. However, if someone pretends to be a powerful user by setting "Mail from address", he can still send mail outside. – Oct 25 '13 at 09:41