ClearFoundation Tracker - ClearOS
View Issue Details
0000212ClearOSapp-mail-archive - Mail Archivepublic2010-11-18 13:212012-04-18 19:39
bchambers 
user2 
highmajoralways
closedfixed 
5.2-SP1 
5.2-SP1 
0000212: Mail Archive stops importing messages to database when header exceeds 4kb
Messages having headers of 4kb or larger (think very long to or cc lists) will cause one of the PHP functions used to grab message headers segfaults. This causes a permanent impairment to move mail messages that should be archived from the IMAP store to the server MySQL database.

Only known workaround to date (other than using a mail client and deleting the message(s) with > 4kb headers) is to skip over them:

Around line 1540 in /var/webconfig/api/Archive.class.php, add:

if (strlen(imap_fetchheader($mbox, $index)) > 4096) {
  echo "Skipping message with header that exceds 4kb";
  imap_delete($mbox, $index);
  continue;
}
Additional References:
http://bugs.php.net/bug.php?id=47736 [^]
http://www.redhat.com/archives/rhl-devel-list/2004-September/msg00872.html [^]
http://webaugur.com/dave/blogger/2009/06/php-imap-extension-evil.html [^]
http://www.washington.edu/imap/documentation/RELNOTES.html [^]
No tags attached.
Issue History
2010-11-18 13:21bchambersNew Issue
2010-11-18 13:22bchambersStatusnew => confirmed
2010-11-18 13:22bchambersDescription Updated
2011-03-24 11:04dloperNote Added: 0000344
2011-04-19 08:53flygarvagenNote Added: 0000349
2011-05-24 15:11user2Note Added: 0000355
2011-05-24 15:11user2Statusconfirmed => resolved
2011-05-24 15:11user2Fixed in Version => 5.2-SP1
2011-05-24 15:11user2Resolutionopen => fixed
2011-05-24 15:11user2Assigned To => user2
2012-04-18 19:39user2Statusresolved => closed

Notes
(0000344)
dloper   
2011-03-24 11:04   
Needs testing against 5.2. Doesn't show up on my system when used with a 7k header.
(0000349)
flygarvagen   
2011-04-19 08:53   
I just would like to confirm that the fix shown in the decription works in 5.2. After fix installation, all mail slowly began to show up in archived e-mails.
(0000355)
user2   
2011-05-24 15:11   
A "yum upgrade" will install the more recent version of libc-client