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?
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?
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.
Yes.
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.
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.