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 »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • High Syntax bounce rate
Pages: [1]

Author Topic: High Syntax bounce rate  (Read 2408 times)

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
High Syntax bounce rate
October 02, 2013, 04:50:51 pm
We've had a sudden spike in bounce rate with the reason being listed in the report as being 'Syntax'.

No changes made to Civi with the last couple of months, but we have had four mailings recently have 20%-80% bounce rates. Not happening on all of them.

Are there any kind of logs where Civi stores the response received from our SMTP provider (Amazon SES?)

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: High Syntax bounce rate
October 03, 2013, 02:59:33 am

we store a snippet of this in the civicrm_mailing_event_bounce table (if its a mail bounce). might want to take a look at that

you can also take a look at the mail folder and check the processed subdir

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

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: High Syntax bounce rate
October 05, 2013, 10:27:43 am
So my civicrm_mailing_event_bounce table is full of:

"'Failed to set sender:example+b.1673.608743.33d47e8a55bd748b@example [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings "

My SMTP config settings are correct, as a large number of the e-mails do go out. This is the same error I ran into once several months ago, that never repeated itself again. Now it's back and seems to be frequent.

Is the 'Failed to set sender' coming from my SMTP e-mail provider, or is that generated by CiviCRM? Just trying to figure out if this is a Civi problem, or Amazon SES, or elsewhere?

podfish

  • I’m new here
  • *
  • Posts: 11
  • Karma: 1
Re: High Syntax bounce rate
October 11, 2013, 12:52:53 pm
Hi, folks:

This is happening to us as well with Amazon SES, same exact bounce message: failed to set sender, etc.

I've tried throttling back to a 300000 microsecond delay (3.33 mails/second) so to ensure we're not overusing our 5/second quota with amazon.    We have had failure rates of 75%-97% on three separate mailings.  Is there anywhere Civi stores the actual response from the smtp server?

I'm wondering if bpmccain found resolution, or is still working on it?

SK

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: High Syntax bounce rate
October 11, 2013, 01:18:11 pm
No solution yet, and we have a maximum send rate of some 30 e-mails per second. I've tried playing around with the throttling, but I can't get any proof it makes a difference. It works for a while, and then I get the error again.

It seems like intermittent issues with Amazon SES, but I'd like to see the actual response coming back from Amazon too - but no idea how to do that.

podfish

  • I’m new here
  • *
  • Posts: 11
  • Karma: 1
Re: High Syntax bounce rate
October 11, 2013, 01:38:28 pm
This is what the log shows for each error and the backtrace (log can be found at  ( civicrm/sites/default/files/civicrm/ConfigAndLog)

Looks like a response code of -1 and a null server response.  So, either Civi's SMTP is failing to actually send ze documents and the nulls are getting recorded as such, or amazon is arbitrarily rejecting messages without sending the codes that are in their documentation.  If it were throttling, I'd expect to see "454 Throttling failure: Maximum sending rate exceeded." expressed in some manner.

Code: [Select]

Oct 04 10:38:20  [info] Ignoring exception thrown by nullHandler: 10004, Failed to set sender: civimail+b.261.80011.d7d164e2c87c0ed9@coffeestrong.org [SMTP: Invalid response code received from SMTP server while sending email.  This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: -1, response: )]

Oct 04 10:38:20  [info] $backTrace = #0 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/CRM/Core/Error.php(766): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::nullHandler(Object(PEAR_Error))
#2 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
#3 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("Failed to set sender: civimail+b.261.80011.d7d164e2c87c0ed9@coffeestrong.org ...", 10004, 16, (Array:2), NULL)
#4 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/packages/Mail/smtp.php(294): PEAR->raiseError("Failed to set sender: civimail+b.261.80011.d7d164e2c87c0ed9@coffeestrong.org ...", 10004)
#5 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/CRM/Mailing/BAO/Job.php(657): Mail_smtp->send("****** <*******@earthlink.net>", (Array:12), "<div style=\"color: #2b392b; background-color: #a5a086; padding-left: 12px; p...", "261")
#6 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/CRM/Mailing/BAO/Job.php(568): CRM_Mailing_BAO_Job->deliverGroup((Array:1000), Object(CRM_Mailing_BAO_Mailing), Object(Mail_smtp), "20131004101700", (Array:0))
#7 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/CRM/Mailing/BAO/Job.php(174): CRM_Mailing_BAO_Job->deliver(Object(Mail_smtp), NULL)
#8 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php(2674): CRM_Mailing_BAO_Job::runJobs(NULL, NULL)
#9 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/api/v3/Job.php(339): CRM_Mailing_BAO_Mailing::processQueue()
#10 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/api/api.php(75): civicrm_api3_job_process_mailing((Array:1))
#11 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/CRM/Core/JobManager.php(132): civicrm_api("Job", "process_mailing", (Array:1))
#12 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/CRM/Core/JobManager.php(88): CRM_Core_JobManager->executeJob(Object(CRM_Core_ScheduledJob))
#13 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/api/v3/Job.php(136): CRM_Core_JobManager->execute(FALSE)
#14 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/api/api.php(75): civicrm_api3_job_execute((Array:2))
#15 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/bin/cli.class.php(99): civicrm_api("Job", "execute", (Array:2))
#16 /home/sketelsen/support.coffeestrong.org/sites/all/modules/civicrm/bin/cli.php(31): civicrm_cli->callApi()
#17 {main}

podfish

  • I’m new here
  • *
  • Posts: 11
  • Karma: 1
Re: High Syntax bounce rate
October 11, 2013, 02:06:25 pm
Seems to be consistent with a socket error.  Maybe DOS at amazon?  hmm.

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: High Syntax bounce rate
October 21, 2013, 05:25:04 pm
I'm lost on this issue, and it is becoming a massive problem. I'm going to have to start looking for alternatives to Amazon SES at this point  which is unfortunate as the price is awesome.

bpmccain

  • I post frequently
  • ***
  • Posts: 255
  • Karma: 5
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.2
  • PHP version: 5.2
Re: High Syntax bounce rate
November 14, 2013, 04:31:24 am
Ok, so I am down to this few lines of code in civicrm_packages_Mail_smtp.php:

Quote
if (PEAR::isError($res = $this->_smtp->mailFrom($from, ltrim($params)))) {
            $error = $this->_error("Failed to set sender: $from", $res);
            $this->_smtp->rset();
            return PEAR::raiseError($error, PEAR_MAIL_SMTP_ERROR_SENDER);
        }

I'm setting up some logs so that I can see what all of these variables are when it works and when it doesn't (since about 75% will go through on a specific mailing, and 25% won't - they will go through fine when we resend to those that initially failed).

The part that I am confused about, as in I don't know what it does, is this:
Quote
$this->_smtp->mailFrom($from, ltrim($params))

Any pointers would be much appreciated - I'm in over my head here!

Anyway, it appears the problem is in Civi, as this isn't taking any response from Amazon, and Amazon have indicated that they aren't receiving any of the messages that are showing as bounced.

Brian

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: High Syntax bounce rate
November 14, 2013, 07:01:57 am

that function is defined here:

packages/Net/SMTP.php

based on debugging a similar issue with sendgrid last year, it seems like SES might be closing its connection a bit early and/or exceeding the rate limits that they've imposed. so would be good to debug and see if you can get a more specific error message

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

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: High Syntax bounce rate
November 21, 2013, 03:01:29 pm
Was considering Amazon SES for civicrm via SMTP but saw this issue and not sure if it is specific to your install and if not what the status of the issue is.  Other than the obvious issue here, do you suggest Amazon SES integration?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • High Syntax bounce rate

This forum was archived on 2017-11-26.