0

I have an issue with GreenMail - IMAP server.

The messages that are appended to the GreenMail IMAP server using JavaMail Library, are stored with wrong INTERNALDATE.

The weird thing is that the issues occur between 12:00 PM - 1:00 PM.

Both the application in which GreenMail ran, and the client that appends the messages to the IMAP store, are in BST timezone. (I checked on UTC too)

I debugged the append operation until the messages are converted to bytes to be sent through IMAP protocol, the date / time is right but on IMAP server, the messages have incorrect INTERNALDATE.

e.g. If a message is appended at 12:33 PM, the INTERNALDATE of the message in the IMAP server will be:

* 1 FETCH (INTERNALDATE "18-Jul-2017 00:33:30 +0100")

if a messages id appended at 13:21 the result will be :

* 1 FETCH (INTERNALDATE "18-Jul-2017 13:31:55 +0100")

Maybe some of you had the same issue, thanks!

Dmitri
  • 271
  • 2
  • 11
  • Are you supplying the INTERNALDATE or letting the server do it? Have you tried using some other lower level library (raw text, python imaplib) to see if you can reproduce? What is the actual text of the APPEND command javamail sends? What is your relevant piece of code? – Max Jul 19 '17 at 14:17
  • JavaMail uses the received date of the message in the append command. What does getReceivedDate of the message to be appended show? – Bill Shannon Jul 19 '17 at 18:16
  • @Max, Java mail is doing : command("APPEND", args); args being an Argument object that store all the data. – Dmitri Jul 20 '17 at 07:37
  • @BillShannon getReceivedDate is showing the correct date. – Dmitri Jul 20 '17 at 07:43
  • Then it looks like the problem is in GreenMail. – Bill Shannon Jul 20 '17 at 18:59

0 Answers0