6.0.0-beta1
7/17/25

[#14381] Maleformed date in mail breaks sync with Outlook 2012
Summary Maleformed date in mail breaks sync with Outlook 2012
Queue Synchronization
Queue Version FRAMEWORK_5_2
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester horde5 (at) exparrot (dot) de
Created 05/30/2016 (3335 days ago)
Due
Updated 05/31/2016 (3334 days ago)
Assigned 05/31/2016 (3334 days ago)
Resolved 05/31/2016 (3334 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/31/2016 11:53:08 PM Michael Rubinsky Comment #9 Reply to this comment
More appropriately fixed in Horde_Mime 2.9.5 and Horde_Imap_Client 2.29.7
05/31/2016 11:38:26 PM Git Commit Comment #8 Reply to this comment
Changes have been made in Git (master):

commit 6b3c2b77c68cdbec46123ea0d53b5563761d4cdb
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Tue May 31 19:35:29 2016 -0400

     Bug: 14381  Add check for malformed offset in the header too.

  framework/Mime/lib/Horde/Mime/Headers/Date.php | 15 +++++++++++++++
  1 file changed, 15 insertions(+)

http://github.com/horde/horde/commit/6b3c2b77c68cdbec46123ea0d53b5563761d4cdb
05/31/2016 11:38:25 PM Git Commit Comment #7 Reply to this comment
Changes have been made in Git (master):

commit 3ef5bf779570cc4cf7a090d7eb05016c01c92c86
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Tue May 31 19:34:06 2016 -0400

     Bug: 14381 Catch malformed date offsets.

     Need to check this first, since the missing '+' does not
     throw an exception, but rather causes the offset to be taken
     as the year.

  framework/Imap_Client/lib/Horde/Imap/Client/DateTime.php | 13 +++++++++++++
  1 file changed, 13 insertions(+)

http://github.com/horde/horde/commit/3ef5bf779570cc4cf7a090d7eb05016c01c92c86
05/31/2016 11:38:24 PM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit 5c8645f6a3e2769c8493455aa33177ad6d0cc649
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Tue May 31 19:32:13 2016 -0400

     Bug: 14381 Remove these hotfixes, as they are now fixed in 
appropriate libraries.

  framework/ActiveSync/lib/Horde/ActiveSync/Imap/Adapter.php | 13 -------------
  framework/ActiveSync/lib/Horde/ActiveSync/Imap/Message.php | 13 +------------
  2 files changed, 1 insertion(+), 25 deletions(-)

http://github.com/horde/horde/commit/5c8645f6a3e2769c8493455aa33177ad6d0cc649
05/31/2016 12:48:40 PM Michael Rubinsky State ⇒ Resolved
 
05/31/2016 12:47:17 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit d97fd78fa7d9a3d5c6b8100279cd269556223d9a
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Tue May 31 08:44:40 2016 -0400

     Ticket: 14381 Sanity check envelope date.

  framework/ActiveSync/lib/Horde/ActiveSync/Imap/Message.php | 13 ++++++++++++-
  1 file changed, 12 insertions(+), 1 deletion(-)

http://github.com/horde/horde/commit/d97fd78fa7d9a3d5c6b8100279cd269556223d9a
05/31/2016 12:45:23 PM Michael Rubinsky Comment #4
State ⇒ Assigned
Priority ⇒ 1. Low
Assigned to Michael Rubinsky
Reply to this comment
It seems that the problematic line is
Date: Sun, 16 May 2016 19:19:42 0000
Where the last "0000" instead of the "2016" gets parsed as the year.
That's a malformed Date field. The offset must be written as +0000, 
so the message is essentially broken. It could be handled more 
gracefully though.
While this is not a Horde bug we can sanity check the date in the 
place where *horde* reads it, but the original headers are still sent 
to the client so this may or may not help OL be less of a PITA.
05/30/2016 08:32:21 PM arjen+horde (at) de-korte (dot) org Comment #3 Reply to this comment
It seems that the problematic line is
Date: Sun, 16 May 2016 19:19:42 0000
Where the last "0000" instead of the "2016" gets parsed as the year.
That's a malformed Date field. The offset must be written as +0000, so 
the message is essentially broken. It could be handled more gracefully 
though.

See https://tools.ietf.org/html/rfc2822#page-14
05/30/2016 08:12:10 PM horde5 (at) exparrot (dot) de Comment #2 Reply to this comment
It seems that the problematic line is
Date: Sun, 16 May 2016 19:19:42 0000
Where the last "0000" instead of the "2016" gets parsed as the year.
05/30/2016 07:23:43 PM horde5 (at) exparrot (dot) de Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
New Attachment: date_issue.txt Download
Patch ⇒ No
Milestone ⇒
Queue ⇒ Synchronization
Summary ⇒ Maleformed date in mail breaks sync with Outlook 2012
Type ⇒ Bug
Reply to this comment
The mail attached cause the sync of Outlook 2012 with the server to 
fail. There is no indication in Outlook 2012 that the sync has faild. 
Just no messages later than the arrival of the attached mail are 
loaded. Complete resync does not solve the issue this mail caused. 
Mails until the arrival of the attached mail will be reloaded and then 
it stops. In use is ActiveSync 2.33.1.
It seems to be an issue with the date as the date shown in Horde 
Webmail is the year 0. Removing this mail from the inbox of the user 
re-enables sync with Outlook 2012. A paired iPhone to the same account 
at the same time did not encounter any issues.

Saved Queries