James D. Parra: > Hello, > > I want to restrict postfix to only send mail to our domain, yet to no others. > In other words, I want to set it up to not send mail to any outside address > and only to accounts within our domain (anyuser@our_domain_only.com). This is > a test server and is not a mail server, per say. Postfix will only be send > mail for users who are logged into it. (SuSE 11.4) > > Could someone point me to a howto for mail restrictions when sending.
Something like this: /etc/postfix/main.cf: transport_maps = pcre:/etc/postfix/transport.pcre /etc/postfix/transport.pcre: /@(example\.com)$/ smtp:$1 /(.+)/ error:5.7.1 Mail to $1 is prohibited See also: http://www.postfix.org/transport.5.html http://www.postfix.org/error.8.html http://www.postfix.org/pcre_table.5.html It does not block user%elsewh...@example.com, nor does it stop elsewhere!u...@example.com. These are left as an exercise for the reader. Wietse