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.

I have a Linux VPS with two Drupal sites, one of them using Drupal Commons. Both installations are told to send mail via sendmail, which in turn is configured to relay mail to the Gmail SMTP server (via the smart host directive). Two different accounts, on two different (free) Google Apps domains are used to send.

The non-Commons server is used to send out a newsletter to a large-for-me number of recipients (>350), yet I've never had a problem with this account being suspended. The Commons server is set up with notification rules to send emails to everyone subscribing to a certain piece of content, or a group, or a user, etc. However, the bulk of these notifications are much smaller, perhaps 20-30 in a batch, and the site is not heavily trafficked. Yet Google keeps suspending my user on that domain "for abuse" every few days.

Has anyone run into something similar, and hopefully found a workaround for it? I have ensured I've set SPF and DKIM records on (both) my hosts at this point but it hasn't seemed to help.

Any other suggested methods I might be able to send out mail from my two domains without going through Google's SMTP service? In the case of the Commons site, it is just a notifier and I do not need to accept return emails.

Grateful for any assistance, and happy to post any of my configs (just not sure which configs would be most suitable).

share|improve this question
    
I don't have any answers at the moment... just more questions: 1) Have you raised this with Google themselves? They would probably be the best resource to tell you why exactly they're blocking. 2) What is the complete error you're getting back? 3) Is there a specific reason why you're smart-hosting everything through gmail? Does your VPS host permit you to send directly? –  Mike B May 7 '12 at 21:54
    
What is the total monthly volume of emails being sent out of the server that gets suspended? Free versions of gmail (including apps for your domain) have limits on how many outgoing emails you can send. –  Grant May 8 '12 at 12:45
    
Total monthly volume is likely in the 1000 message range. On a busy day, the server generates perhaps 80-100 messages. I thought the Google SMTP send limit was set by day though, not by month. The other site, via its newsletter function, can generate in excess of 350 (identical) emails in one day, although it sends more rarely (maybe once or twice per month). I have conflicting information about what the daily limit is, some say 500 and some say 100. –  Mikael May 8 '12 at 15:55
    
Mike: 1) I haven't raised it with Google yet - they have no official support for free Apps service. 2) The error messages in maillog looks something like this: Apr 30 16:30:23 d6 sm-mta[18235]: q3UKULXV018233: to=<redacted@gmail.com>, delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=121226, relay=smtp.gmail.com [173.194.77.108], dsn=4.0.0, stat=Deferred: 421 4.7.0 Temporary System Problem. Try again later (WS). bd10sm17763408obb.15 3) Really, because that's what I've always done, as it's had the best delivery success in the past. Perhaps switching to native delivery w/o smarthost works? –  Mikael May 8 '12 at 16:04
    
Did some more reading. Apparently I can deliver mail using sendmail as an MTA for both my hosted domains, as long as I use the 'genericstable' to specify which sender accounts map to which domain, right? That'd imply I could then bypass Google's SMTP server. If I still keep the MX records on my domains pointing to Google's mail server, return mail will go to Gmail, is that right? All I'd have to do then is install Drupal's SMTP Authentication Support module into each install to ensure Drupal's not trying to send as apache@realhostname. Can anyone confirm this approach? –  Mikael May 8 '12 at 19:20

1 Answer 1

up vote 1 down vote accepted

To send mail to your Google Apps domains via sendmail see this answer. This may not solve your problem as the IP address of your VPS may have a "bad" sending reputation for whatever the reason. You may try and check the reputation of your addresses in services like:

  • senderbase.org
  • postmaster.live.com/snds
  • senderscore.org

and the multitude of DNSBLs that exist out there.

share|improve this answer
    
adamo, I'm not trying to send mail -to- a Google Apps hosted mailbox, but -through- a Google Apps account via SMTP. Or did I misunderstand your answer? I've checked my IP address via the services you listed (thanks!) and none of them have enough data on my exact IP - some other IPs in my subnet, assigned to other people, are 'bad', a few more are 'good', and most are 'neutral'. –  Mikael May 8 '12 at 16:10
    
If you want to send mail from your virtual machine via Google Apps, you have to set up sendmail to talk to Google via SMTP-AUTH. You do not mention that and you are specifically asking for "Any other suggested methods I might be able to send out mail from my two domains without going through Google's SMTP service? " I showed you such a method. –  adamo May 8 '12 at 22:00
    
Sorry, yes, I am using SMTP-AUTH, as this is required when using smtp.gmail.com as a smarthost, which is my stated setup. I am then using the {f} macro in the authinfo section as described here: cthayer.wordpress.com/2008/10/03/… to map the envelope's sender address to the correct credentials in authinfo.db, thus sending mail from sendmail via SMTP-AUTH through the respective Google Apps email account depending on which domain is sending the mail. –  Mikael May 9 '12 at 13:48
    
Unless I'm missing something, the answer you linked to is a solution to ensure that outgoing mail addressed to a user on the same domain as the server is properly delivered to a Google Apps mailbox, instead of delivered locally to the server. That's not my problem. Rather, my problem is that using SMTP-AUTH with Google's SMTP server causes them to lock my account, and I was wondering if there was another way I could send mail TO my users addressed FROM a Google Apps Gmail account rather than sending through Gmail's SMTP. I'm curious what you think of my comment from yesterday, would that work? –  Mikael May 9 '12 at 13:53
    
Since you've setup your SPF records to include your virtual machines, there is no need to use Google's relay. You can send directly anywhere, including sending to your own domain. This is the solution to your problem. You have a problem that is solved the same way (plus your account will not get locked up). Just try it. –  adamo May 9 '12 at 17:04

Your Answer

 
discard

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.