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) »
  • CiviMail getting stuck - best approaches to fix this?
Pages: [1]

Author Topic: CiviMail getting stuck - best approaches to fix this?  (Read 1145 times)

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
CiviMail getting stuck - best approaches to fix this?
September 04, 2008, 06:21:36 pm
When people enter invalid emails into CiviMail, the queue can become stuck. Rather than moving on to the next mail in the queue, CiviMail dies with a fatal error and all other mails in the CiviMail queue will be held by this. Because the CiviMail job is run from cron, there can be no visible notification - the cron job will print out the error template as a result.

I'm observing these issues in 2.0.5.

I think there are a couple of issues here, which I'd like to muster before raising any issues (or updating issues that exist):

CiviMail should handle rejection of a single address by the SMTP server
  • CiviMail should not exit fatally, but should progress to the next message
  • CiviMail should mark the address as undeliverable if the SMTP return code is 501 (or similar?)

I think both of these steps are important, but primarily the first. I think it's a bug that CiviCRM exits after a single SMTP transaction fails, and fails to progress through the queue.

CiviCRM could validate email addresses on input

This can't be relied upon; I've seen a few reports (in this forum I believe) where the SMTP server was rejecting bangpath addresses or addresses containing apostrophes. If we do validate input on emails (and probably we already do) then it's entirely possible that the SMTP server will reject addresses which are valid for reasons of its own (... friend@public.com). Even so, today I had a CiviMail run blocked because of an address surrounded by apostrophes, and then a second address which had a space at the start. Both of these could have been resolved with a trim($email, "' <>") in the code which stores email addresses.

I'd like to progress this to an issue in JIRA, but I figured I'd try and engage some feedback from others familiar with CiviMail first. Please add your comments / input / suggestions!
@xurizaemon ● www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviMail getting stuck - best approaches to fix this?
September 04, 2008, 06:27:37 pm
Related reading:
 * http://forum.civicrm.org/index.php/topic,4254.0.html
 * http://forum.civicrm.org/index.php/topic,703.0.html
 * http://forum.civicrm.org/index.php/topic,3268.0.html
 * http://forum.civicrm.org/index.php/topic,3350.0.html

Oh! And the fix for this issue - thanks Lobo :)

 * http://issues.civicrm.org/jira/browse/CRM-3108

@xurizaemon ● www.fuzion.co.nz

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • CiviMail getting stuck - best approaches to fix this?

This forum was archived on 2017-11-26.