Closed chibenwa closed 6 months ago
I digged into this.
As we use MimeMessage::reply we are forced doing the parsing anyway.
14:47:31.215 [WARN ] o.a.j.t.m.VacationMailet - Failed to send JMAP vacation notification from benwa@apache.org to MaybeSender{mailAddress=Optional[distant@apache.org]}
jakarta.mail.internet.AddressException: Missing '>'
at jakarta.mail.internet.InternetAddress.parse(InternetAddress.java:916)
at jakarta.mail.internet.InternetAddress.parseHeader(InternetAddress.java:762)
at jakarta.mail.internet.MimeMessage.getAddressHeader(MimeMessage.java:751)
at jakarta.mail.internet.MimeMessage.getReplyTo(MimeMessage.java:725)
at jakarta.mail.internet.MimeMessage.reply(MimeMessage.java:1735)
at jakarta.mail.internet.MimeMessage.reply(MimeMessage.java:1682)
at org.apache.james.transport.mailets.VacationReply$Builder.generateMimeMessage(VacationReply.java:76)
at org.apache.james.transport.mailets.VacationReply$Builder.build(VacationReply.java:72)
at org.apache.james.transport.mailets.VacationMailet.sendNotification(VacationMailet.java:142)
at org.apache.james.transport.mailets.VacationMailet.sendNotificationIfRequired(VacationMailet.java:114)
at org.apache.james.transport.mailets.VacationMailet.manageVacation(VacationMailet.java:109)
at org.apache.james.transport.mailets.VacationMailet.lambda$service$0(VacationMailet.java:77)
I at least won't attempt to fix this corner case for the time being.
Reproduced with a field:
Reply-To: <invalid@domain.com
Use mime4J lenioent address list parser