You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Karsten Otto (Jira)" <se...@james.apache.org> on 2021/11/02 09:10:00 UTC
[jira] [Created] (JAMES-3666) DSNBounce exception when no Date
header
Karsten Otto created JAMES-3666:
-----------------------------------
Summary: DSNBounce exception when no Date header
Key: JAMES-3666
URL: https://issues.apache.org/jira/browse/JAMES-3666
Project: James Server
Issue Type: Bug
Components: Matchers/Mailets (bundled)
Affects Versions: master
Reporter: Karsten Otto
When the DSNBounce mailet processes a mail without a Date header, it fails with the exception
java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: OffsetSeconds
because the LocalDateTime used to construct the new date does not include timezone information required by the date formatter.
The fix is to construct the new date via ZonedDateTime instead.
There is actually a unit test for this, but the MimeMessageBuilder adds a Date header by default if not specified. The test fix is to explicitly remove the Date header after building.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org