On 12/02/14 14:12, Wietse Venema wrote: > Daniel Pocock: >> I'm trying to work out what is a sensible configuration for servers >> without local delivery. > http://www.postfix.org/STANDARD_CONFIGURATION_README.html#null_client
I'm familiar with that, it is almost what I want They key difference is that I want to be more restrictive about usernames that are accepted > >> - if mail submitted without a domain, append example.org > http://www.postfix.org/BASIC_CONFIGURATION_README.html#myorigin > > This appends example.org to recipient AND SENDER. > >> - if a process submits mail to any of these > [ reject u...@host.example.org when "user" is not a UNIX system account ] >> c) otherwise, rewrite to u...@example.org and then send to the local >> relay server > There is no need to do that. All mail will have u...@example.org > as the sender address. If it bounces then it is not sent back > to the machine where it came from. I was referring to the recipient addresses, not sender addresses What I'm hoping for is that senders will get immediate feedback (e.g. mail command will fail or SMTP refused) if they invoke something like mail -s 'test' foobar mail -s 'test' foobar@$HOSTNAME but that the mail will be relayed (null client config) if they do things like this: mail -s 'test' root mail -s 'test' postmaster@$HOSTNAME mail -s 'test' daniel@localhost Regards, Daniel