6.0.0-beta1
9/1/25

[#13911] IMP error 500 with special To: header
Summary IMP error 500 with special To: header
Queue IMP
Queue Version 6.2.7
Type Bug
State Duplicate
Priority 1. Low
Owners
Requester christian (at) hailer (dot) eu
Created 03/12/2015 (3826 days ago)
Due
Updated 03/13/2015 (3825 days ago)
Assigned 03/12/2015 (3826 days ago)
Resolved 03/13/2015 (3825 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/13/2015 05:19:22 PM christian (at) hailer (dot) eu Comment #9 Reply to this comment
OK, I just installed the new Horde_Compress PEAR package from some 
hours ago, problem solved :D

Thank you all for your great work!!!
03/13/2015 04:05:42 PM christian (at) hailer (dot) eu Comment #8 Reply to this comment
Probably duplicate of Bug: 13908
Hi Michael,

I edited the Tnef.php according to the diff in Bug 13908, but 
unfortuantely it doesn't help... I still get the error messages:

2015-03-13T15:59:29+00:00 ERR: HORDE Returning HTTP 500 while handling 
Sync command. [pid 5808 on line 158 of "/var/www/horde/rpc.php"]
2015-03-13T15:59:29+00:00 ERR: HORDE Error in communicating with 
ActiveSync server: Failed to parse time string (-11222255551) [pid 
5808 on line 162 of "/usr/share/pear/Horde/Rpc/ActiveSync.php"]
2015-03-13T15:59:29+00:00 ERR: HORDE #0 
/usr/share/pear/Horde/Compress/Tnef.php(661): 
Horde_Date->__construct('-11222255551', 'UTC')
#1 /usr/share/pear/Horde/Compress/Tnef.php(282): 
Horde_Compress_Tnef->_decodeMessageProperty('\x01 
\x80\x03\x00\x0E\x00\x00\x00\xDF\x07\x03\x00\r\x00...')
#2 /usr/share/pear/Horde/ActiveSync/Imap/Message.php(328): 
Horde_Compress_Tnef->decompress('x\x9F>"\xCCW\x01\x06\x90\x08\x00\x04\x00\x00\x00...')
#3 /usr/share/pear/Horde/ActiveSync/Imap/Message.php(377): 
Horde_ActiveSync_Imap_Message->_decodeTnefData(Object(Horde_Mime_Part))
#4 /usr/share/pear/Horde/ActiveSync/Imap/Adapter.php(1125): 
Horde_ActiveSync_Imap_Message->getAttachmentsMimeParts()
#5 /usr/share/pear/Horde/ActiveSync/Imap/Adapter.php(640): 
Horde_ActiveSync_Imap_Adapter->_buildMailMessage(Object(Horde_Imap_Client_Mailbox), Object(Horde_Imap_Client_Data_Fetch), 
Array)
#6 /usr/share/pear/Horde/Core/ActiveSync/Driver.php(1310): 
Horde_ActiveSync_Imap_Adapter->getMessages('INBOX', Array, Array)
#7 /usr/share/pear/Horde/ActiveSync/Connector/Exporter.php(215): 
Horde_Core_ActiveSync_Driver->getMessage('INBOX', 7437, Array)
#8 /usr/share/pear/Horde/ActiveSync/Request/Sync.php(494): 
Horde_ActiveSync_Connector_Exporter->sendNextChange()
#9 /usr/share/pear/Horde/ActiveSync/Request/Base.php(253): 
Horde_ActiveSync_Request_Sync->_handle()
#10 /usr/share/pear/Horde/ActiveSync.php(882): 
Horde_ActiveSync_Request_Base->handle()
#11 /usr/share/pear/Horde/Rpc/ActiveSync.php(143): 
Horde_ActiveSync->handleRequest('Sync', '78529DB5D66A45C...')
#12 /var/www/horde/rpc.php(158): Horde_Rpc_ActiveSync->getResponse(NULL)
#13 {main} [pid 5808 on line 162 of 
"/usr/share/pear/Horde/Rpc/ActiveSync.php"]
2015-03-13T15:59:29+00:00 ERR: HORDE Buffer contents:  [pid 5808 on 
line 162 of "/usr/share/pear/Horde/Rpc/ActiveSync.php"]

The file looks like this now:

...
         case self::ID_DATE_END:
         try {
                 $value = new 
Horde_Date(Horde_Mapi::filetimeToUnixtime($this->_decodeAttribute($data)), 
'UTC');
         } catch (Horde_Mapi_Exception $e) {
                 throw new Horde_Compress_Exception($e);
         }
             break;
...

Regards, Christian
03/13/2015 03:25:16 PM Michael Rubinsky State ⇒ Duplicate
 
03/12/2015 02:05:27 PM Michael Rubinsky Comment #7
Priority ⇒ 1. Low
Reply to this comment
Probably duplicate of Bug: 13908
03/12/2015 01:58:51 PM christian (at) hailer (dot) eu Comment #6 Reply to this comment
Hmm, this is strange: when I use the autocompleted receipient Outlook 
generates this winmail.dat attachment, even when I choose a 
"text-only" email.
When I just use "christian@hailer.eu" a text-only mail is generated.

Very strange, indeed...

And you are right, it has nothing to do with the To: field. I just 
sent an email via telnet and changed the To: field to

To: "'Hailer, Christian (christian@hailer.eu)'" <christian@hailer.eu>

and used just text as message data, it works.
I somehow broke the attachment by editing the raw mail on the 
mailserver, that's why it worked.

So the question is: why can't IMP read the attachment? Is it an Outlook error?

Regards, Christian
03/12/2015 01:39:40 PM Michael Rubinsky Comment #5 Reply to this comment
I just changed the To: header to get it to work, not the attachment 
of the mail (see below).
Yeah, I saw that. That's why I think the error is extremely strange :)
03/12/2015 01:35:12 PM christian (at) hailer (dot) eu Comment #4 Reply to this comment
What is strange is that the error has nothing to do with the To: 
field, or any other header, but rather with data contained within 
the attachment itself.

Is OL using ActiveSync to send the email?
No, OL is sending via RPC over HTTP (Exchange server).

I just changed the To: header to get it to work, not the attachment of 
the mail (see below).

Regards, Christian
03/12/2015 01:31:15 PM Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
What is strange is that the error has nothing to do with the To: 
field, or any other header, but rather with data contained within the 
attachment itself.

Is OL using ActiveSync to send the email?
03/12/2015 01:24:36 PM christian (at) hailer (dot) eu Comment #2 Reply to this comment
I deleted the two ' from the header in the mail file on the server, 
now IMP is able to open the mail.

Before:

To: "'Hailer, Christian (christian@hailer.eu)'" <christian@hailer.eu>

--> Error 500

After:

To: "Hailer, Christian (christian@hailer.eu)" <christian@hailer.eu>

--> OK

Seems like the ' are interpreted by PHP. I recently updated to 
groupware 5.2.5 from 5.2.4, maybe there is a litte bug somewhere.

Regards, Christian
03/12/2015 12:33:40 PM christian (at) hailer (dot) eu Comment #1
Milestone ⇒
State ⇒ Unconfirmed
New Attachment: email.txt Download
Patch ⇒ No
Queue ⇒ IMP
Summary ⇒ IMP error 500 with special To: header
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
Hello,

when sending an email with Outlook it "autocompletes" known 
receipients, so if you start typing a known email address it completes 
it like that:

Hailer, Christian (christian@hailer.eu)

The email To: header contains the following afterwards:

To: "'Hailer, Christian (christian@hailer.eu)'" <christian@hailer.eu>

Somehow, IMP gets an error 500 when trying to open the email, and 
ActiveSync isn't working either with error 500:

2015-03-12T13:21:06+01:00 EMERG: HORDE [imp] Zeitformat (-11306698473) 
nicht erkannt [pid 18651 on line 369 of 
"/usr/share/pear/Horde/Date.php"]

2015-03-12T13:19:46+01:00 ERR: HORDE Returning HTTP 500 while handling 
Sync command. [pid 7311 on line 158 of "/var/www/horde/rpc.php"]
2015-03-12T13:19:46+01:00 ERR: HORDE Error in communicating with 
ActiveSync server: Failed to parse time string (-11306698473) [pid 
7311 on line 162 of "/usr/share/pear/Horde/Rpc/ActiveSync.php"]
2015-03-12T13:19:46+01:00 ERR: HORDE #0 
/usr/share/pear/Horde/Compress/Tnef.php(659): 
Horde_Date->__construct('-11306698473', 'UTC')
#1 /usr/share/pear/Horde/Compress/Tnef.php(282): 
Horde_Compress_Tnef->_decodeMessageProperty('\x01 
\x80\x03\x00\x0E\x00\x00\x00\xDF\x07\x03\x00\f\x00...')
#2 /usr/share/pear/Horde/ActiveSync/Imap/Message.php(328): 
Horde_Compress_Tnef->decompress('x\x9F>"W\x1C\x01\x06\x90\x08\x00\x04\x00\x00\x00...')
#3 /usr/share/pear/Horde/ActiveSync/Imap/Message.php(377): 
Horde_ActiveSync_Imap_Message->_decodeTnefData(Object(Horde_Mime_Part))
#4 /usr/share/pear/Horde/ActiveSync/Imap/Adapter.php(1125): 
Horde_ActiveSync_Imap_Message->getAttachmentsMimeParts()
#5 /usr/share/pear/Horde/ActiveSync/Imap/Adapter.php(640): 
Horde_ActiveSync_Imap_Adapter->_buildMailMessage(Object(Horde_Imap_Client_Mailbox), Object(Horde_Imap_Client_Data_Fetch), 
Array)
#6 /usr/share/pear/Horde/Core/ActiveSync/Driver.php(1310): 
Horde_ActiveSync_Imap_Adapter->getMessages('Trash', Array, Array)
#7 /usr/share/pear/Horde/ActiveSync/Connector/Exporter.php(215): 
Horde_Core_ActiveSync_Driver->getMessage('Trash', 7017, Array)
#8 /usr/share/pear/Horde/ActiveSync/Request/Sync.php(494): 
Horde_ActiveSync_Connector_Exporter->sendNextChange()
#9 /usr/share/pear/Horde/ActiveSync/Request/Base.php(253): 
Horde_ActiveSync_Request_Sync->_handle()
#10 /usr/share/pear/Horde/ActiveSync.php(882): 
Horde_ActiveSync_Request_Base->handle()
#11 /usr/share/pear/Horde/Rpc/ActiveSync.php(143): 
Horde_ActiveSync->handleRequest('Sync', '78529DB5D66A45C...')
#12 /var/www/horde/rpc.php(158): Horde_Rpc_ActiveSync->getResponse(NULL)
#13 {main} [pid 7311 on line 162 of 
"/usr/share/pear/Horde/Rpc/ActiveSync.php"]


Maybe the problem is the " followed by a ' in the header? If I send 
the email explicitly to christian@hailer.eu without autocompletion it 
works fine, the To: header looks like htis then:

To: "christian@hailer.eu" <christian@hailer.eu>

I attached the raw message for you to try it yourself.

Regards, Christian


Saved Queries