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 mynetworks
):
# apt-get install postfix
The /etc/aliases
looks like this:
root: [email protected]
if I want to send all mails from root to the mail address [email protected]
.