CiviCRM 5.37.2, Both the Fetch Bounces and Process Inbound Emails jobs will fail with error: 'returnPath' is invalid (patch attached)
Both the Fetch Bounces and Process Inbound Emails jobs will fail with Error message: The value 'KO'Bananas@benders.com' that you were trying to assign to setting 'returnPath' is invalid. Allowed values are: the characters 'A-Za-z0-9_.@=/+{}#~-'.
Definition of allowed characters from https://en.wikipedia.org/wiki/Email_address#Local-part
zetacomponents / Mail, blocks valid email addresses due to RETURN_PATH_CHARS being too restrictive
const RETURN_PATH_CHARS = 'A-Za-z0-9_.@=/+{}#~-';
https://github.com/zetacomponents/Mail/blame/master/src/mail.php#L133 https://github.com/zetacomponents/Mail/commit/5187f764a0937f9fe04e675299558f5c1a90fd77#diff-52d017c2950c2583488542baf7d18f2bed8cb4e4d460050b43413c8dd56999b5R136
This problem was introduced with zetacomponents/mail 1.9.x which had a "security fix" that introduced email name part limits, which themselves are too limiting.
https://github.com/civicrm/civicrm-core/blame/master/composer.json#L62 Relevant commit dev/mailing#59 Update the version of zetacomponents/mail package, https://github.com/civicrm/civicrm-core/commit/ec88fefe6e0e1e09d0a1a2bdee199cbb3df382fa - which looks like CiviCRM 5.37.2
Unable to submit a PR as this path does not exist in the CiviCRM Git tree, https://github.com/civicrm/civicrm-core/tree/master/tools/scripts/composer/patches But it should exist, see https://github.com/civicrm/civicrm-core/blob/master/composer.json#L291
Proposed solution
Attached is a patch with the proposed fix.
060-CIVICRM-1601-Option-A.patch
Agileware Ref: CIVICRM-1601