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) »
  • CiviMailProcessor.php not reading IMAP mails?
Pages: [1]

Author Topic: CiviMailProcessor.php not reading IMAP mails?  (Read 841 times)

buzz

  • Guest
CiviMailProcessor.php not reading IMAP mails?
July 14, 2009, 09:29:22 am
I set up CiviMail some time ago and use CiviMailProcessor.php as the return channel. I made some tests that time and the script was able to login into an IMAP account I created for this purpose (civimail-return@SITENAME). It selected messages and put them into Civimail.ignored/processed subfolders as it should. But now we are doing real life newsletters.

But now it refuses to work... It logs into the IMAP account but it seems it doesn't recognize the mails or can't fetch mails at all.

For debugging I start the script manually. Here is what it says:

Code: [Select]
HOSTNAME:/home/www/SITENAME/secure/drupal-6.12/sites/all/modules/civicrm/bin# /usr/bin/wget -O - -o /dev/null -t 1 -T 1200 'https://SITENAME/drupal/sites/all/modules/civicrm/bin/CiviMailProcessor.php?name=cron&pass=SECRET&key=SECRET'
connecting to localhost, authenticating as civimail-return@SITENAME and selecting INBOX
mailboxes found: Trash, INBOX, Sent, INBOX.CiviMail.ignored, INBOX.CiviMail.processed
fetching 50 messages
retrieving message 7

I spent half an hour inserting PHP snippets into the civimail code to track down the problem. It seems the problem is somewhere in the IMAP processing:

CiviMailProcessor.php calls $store->fetchNext(50) and iterates over them. But this method doesn't return any mails. Instead it gets stuck in CRM/Mailing/MailStore.php in the function fetchNext supposedly on line $parser->parseMail...

Anyone knows something? I'm lost here...

How can I persuade php to give me more debug infos? Maybe there's some exception thrown? The web server logs don't spit out nothing at all.

I'm very grateful for any kind of help!

Mirko

(The key/username thingy works flawlessly, I tested it.)

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: CiviMailProcessor.php not reading IMAP mails?
July 14, 2009, 03:48:02 pm

seems like the imap processor might have an issue with mail 7. can u move/hide that specific mail and see if it makes progress

if it does, you might want to follow up with the ezComponent folks. our mail library code is from that package

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

buzz

  • Guest
Re: CiviMailProcessor.php not reading IMAP mails?
July 14, 2009, 06:26:39 pm
Alright. I filtered out and it only chokes on this specific mail.

The one causing the trouble bounced from Hotmail's MTA. It's a normal mailer daemon notification. They send the whole message and attachments back (together like 250kB).

Chris Burgess

  • Ask me questions
  • ****
  • Posts: 675
  • Karma: 59
Re: CiviMailProcessor.php not reading IMAP mails?
July 23, 2009, 06:15:35 am
I just set up CiviMailProcessor.php and it choked on a couple of emails as well. Might be worth us digging out a collection of emails which CiviMailProcessor can't handle. I don't recall imap2soap.pl ever doing that (but I'd prefer to be using a supported PHP version than imap2soap).

Cheers
@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: CiviMailProcessor.php not reading IMAP mails?
July 23, 2009, 06:31:20 am

all the imap mail handling is handled by the ezpublish mail library (ezMail). so would help us a lot if one of u'll could follow up on their forums and figure out why it chokes on certain emails etc

thanx

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) »
  • CiviMailProcessor.php not reading IMAP mails?

This forum was archived on 2017-11-26.