Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Ubuntu VPS that is using exim4 as a satellite email server set up to send mail through Google Apps.

Mail meant to go to an address hosted by Google gets delivered. This means that things like a "contact us" webform is working because it delivers to the domain hosted on Google Apps.

Incoming and outgoing email from the Google web interface works fine and all of the MX records appear to be in order.

However, for some reason, sending outgoing email from the server to a non-Google-hosted address (as in, one that ASPMX.L.GOOGLE.COM doesn't know about).

Here's exim4 log message I get:

2009-05-19 13:25:54 1M6PKM-0008UQ-KL <= user@example.com U=user P=local S=1129
2009-05-19 13:25:58 1M6PKM-0008UQ-KL ** example@yahoo.com R=smarthost T=remote_smtp_smarthost: SMTP error from remote mail server after RCPT TO:<example@yahoo.com>: host gmail-smtp-in.l.google.com [209.85.217.49]: 550-5.1.1 The email account that you tried to reach does not exist. Please try\n550-5.1.1 double-checking the recipient's email address for typos or\n550-5.1.1 unnecessary spaces. Learn more at\n550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 1si10609358gxk.44
2009-05-19 13:25:58 1M6PKQ-0008UU-Bh <= <> R=1M6PKM-0008UQ-KL U=Debian-exim P=local S=2354
2009-05-19 13:25:58 1M6PKM-0008UQ-KL Completed

Is there some setting I might have missed, either on the server or in Google Apps itself?

It's obvious that I need to tell a config somewhere that "no, this isn't for you, just send it along". Any suggestions? (And I'd be happy to post any configs)

I've Googled extensively without finding anything specific to my issue.

EDIT: I'll also add that I'm getting this (in the spam folder) in my Google email account:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

 example@yahoo.com
   SMTP error from remote mail server after RCPT TO:<example@yahoo.com>:
   host gmail-smtp-in.l.google.com [209.85.217.49]:
   550-5.1.1 The email account that you tried to reach does not exist. Please try
   550-5.1.1 double-checking the recipient's email address for typos or
   550-5.1.1 unnecessary spaces. Learn more at
   550 5.1.1 http://mail.google.com/support/bin/answer.py?answer=6596 1si10609358gxk.44

------ This is a copy of the message, including all the headers. ------

Return-path: <user@example.com>
Received: from zeta by example.com with local (Exim 4.69)
       (envelope-from <user@example.com>)
       id 1M6PKM-0008UQ-KL
       for example@yahoo.com; Tue, 19 May 2009 13:25:54 +0000
To: example@yahoo.com
Subject: Account details for Test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8Bit
X-Mailer: Drupal
Errors-To: user@example.com
Sender: user@example.com
Reply-To: user@example.com
From: user@example.com
Message-Id: <E1M6PKM-0008UQ-KL@example.com>
Date: Tue, 19 May 2009 13:25:54 +0000

Test,

Thank you for registering...<snip>
share|improve this question
add comment

migrated from stackoverflow.com Jul 31 '09 at 16:42

This question came from our site for professional and enthusiast programmers.

2 Answers

As to why your smarthost configuration didn't work - do you have the premium version of Google Apps?

You can't use the free version as an outbound relay. Attempting to do so might appear as a "user not found" because the acceptable range of addresses is limited to the domains that Google Apps hosts.

http://www.google.com/support/a/bin/answer.py?hl=en&answer=60730

"You must have the Education or Premier Edition to utilize the Google Apps outbound gateway feature."

share|improve this answer
add comment

OK, it looks like it was a bit of a conceptual disconnect on my part.

I had the server set up to use a smart host. It should have been set up as an internet site. When you have that configured correctly it will connect directly to the recipient, no relaying needed. As long as the reverse DNS points to the right domain it seems to be trouble free.

I ran: dpkg-reconfigure exim4-config

And selected "internet site" with listening only on 127.0.0.1. That way I can't take incoming connections (which is the desired outcome) but can still send mail.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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