5

I have the MX records for zaltin.com set to the Google Apps domains (aspmx.l.google.com etc.). If an email is sent to kerrick@zaltin.com from most places, it goes to my Google Apps account. However, on the zaltin.com server (Ubuntu 10.04 if it matters), sending via SMTP (postfix), if I send to kerrick@zaltin.com (via the Pony ruby gem if it matters), it simply routes to kerrick@localhost (showing up via the mail command) instead of going to my Google Apps account (where it should show up in my GApps Gmail inbox).

Can I make email sent via SMTP on my server, through my server, not go to my server but to Google Apps?

Kerrick
  • 175
  • 4

1 Answers1

5

You either have an entry in /etc/hosts pointing zaltin.com to localhost, like this:

127.0.0.1   zaltin.com

In which case you need to remove this, or you've configured Postfix to treate zaltin.com as a local destination in /etc/postfix/main.cf like this:

mydestination = localhost, zaltin.com

In which case you need to remove this.

mgorven
  • 30,615
  • 7
  • 79
  • 122
  • Ah, I believe it's the second one. If I remove that, can I still send email _from_ zaltin.com via postfix? – Kerrick Jul 08 '12 at 00:36
  • @Kerrick Yup, that doesn't restrict what From addresses you can use. As an aside, you should however setup SPF records. – mgorven Jul 08 '12 at 03:05
  • 1
    Yay, editing it out of that line fixed it! And I'll look into SPF records, thank you. – Kerrick Jul 08 '12 at 09:19