jbostoen / itop-jb-mail-to-ticket-automation-v2

Originally a fork of Combodo's Mail to Ticket Automation, enriched with some new features. Also contains some bug fixes.
https://jeffreybostoen.be
6 stars 3 forks source link

Bug: Failed to initialize the mailbox: [xxx@xxx.xx](mailto:xxx@xxx.xx). Reason: The input exceeds the allowed length #27

Closed jbostoen closed 1 year ago

jbostoen commented 1 year ago

When an e-mail contains a similar header, it may crash the background task:

Failed to initialize the mailbox: [xxx@xxx.xx](mailto:xxx@xxx.xx). Reason: The input exceeds the allowed length
Cc: "IMCEAEX-_o=ExchangeLabs_ou=Exchange+20Administrative+20Group+20+123_cn=Recipients_cn=user123@EURPRD10.PROD.OUTLOOK.COM"
 <IMCEAEX-_o=ExchangeLabs_ou=Exchange+20Administrative+20Group+20+123_cn=Recipients_cn=user123@EURPRD10.PROD.OUTLOOK.COM>

Seems to come from https://github.com/laminas/laminas-mail/issues/64

https://github.com/laminas/laminas-mail/blob/edf3832c05165775589af2fc698b5f9984d4c5f1/test/AddressListTest.php#L160 https://github.com/Combodo/iTop/blob/57c36d0e51cc57f06ef55c7ec56cb5c7a8fca225/lib/laminas/laminas-validator/src/EmailAddress.php#L55

jbostoen commented 1 year ago

Basically the solution is to ignore this e-mail, but make sure it doesn't crash anything.