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) »
  • Fatal error on cron job whenprocessing bounce email
Pages: [1]

Author Topic: Fatal error on cron job whenprocessing bounce email  (Read 3328 times)

Alan.Guggenheim

  • Guest
Fatal error on cron job whenprocessing bounce email
April 07, 2010, 07:35:54 am
The processing of bounced emails stopped on one email and gave the following error:

The Line 5 - Message ignored by CiviMail is strange and repeating always, but now, suddenly I have the following errors:
Line 5 - Unexpected line: <br />
Line 6 - Unexpected line: <b>Fatal error</b>:  Call to a member function __toString() on a non-object in <b>.../public_html/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Reply.php</b> on line <b>124</b><br /> After line 6 - Unexpected end-of-file. Expected 'got to end of mailbox' message
--------------------
connecting to mail...., authenticating as ... and selecting INBOX mailboxes found: INBOX.....processed, INBOX.Trash, INBOX.Drafts, INBOX.Sent, INBOX, INBOX.....ignored, INBOX.Junk fetching 50 messages retrieving message 3804 <br /> <b>Fatal error</b>:  Call to a member function __toString() on a non-object in <b>/home/.../public_html/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Reply.php</b> on line <b>124</b><br />
 


I went into the mailbox to look, and it seems that one message was creating the problem:
Date:  Tue, 06 Apr 2010 02:27:03 -0500 [02:27:03 AM CDT]
From:  Gateway@
To:  civimail+r.215.231640.689c8b4cbaa1d024@xxxxxxxx.com
Subject:  NDN:
Headers:  Show All Headers 

This message was written in a character set (utf-8) other than your own.
If it is not displayed correctly, click here to open it in a new window.

Sorry. Your message could not be delivered to:

swestcott,fc (The name was not found at the remote site. Check that the name
has been entered correctly.) 

I am not sure at what level this should have been trapped.
Thanks

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Fatal error on cron job whenprocessing bounce email
April 09, 2010, 04:53:41 am
Quote from: Alan.Guggenheim on April 07, 2010, 07:35:54 am
Line 6 - Unexpected line: <b>Fatal error</b>:  Call to a member function __toString() on a non-object in <b>.../public_html/sites/all/modules/civicrm/CRM/Mailing/Event/BAO/Reply.php</b> on line <b>124</b>

That line should be something like the below:

Code: [Select]
            $parsed->setHeader('Reply-To', empty($replyto) ? $parsed->from->__toString() : $replyto);
Quote
I went into the mailbox to look, and it seems that one message was creating the problem:
Date:  Tue, 06 Apr 2010 02:27:03 -0500 [02:27:03 AM CDT]
From:  Gateway@

Hm, if the From: header does indeed look like this, then it might be the culprit – without anything after the @ it’s not a valid address. Can you double-check that it’s indeed domain-less?
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.

Alan.Guggenheim

  • Guest
Re: Fatal error on cron job whenprocessing bounce email
April 09, 2010, 07:29:04 am
Piotr,
Yes, that is what it is. Here is the complete header.

Content-Transfer-Encoding:  8bit 
Content-Type:  text/plain; charset=UTF-8
Date:  Wed, 07 Apr 2010 05:10:37 -0500 [04/07/2010 05:10:37 AM CDT]
Delivery-date:  Wed, 07 Apr 2010 05:12:18 -0500
Envelope-to:  civimail+r.223.237456.b483522eb7a5ea5f@<oursite>.com
From:  Gateway@
MIME-Version:  1.0
Message-id:  <fc.00870b2f11d65f513b9aca00d63b5463.11d65f52@conroeisd.net>
Received:  from daep.conroeisd.net ([198.62.218.95] helo=conroeisd.net) by <our server> with esmtp (Exim 4.69) id 1NzSF8-000500-57 for civimail+r.223.237456.b483522eb7a5ea5f@<oursite>; Wed, 07 Apr 2010 05:12:18 -0500
Return-path:  <>
Subject:  NDN:
To:  civimail+r.223.237456.b483522eb7a5ea5f@<oursite>
X-FC-Icon-ID:  2031
X-FC-MachineGenerated:  true
X-FC-SERVER-TZ:  10486504
X-FC-Thread-ID:  3b9aca00-d63b5463
X-Mailer:  FirstClass 10.0 (build 10.010)

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Fatal error on cron job whenprocessing bounce email
April 13, 2010, 04:32:53 pm
Quote from: Alan.Guggenheim on April 09, 2010, 07:29:04 am
Yes, that is what it is. Here is the complete header.

[…]
From:  Gateway@

Hm, I went through RFC 5322’s section 3.4.1 and to the best of my reading skills the domain cannot be empty, so the above is an invalid address.

I think the best thing to do is to remove that email from the mailbox and/or try to figure out how it got there (and, perhaps, rewrite such addresses to valid ones somehow).
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.

Alan.Guggenheim

  • Guest
Re: Fatal error on cron job whenprocessing bounce email
April 13, 2010, 05:04:54 pm
Piotr,
The issue actually is that the contact email seems correct. It looks like the mail server it belongs to is the one sending back that strange and probably incorrect message back to my SMTP server!
I had deleted this contact, but he registered again!
I suspect their anti-SPAM settings, as it is a school district email system.
In any case, don't you think it should be better trapped?
Thanks

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Fatal error on cron job whenprocessing bounce email
May 20, 2010, 05:20:26 am
Quote from: Alan.Guggenheim on April 13, 2010, 05:04:54 pm
The issue actually is that the contact email seems correct. It looks like the mail server it belongs to is the one sending back that strange and probably incorrect message back to my SMTP server!
I had deleted this contact, but he registered again!
I suspect their anti-SPAM settings, as it is a school district email system.

Hm, generating invalid emails is a risky way to implement anti-SPAM system… :)

Quote
In any case, don't you think it should be better trapped?

Agreed. I filed CRM-6282 for this.
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.

Piotr Szotkowski

  • Moderator
  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Fatal error on cron job whenprocessing bounce email
May 20, 2010, 05:41:15 am
Can you try whether the attached patch solves this particular problem?
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) »
  • Fatal error on cron job whenprocessing bounce email

This forum was archived on 2017-11-26.