I'm using this howto to setup virtual mailboxes for non-linux accounts using postfix.
This part of my main.cnf:
myhostname = localhost mydomain = aviacao.pt myorigin = aviacao.pt mynetworks = 127.0.0.0/8 mailbox_size_limit = 0 virtual_mailbox_domains = aviacao.pt virtual_mailbox_base = /home/vmail virtual_mailbox_maps = hash:/etc/postfix/vmaps virtual_minimum_uid = 1000 virtual_uid_maps = static:5000 virtual_gid_maps = static:5000 relay_host = recipient_delimiter = + inet_interfaces = all unknown_local_recipient_reject_code = 550
This works, but only when myhostname is set to localhost. If I set myhostname to aviacao.pt, it won't receive emails:
550 5.1.1 : Recipient address rejected: User unknown in local recipient table
Why is this the case? The howto even says that setting the myhostname as localhost can cause problems:
Using localhost as myhostname can cause problems since this variable is used > in the EHLO message the server sends.
Is this the best way? Will problems will this cause?