Today I ran into the case, that I have my ubuntu server with postfix running as MTA. Since there is no IMAP server or something like this installed, I use this server only for relaying/proxying the mails to my gmail account.
Setup was straight forward (choose "Internet Site" and enter the ip of the server when it asks for
# apt-get install postfix
/etc/aliases looks like this:
root: [email protected]
if I want to send all mails from root to the mail address
This all went well, as long as there was only one domain running on the server. Let's say the first domain was
example.org and the second one is
That's why I had to reconfigure the postfix program:
# dpkg-reconfigure postfix
When it asked for the local servers (
main.cf) I added
example.net at the end.
But to make everything working (like Jem explained), I had to modify
/etc/aliases and create + modify the
First of all we need some virtual mapping for the email accounts to local aliases in
/etc/postfix/virtual (create it if it does not exist, yet):
example.net this-text-is-not-important [email protected] bob-dracoblue-net [email protected] bob-dracoblue-net [email protected] alice-dracoblue-net
To enable virtual aliases add/change the line to
virtual_alias_maps = hash:/etc/postfix/virtual
Update the postfix table map for the virtual file with:
# postmap /etc/postfix/virtual
Then the local aliases need to be mapped to real email addresses (append to
To reload the aliases run:
Eventually you have to run:
# postfix reload
to finalize the setup.
# tail -f /var/log/system.log
and try to send/receive mails! Have fun!