CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Intermittent SMTP error
Pages: [1]

Author Topic: Intermittent SMTP error  (Read 3077 times)

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Intermittent SMTP error
March 11, 2011, 09:37:07 am
I'm experiencing an intermittent SMTP error when sending civimail via cron.  Everything works fine when I test outbound email settings, send test civiMail messages, donation/event receipts, etc.  But on about 5% of my cron runs I get the "Invalid response code received from SMTP" error.  I've searched the forums for the error message and all the other cases seem to be for problems that occur 100% of the time.

When the error occurs, all the remaining emails in the batch (job?) get logged as unknown bounce types.  I have throttled the Mailer Batch Limit way back to 25, so that when it occurs, at most 25 emails are "bounced".

The intermittent nature of the problem makes me think that maybe it is not a civiCRM issue, but I don't quite know who to blame.  I would rather not switch my SMTP service if the the problem is my host, or vice versa. 

On the other hand, it does seems like civiMail shouldn't drop the rest of the batch on a single error.

FWIW, I'm running the CLI version of the cron script with nice.  My SMTP service is AuthSMTP, which claims to be able to handle 100x the volume of email I'm sending.  Host is a Dreamhost VPS.

Anyone see anything like this before?  Any educated guesses as to what's going wrong?

Here are the error details:
Code: [Select]
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [ccode] =>
    [message] => Invalid response code received from SMTP (outbound mail) server while attempting to send email.  This is often caused by a misconfiguration in the CiviCRM Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP).
    [mode] => 16
    [debug_info] =>
    [type] => PEAR_Error
    [user_info] =>
    [to_string] => [pear_error: message="Invalid response code received from SMTP (outbound mail) server while attempting to send email.  This is often caused by a misconfiguration in the CiviCRM Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP)." code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Intermittent SMTP error
March 11, 2011, 09:52:34 am

check your smtp log and see what the actual message from the SMTP server is. seems like that will give you a much better idea of what is happening and why. If i had to guess, AuthSMTP is rejecting all messages after a certain threshold due to "some" rules on the account/server

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Intermittent SMTP error
March 11, 2011, 10:03:49 am
Thanks for your help. 

Sorry to ask a stupid question, but do you mean a smtp log kept by civi, my server, or my smtp service?  None of the three were immediately obvious, and knowing where to start might save some effort.

I did look in sites/default/files/civicrm/templates_c/en_US/ConfigAndLog/CiviCRM.something.log and found the error I listed before, but I'm not sure what else I should be looking for.

Thanks again.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Intermittent SMTP error
March 11, 2011, 10:48:45 am

in this case its your smtp server logs. If you give them the time period when an email was rejected (and the civi logs should let u know what time) they should be able to give u a more detailed reason as to what happened and why

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

kmarkley

  • I post frequently
  • ***
  • Posts: 178
  • Karma: 14
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.1.56
  • PHP version: 5.3.27
Re: Intermittent SMTP error
March 14, 2011, 11:34:40 am
Just updating.  Got this from my SMTP service:

Quote
I've just spoken to one of our engineers - they've looked at the logs on the system - at the time the error is shown below in your logs, we show that session disconnecting - having not specified either a recipient to send to, or a valid SMTP command.

So it looks like something is 'stalling' somewhere within the code that you're running (possibly as it's not able to parse a response back from the server).

We've setup additional debug logging on your account in order to try to see what the 'last' operation your software does, before it disconnects from us - but obviously you'll need to try to reproduce the situation now, and then email us as soon as it occurs (similar output to that below is helpful as it lets us track down the mail faster).

If you can do that and get back to us - that'd be great. At this stage it looks like the software at your end isn't able to correctly handle a response sent back from our server (or is getting out of step) - which is causing your software to drop the connection (causing our end to log a simple "Oh, they disappeared without actually telling me to do anything" type error).

Hopefully the extra debug options will turn something up.

I'll be running another mailing in a couple days.  Hopefully I'll learn more then.

noah

  • I’m new here
  • *
  • Posts: 18
  • Karma: 4
Re: Intermittent SMTP error
June 14, 2011, 01:16:52 pm
I'm having a similar problem. We use an external SMTP provider, and after experiencing a nearly 50% bounce rate on a recent mailing (all good addresses). The Cron daemon sent me an email with the "Invalid response code received from SMTP (outbound mail) server while attempting to send email.", etc message.

I had to go through the time-consuming process of preparing and re-sending the mailing to the part of the list that had "bounced".

I contacted our SMTP provider for more info. They said their server might have throttled our connection, but they have no record of any SMTP errors:

Quote
Unfortunately there is no additional information within our logs to indicate what happened at that time.  If it was a case of throttling it would not have prevented your email from sending it just would have moved it to a slightly slower delivery queue to prevent server load from jumping to high. 

Judging from your previous updates it sounds as if there may have been a network hiccup somewhere between your computer and our server causing the "Invalid response" error.  If this happens again we will need as much detail as possible about the full error and any error numbers that may be included.

That's all well and good, but CiviCRM doesn't provide any detail on what kind of error occurred.

bmw

  • I post occasionally
  • **
  • Posts: 103
  • Karma: 4
    • Alcohol Justice - The Industry Watchdog
  • CiviCRM version: 4.5.8
  • CMS version: Joomla! 3.4.0
  • MySQL version: 5.5.42-cli
  • PHP version: 5.3.27
Re: Intermittent SMTP error
December 18, 2011, 11:57:29 pm
I also have had some of these issues and found the connection between the web host and the remote SMTP server is the culprit. Sometimes the reconnection/reauthorization fails.
Bruce Wolfe, M.S.W., CIO
Alcohol Justice, 501(c)3

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • CiviMail installation and configuration (Moderator: Donald Lobo) »
  • Intermittent SMTP error

This forum was archived on 2017-11-26.