Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to automatically send an email to a mailing-list.

The machine running sendmail is, which is a standard Ubuntu with Postfix. The recipient is which is a Google Apps-managed mail address. The email is never received.

I've tried to send an email to a address and it works, so I'm guessing sendmail doesn't even bother to contact MX record (which resolves to Google) because the local domain is (registered as such in /etc/hosts).

Is my guess right? How can I force sendmail to actually send the mail?

Here is what the mail server tells me (confirming that it's sending the mail locally).

$ cat /var/mail/foo
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii

This is the mail system at host xxx.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

               The mail system

<>: unknown user: "foo"
share|improve this question
This should be migrated to ServerFault, and then closed as a duplicate of this ServerFault question that already has answers and this ServerFault question that has more answers. – JdeBP Jun 2 '11 at 16:04
up vote 1 down vote accepted

It sounds like you have postfix configured to accept mail for, but you actually want that mail sent somewhere else.

You should modify your postfix config (, checking the 'mydestination' parameter. This is the list of domain names that postfix considers itself the final destination for.

I'm also assuming that the MX record for is correctly set to the relevant google apps servers.

I'm also assuming that it is postfix your are using.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .