Stuart Henderson wrote:
I had a question off-list about how to do this, so I guess
some other people will benefit from an example of how to set
this up.
If you are using postfix:
/etc/postfix/main.cf:
..
..
smtpd_recipient_restrictions =
reject_non_fqdn_hostname
reject_invalid_hostname
reject_non_fqdn_sender
reject_non_fqdn_recipient
reject_unlisted_recipient <-- this one
reject_unlisted_sender
reject_unknown_reverse_client_hostname
warn_if_reject reject_unknown_client_hostname
reject_unknown_helo_hostname
reject_unknown_sender_domain
reject_unknown_recipient_domain
permit_mynetworks
reject_unauth_destination
...
...
...
unknown_address_reject_code = 554
alias_maps = btree:$config_directory/aliases
/etc/postfix/aliases:
..
..
joe.bloggs jb123456
joe jb123456
bloggs jb123456
$ sudo postfix reload