I followed the guide here: http://library.linode.com/email/postfix/gateway-ubuntu-10.04-lucid which has similar points to the question here simple postfix configuration - forward all incoming email to single address but I'm still having problems.

I running Ubuntu on Linode and have several domains which I simply want to forward any email to those domains to a gmail account.

My virtual postfix file has the following:

@domain1.com email@gmail.com
@domain2.com email@gmail.com
@domain3.com email@gmail.com

My main.cf is exactly as in the guide:

myhostname = jamie.mydomain.com
mydestination = localhost, li1121-21.members.linode.com, localhost.members.linode.com, lochahost
virtual_alias_maps = hash:/etc/postfix/virtual
home_mailbox = mail/

My FQDN (when I run hostname -f) is: jamie.mydomain.com and for the DNS records for mydomain.com I have an A record named jamie pointing to my IP address and an MX record named jamie.mydomain.com with priorty 0 as I also have other MX records.

All other domains that point to this IP address are setup with linode defaults, which is an A record called mail pointing to the IP address and an MX record named mail.mydomain1.com.

I feel like I have it setup as per the guide but whenever I send an email to any of the domains it just bounces.

Any help would be much appreciated.

  • What is the exact error in the mail log? – NickW Feb 25 '13 at 16:51
  • Where can I find the log? – peacemaker Feb 25 '13 at 16:55
  • Ok found the log. It says "550 Failed: User does not exist". Looks like it's trying to send to root@jamie.mydomain.com – peacemaker Feb 25 '13 at 17:01
  • should be /var/log/mail.log or similar – NickW Feb 25 '13 at 17:01
  • Interestingly, I have some entries in the mail.log that say messages were sent to the gmail account I have mapped in virtual but nothing has arrived, not in spam either – peacemaker Feb 25 '13 at 17:06

I ended up fixing this by completely removing all of sendmail and postfix and reinstalling. I followed this guide exactly and it worked first time.


Still not sure what the original error was but I wanted to add an answer here just in case others come across this question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.