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) »
  • Invalid emails can hang CiviMail
Pages: [1]

Author Topic: Invalid emails can hang CiviMail  (Read 2344 times)

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Invalid emails can hang CiviMail
May 04, 2008, 11:19:26 pm
We imported a large dataset of contacts for a mailout recently, and one of those addresses contained an ampersand (which I'm pretty sure is not the RFC goodness). However, it imported into CiviCRM 2.0 fine - must have sneaked past the email address validation somehow.

Maybe it's valid. Anyway, when we did our mailout, CiviMail hung 2/3 of the way through, because each attempt to send the email would fail:
Code: [Select]
2008-05-05 18:08:36 H=mail.mydmain.xyz (localhost) [x.x.x.x] F=<bounce.1.68.5651.ff0bc975409b86b4254299902def6a7992d29562-abc&def=xtra.co.nz@mydomain.xyz> rejected RCPT <abc&def@xtra.co.nz>: restricted characters in address
2008-05-05 18:10:03 H=mail.mydomain.xyz (localhost) [x.x.x.x] F=<bounce.1.68.5651.ff0bc975409b86b4254299902def6a7992d29562-abc&def=xtra.co.nz@mydomain.xyz> rejected RCPT <abc&def@xtra.co.nz>: restricted characters in address

So there are two potential issues here:

1. CiviCRM perhaps should have rejected that email on import
2. CiviMail apparently can be blocked by queuing an address which is not acceptable to the mailserver (Exim in our case)

The fix (for me) was to correct the contact's email address; on the next queue run, CiviMail continued processing the queue.
@xurizaemon ā— www.fuzion.co.nz

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Invalid emails can hang CiviMail
May 13, 2008, 07:06:53 pm
See http://forum.civicrm.org/index.php/topic,3350.0.html for a fix
@xurizaemon ā— www.fuzion.co.nz

DaraghOBrien

  • Guest
Re: Invalid emails can hang CiviMail
June 04, 2008, 05:38:48 am
All,

Just an FYI regarding 'non-standard' characters and email. The Apostrophe (') is not (as far as I have been able to ascertain) an official non-standard character in email. This is despite it royally buggering SQL statements in code (it's interpreted as a closing quote) or potentially causing hiccups in PHP.

What I have direct personal experience of in my workplace and in a few voluntary organisations that I'm a member of is that certain names in certain nationalities/ethnic groups VALIDLY use aposotrophes and some enterprise level email servers (e.g. Microsoft Exchange) allow the use of apostrophes in names... e.g. daragho'brien@domain.com.

This has caused problems for other OpenSource tools I've used, in particular Joomla/Joomalopolis's Community Builder. My understanding of a workaround that was used for that Opensource tool was to ensure that 'non-standard' characters such as apostrophes or ampersands were escaped out in the string 'behind the scenes' so they weren't interpreted as code but could be reconstructed as 'human-readable' email addresses for presentation purposes.

It's been a while since I looked at that issue so I can't remember the full details of the fix (but it did seem to work).

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: Invalid emails can hang CiviMail
June 04, 2008, 02:57:26 pm
I believe that apostrophes are perfectly valid in email addresses, but generally poorly handled by the many softwares at large in the world.

If CiviCRM doesn't handle them correctly, you can open an issue to report that.

Matt says in http://forum.civicrm.org/index.php/topic,3350.0.html that his queue was stopped by two emails, one with a bangpath (!) and one with an apostrophe.

The exclamation mark is also valid, but it's not clear from Matt's post whether the SMTP server was rejecting the mail and thus blocking the rest of CiviCRM's queue being flushed.

From my experience (as described above) it's probably the former, in which case the issue is with the SMTP server not handling, or not being correctly configured to handle, uncommon address syntax.

(Bangpathers and Irishmen, I should apologise for calling you "uncommon". I mean it only respectfully, but you can still flame me for it if you must.)
« Last Edit: June 04, 2008, 02:59:05 pm by xurizaemon »
@xurizaemon ā— www.fuzion.co.nz

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: Invalid emails can hang CiviMail
June 04, 2008, 02:59:44 pm

Note that this was a bug and it has been fixed in CRM-3108. This was mentioned in this forum post:

http://forum.civicrm.org/index.php/topic,3350.msg14825.html#msg14825

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Invalid emails can hang CiviMail

This forum was archived on 2017-11-26.