views:

19

answers:

4

Currently were getting considered spam and we need to figure out what is the best soulution.

Should we be using sendmail or sending via smtp directly to google?

+1  A: 

When you adjust the MX record, you are basically adjusting the incoming mail. It doesnt really affect outgoing email. So when you send using sendmail, the SMTP server in use is your own server on that machine. However when you use smtp to gmail, well ... then your smtp server is gmail.

When someone sends you an email, the MX record will point where that mail needs to go. It has nothing to do with outgoing email.

Sabeen Malik
+1  A: 

Yes.

  • In the first case, you are handing out the message to Gmail's SMTP server for the delivery.
  • In the second one, you are handing out the message to sendmail, which, depending on its configuration, will hand it to your ISP's SMTP server (or whatever else is configured) or directly to Google's SMTP servers. In any case, the SMTP servers in Google's MX records may be different form what you call "Gmail's SMTP server" (i.e., the first may not relay).
Artefacto
A: 

If you're using gmail smtp to send emails from your domain, have you thought about implementing DKIM/SPF in your DNS?

DKIM stands for Domain Keys, and is a dns entry containing an encryption key for authorising your domain as a sender. It'll look something like below, although i'm not sure if Google have implemented it:

gm._domainkey TXT "k=rsa p=sdhisgnsdgnejrneikslnmvdfkls"

SPF is sender protection framework, and entails adding to your dns a txt record that authorises other servers to send mail on behalf of your domain. An SPF for google will look something like:

mydomain.com. TXT "v=spf1 include:aspmx.googlemail.com -all"

Both of these will massively help reduce your spam score, which you can measure with tools like litmusapp.com.

Alternatively, I use postmarkapp.com, an email sender (with smtp and an api) which deals with a lot of the spam score for you and can also feed back to your app (via a webhook) when an email bounces.

adam
A: 

Mail spam filters use the sending IP address as a major component of determining the spamminess of the incoming message. Unless you've specifically paid attention to maintaining it, your outbound mailserver's IP address -- the box you're running sendmail on -- is likely to have a neutral-to-bad reputation in most major spam filters (e.g. Gmail, Postini, and Yahoo to Barracuda and IronPort).

Therefore, for the highest deliverability I'd recommended you send through the Gmail outbound servers.

That recommendation is assuming you can do so within the TOS; Gmail is meant for individual use, not to be an application gateway, so if you're sending more than approx. 100 messages per day, you should instead look at a commercial relay solution. Adam mentioned http://postmarkapp.com; two other choices we dealt with at Yahoo were http://authsmtp.com and http://sendgrid.com.

Hope that helps.

mrisher