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.

Possible Duplicate:
Outgoing mail from linux not being delivered

I'm looking into simplifying my web server setup and migrating from a Verio MPS dedicated machine to a rackspace cloud server.

One of the things I least relish is setting up mail servers, so I'm considering moving the mail for my domain to google apps mail. I've found out that this involves changing the MX entry in my DNS, which I know how to do via Verio's web interface.

There's a complication, however. My web server runs a few self-service pages that need to send out mail messages. There's a PHP-based page using the standard PHP mail() method and a ruby script using Net::SMTP.

The big question: Will these scripts continue to run correctly if I change the MX DNS entry to point to google?

Is there anything in particular that I need to watch out for?

share|improve this question

marked as duplicate by sysadmin1138 Jan 2 '12 at 22:52

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

up vote 0 down vote accepted

This question follows a common pattern that appears frequently on SF. You can see this answer.

share|improve this answer
    
Thanks, so basically I do need to modify sendmail to use Google apps or alternatively use scripts that can send using Google's remote SMTP server. Thanks. –  Frank R. Jan 3 '12 at 15:15

I fear a misconception here: DNS MX records for your domain have little to do with outgoing mail. Anyway, once you'll have moved your mail to GoogleApps and removed your local sendmail you will have to configure your web php and ruby apps to use SMTP to Google servers to send messages.

I would recommend anyway to keep a local MTA installed as null client, to allow for quick debugging of mail sending or delivery problems.

share|improve this answer
    
His web server is going to consider the outgoing email to his own domains as local mail (most probably $=w will be set to include it). So a simple nullclient is not a solution for it has to have a relay that knows how to handle such emails. That in turn would require using Gmail for all outgoing email via SMTP-AUTH which may get tricky if more than one senders originate from that box. –  adamo Jan 2 '12 at 22:18
    
A null client is, per Postfix definition, a "machine that can only send mail. It receives no mail from the network, and it does not deliver any mail locally". So no ambiguities between his domain vs. others, nor need to use Gmail (direct smtp delivery will do it). –  S19N Jan 2 '12 at 22:32
    
He runs sendmail. In sendmail a nullclient is similar but not quite the same. –  adamo Jan 2 '12 at 22:35
    
Hhmm.. I can see it might get tricky anyway.. and yes I do use sendmail (or rather sendmail was installed on the my machine by the hosting people and I don't want to touch it :-) –  Frank R. Jan 3 '12 at 8:36

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