my situation is this. I run a VPS that currently is setup to use Google Apps for domain for inbound email (all the email to *@mydomain.com gets routed via Google to a gmail account). This works fine. I'm also using sendmail on my localhost to send outbound email. However some of the outbound email gets returned with issues around dns lookups, ptr records etc. Not all email gets returned but some does.

My question is - should I be using google's smtp server for outbound email or trying to fix my sendmail issues? (is that even possible since all my MX records now point to Google).

link|improve this question
When you say 'returned', do you mean your sendmail daemon marks the mail as undeliverable, or that your sendmail daemon thinks it's delivered it but MTA's outside your control return it? Your MX entries have no impact on your outbound e-mail assuming it's not being delivered and rejected by your own sendmail daemon. – EightBitTony Aug 5 '11 at 12:59
The emails are sent and rejected by the reciever's servers. Usually with some error about issues doing a reverse lookup. – tvfoodmaps Aug 5 '11 at 14:11
feedback

1 Answer

up vote 0 down vote accepted

The easiest way would be to configure your local sendmail to use Google's servers as a relay, or even use something like nullmailer instead of the beast that is sendmail.

This way, you will have a sendmail style way to send mail, but none of the hassles to get your system working.

link|improve this answer
Would you be able to elaborate on why this would be better than just connecting to gmail's smtp directly via my application code? – tvfoodmaps Aug 5 '11 at 14:06
Many programs and libraries expect to be able to send mails via a call of the sendmail program, and every mailer includes a program that acts somewhat like sendmail's own version. As long as only your app code needs to send mail, this doesn't matter, but as soon as you start using something else that needs sending mail, you will run into trouble (i.e. monitoring or log watching software). – SvenW Aug 5 '11 at 14:11
feedback

Your Answer

 
or
required, but never shown

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