deny domain smtp

dwoodard3950

Renowned Member
Apr 14, 2015
3
0
66
How do I deny all domains but my own as valid send to addresses? I was looking at doing this with transport_maps, but the syntax to deny all is not compatible with the PMG entry form.

Method with direct entry in /etc/postfix/transport
Code:
example.com :
.example.com :
* error: Only allowing one domain

Recommended method for this via PMG?
 
Mail filters should be able to do this. Do a who regex object with the regex being:
Code:
((?!example.com).)*$
Then do a new mail filter rule for outbound with this who object and the block action object. Now anytime a message tries to go out and example.com isn't the sender, it should block the message .
 
  • Like
Reactions: dwoodard3950