Details
Description
According to the courier developer (http://markmail.org/message/63n2ukjznkcqsit7#query:+page:1+mid:j4x2z7j4ymytvjbf+state:results) this is the fault of the imap client.
In particular, the ezc client is trying to fetch the size of all the messages in the inbox, which requires a query to the imap server that exceeds the 16K limit of courier.
Although you normally won't get this many bounce messages - it is possible if:
- It's your first mailing and you have a large list
- Your bounce processor was broken for a while and you finally fixed it
I've cobbled together the follow hackish fix:
--- packages/ezc/Mail/src/transports/imap/imap_transport.php.orig 2014-10-20 13:26:13.000000000 -0400
+++ packages/ezc/Mail/src/transports/imap/imap_transport.php 2014-10-20 13:18:52.000000000 -0400
@@ -986,7 +986,8 @@
{
// get the sizes of the messages
$tag = $this->getNextTag();
- $query = trim( implode( ',', $messageList ) );
+ $truncatedMessageList = array_slice($messageList, 0, MAIL_BATCH_SIZE);
+ $query = trim( implode( ',', $truncatedMessageList ) );
$this->connection->sendData( "{$tag} FETCH {$query} RFC822.SIZE" );
$response = $this->getResponse( 'FETCH (' );
$currentMessage = trim( reset( $messageList ) );
However... it alters the ezc package to depend on a constant set in CiviCRRM.
I'm also not sure if it has any other implications.
I'm wondering if there are other suggestions for how to approach this, which could include exploring a different IMAP library or submitting a bug upstream (https://github.com/zetacomponents/Mail/).