diff --cc modules/mailhandler_php_imap/plugins/mailhandler/retrieve/MailhandlerPhpImapRetrieve.class.php
index 9ada2fa,516d171..0000000
--- a/modules/mailhandler_php_imap/plugins/mailhandler/retrieve/MailhandlerPhpImapRetrieve.class.php
+++ b/modules/mailhandler_php_imap/plugins/mailhandler/retrieve/MailhandlerPhpImapRetrieve.class.php
@@@ -349,10 -336,23 +349,23 @@@ class MailhandlerPhpImapRetrieve extend
     * @return array|false
     *   Retrieved message, or FALSE if message cannot / should not be retrieved.
     */
 -  function retrieve_message($result, $mailbox, $msg_number, $filter_name) {
 +  public function retrieve_message($result, $mailbox, $msg_number, $filter_name) {
      extract($mailbox->settings);
-     $header = imap_headerinfo($result, $msg_number);
 -    // Grab the default header objects, along with any custom objects
++    // Grab the default header objects.
+     $header_orig = imap_headerinfo($result, $msg_number);
 -    // Get all the headers, and handle the multi-line ones.
++    // Grab all the headers including custom objects, and handle the multi-line ones.
+     $header_array = explode("\n", imap_fetchheader($result, $msg_number));
+     foreach ($header_array as $line) {
+       if (preg_match('/^(.*): (.*)/', $line, $arg)) {
+         $header_add[$arg[1]] = $arg[2];
+         $last = $arg[1];
+       }
+       else {
+         $header_add[$last] .= "\n" . $line;
+       }
+     }
+     $header = (object) array_merge((array) $header_orig, (array) $header_add);
 -    // Check to see if we should retrieve this message at all
 +    // Check to see if we should retrieve this message at all.
      if ($filter = mailhandler_plugin_load_class('mailhandler', $filter_name, 'filters', 'handler')) {
        if (!$filter->fetch($header)) {
          return FALSE;
