Closed (cannot reproduce)
Project:
Mailhandler
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Dec 2006 at 17:06 UTC
Updated:
23 Dec 2010 at 03:26 UTC
I've got Mailhandler and Listhandler importing a mailing list into Drupal. The setup and cron seems to be working fine. Messages get imported and are deleted out of the pop3 mailbox.
My problem is that not all of the messages are imported. I haven't found anything odd or telling about the messages that Mailhandler refuses to import. The messages are unread and seem to be addressed properly, but Mailhandler leaves them untouched in the (Debian Stable, Courier) pop3 mailbox.
Attached is one message which Mailhandler seems to not want to import. If any add'l info is req'd, just let me know.
Comments
Comment #1
moshe weitzman commentedis there anything in the watchdog? might be an PHP IMAP problem
Comment #2
IntnsRed commentedI do frequently get two errors related to Mailman, but I'm not sure if they're significant. They're:
Table 'web_db.listhandler' doesn't exist query: INSERT INTO listhandler (msgid, nid, cid, pid, uid, mid, tid) VALUES ('<200612191839.kBJId5Dm034453@viola.tamara-b.org>','2775','0','0','3','1','1') in /home/www/.../includes/database.mysql.inc on line 121.
and
Table 'web_db.listhandler' doesn't exist query: SELECT * FROM listhandler l INNER JOIN node n ON l.nid = n.nid WHERE n.title LIKE '%uban Migration in Context' AND mid = 1 ORDER by n.nid DESC in /home/www/.../includes/database.mysql.inc on line 121.
Comment #3
IntnsRed commentedTo add more to this, the problem isn't the above error. I reinstalled and Mailhandler now operates without any sort of error.
However, the problem still exists -- it refuses to import some messages.
It's interesting; I use Mail/Listhandler to import some Debian.org mailing lists, one quite high in volume. For those lists Mailhandler performs flawlessly -- it just seems to have problems with this one list. One thing I have noticed is that this problem list has some Mac posts in it with odd chars, but nothing really odd seems to stand out.
Comment #4
handelaar commentedSee also 104249. There is a log message generated, but nobody knows what it's complaining about.
Comment #5
handelaar commentedDoh. 98723.
Comment #6
siliconmind commentedsame problem here. mailhandler for some reason ignores some messages. i did some debugging and found out that mailhandler sees these messages but it treats them as empty and so refuses to download them. i have no idea why - messages are correct and they display in a webmail client ad download with thunderbird without a problem... but mailhandler treats them as empty. any ideas?
Comment #7
siliconmind commentedok, upon further testing i've found out that the problem (at least in my case) lies in this line
it looks like function drupal_convert_to_utf8 is unable to handle correctly the message body (returned earlier by imap_fetchbody function) and it returns an empty string. this empty string travels back to mailhandler_retrieve function which treats our message as empty.
unfortunately my knowledge ends here :( i have no idea why function drupal_convert_to_utf8 fails and how to prevent that. someone more skilled than me should take look at this code.
i did some more testing that may be of some help to others: the message body that breaks the whole process probably contains some wrongly encoded characters, because when i omit call to drupal_convert_to_utf8 and just return unconverted body i get only part of it that ends just before first non ASCII char. what's wired all the message headers looks fine. It is hard for me to debug this closely because the content that gets cut is generated by a mail server when message goes through it.
to me it looks like the mail server encoding is different that message encoding itself. the mail server just ignores the message encoding and injects its content using different encoding what possibly may cause trouble.
off course the mail itself is displayed with the whole body in place when i view my mailbox with through my web browser, but encoding is clearly broken - the non ASCII char that gets cut from the body in mailhandler module is displayed incorrectly, but still it is there and all that's after it.
Comment #8
mlncn commentedIn my case the problem was iconv, GNU recode and mbstring disabled on my shared host.
Comment #9
cor3huis commented