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) »
  • Suggested improvement to reduce number of emails ignored by CiviMailProcessor
Pages: [1]

Author Topic: Suggested improvement to reduce number of emails ignored by CiviMailProcessor  (Read 972 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Suggested improvement to reduce number of emails ignored by CiviMailProcessor
June 16, 2010, 09:32:42 pm
Folks,

I notice that some bounce messages are ignored by the CiviMailProcessor. I think I've discovered why, and suggest a possible improvement.

Bounces from a Domino server are often ignored by CiviMailProcessor, and perhaps this could be improved by looking for the CiviMail address pattern in the "Delivered-To" header.

Let me flesh out the scenario. Assume I send a message To: bart@simpson.tv From: sender@my.org with Return-path civimail+b.1.2.e@my.org

Usually bounces are sent (in this case) To: civimail+b.1.2.e@my.org which CiviMailProcessor recognises as conforming to the CiviMail address pattern.

But Domino bounces are sent To: sender@my.org which CiviMailProcessor ignores (I can see that the code at CiviMailProcessor.php line 123 looks inside the mail body for addresses of the form 'civimail+b.1.2.e@my.org' but it doesn't find any)

I notice with these Domino bounces that the Delivered-To: header contains the CiviMail address, as does X-Original-To:

Ken

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Suggested improvement to reduce number of emails ignored by CiviMailProcessor
June 16, 2010, 10:44:26 pm
That idea might not be so brilliant, as it may be that Postfix (my MTA) is adding the Delivered-To: header, and if that's the case, then this solution is not generic.

How about looking for an address matching the CiviMail pattern in ANY header? Or does that open up wormy cans?

Ken

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Suggested improvement to reduce number of emails ignored by CiviMailProcessor
June 17, 2010, 02:44:14 am
I’m not sure bouncing to anything else than the Return-Path: header contents is valid, really (that’s the whole point of that header/SMTP envelope sender).

Quote
How about looking for an address matching the CiviMail pattern in ANY header?

I thought about this, and it might be doable – provided we rule out all the other cases first (i.e., it will be the last resort before ignoring an email). Patches welcome, of course. :)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

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: Suggested improvement to reduce number of emails ignored by CiviMailProcessor
June 17, 2010, 08:19:30 am

i'm not very sure if we should start adding various mailer specific idiosynchracies to the core code. they should be maintained as separate patches outside of CiviCRM

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

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Suggested improvement to reduce number of emails ignored by CiviMailProcessor
June 17, 2010, 07:43:02 pm
I wholeheartedly agree that the codebase should be kept free from idiosyncrasies (unless they're OUR idiosyncrasies, right?). And the world of mail systems is systematically idiosyncratic, from what I've observed!

In the spirit of "do no harm", and assuming that the presence of the CiviMail pattern (civimail+b.123.456.abcdef1234567890@my.org) anywhere in the email indicates it should be processed, is there any harm in looking in each of the headers?

If someone could show me how to iterate through the headers, I could attempt to submit a patch.

Ken

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Suggested improvement to reduce number of emails ignored by CiviMailProcessor
June 18, 2010, 08:15:46 am
Quote from: ken on June 17, 2010, 07:43:02 pm
In the spirit of "do no harm", and assuming that the presence of the CiviMail pattern (civimail+b.123.456.abcdef1234567890@my.org) anywhere in the email indicates it should be processed, is there any harm in looking in each of the headers?

If the bouncing is not done to the Return-Path address (but instead to some other address), I don’t really understand where you’d want to look for the bounce address in the bounce reply – i.e., if Domino bounces to the To address, why would it put the bounce address anywhere in the bounce headers?

(Note that we also set the X-CiviMail-Bounce header, but, again, we set it in the initial email, and there’s no guarantee – nor reason – for the bounce to contain it.)

Quote
If someone could show me how to iterate through the headers, I could attempt to submit a patch.

As per packages/VERSIONS, in CiviCRM 3.1 and 3.2 we use eZ Components 2009.1.2 – look into bin/CiviMailProcessor.php to see how we handle the emails and check the eZ Components’ Mail docs.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Suggested improvement to reduce number of emails ignored by CiviMailProcessor

This forum was archived on 2017-11-26.