Server Fault is a question and answer site for system and network administrators. 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 have switched over to Google Apps so that I can make use of Google's mail server. Everything is working fine. When an email is sent from any email account it arrives in my Google account.

However, whenever a user uses my site to send an email to me; I make use of PHP to send the mail. The mail arrives in my old inbox (squirrelmail) which is installed on the server. It doesn't seem to go outside of the server network, its probably looking at something listed within the server.

My domains DNS settings are elsewhere and not on the server.

I have sendmail installed and I think qmail is acting as a wrapper because of Plesk. I have removed Plesk since then.

I hope somebody has made sense of the above and can help!

Thanks all for any help on this


Cento OS (2.6.18-194.11.3.el5xen)


share|improve this question
up vote 1 down vote accepted

In your /etc/mail/ you probably have a line like LOCAL_DOMAIN(´')dnl. Get rid of if, recompile your config and restart sendmail.

This line tells sendmail to accept mail for this domain. Without it it looks for the MX for this domain and submits it.

Maybe you have still the "default" of your installation, which should only be for sending mails out. Use this.

share|improve this answer

You almost certainly need to reconfigure your mail server to not accept mail for your domain. Or you may be able to change your PHP scripts to use Google as the SMTP server.

If your server is setup to accept email for that domain, then the messages will be accepted and not forwarded. You may need to include more details about your server setup (OS, mail server versions) for someone familiar with sendmail or qmail to tell you how to adjust the mail server configuration.

share|improve this answer
I have updated my question with that information. – Abs Sep 21 '10 at 22:42
I can't help much with sendmail. My preferred *nix mail server is Exim. – Zoredache Sep 21 '10 at 22:51

Your Answer


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.