Page MenuHomePhorge

Update mimemailparser from May 2011 version to 8.0.4
ClosedPublic

Authored by aklapper on Oct 20 2024, 17:22.

Details

Summary

Bump to version 8.0.4 from 2024-09-11 per https://github.com/php-mime-mail-parser/php-mime-mail-parser/releases before this ancient code copy falls apart.
scripts/mail/mail_handler.php (used for incoming (!) mail) is the only consumer.

Closes T15940

Test Plan

Feed mail_handler.php with various test emails (formats: plain text, HTML, multipart; encodings: UTF-8, ASCII, ISO-8859-something) by manually replacing php://stdin with corresponding text files and adding some phlogs for output checking as I don't have mail server glue handy. Get only expected errors for broken emails.

Diff Detail

Repository
rP Phorge
Branch
mimemailparser804
Lint
Lint Errors
SeverityLocationCodeMessage
Errorscripts/mail/mail_handler.php:43XHP1PHP Syntax Error!
Unit
No Test Coverage
Build Status
Buildable 1608
Build 1608: arc lint + arc unit

Event Timeline

20after4 subscribed.

It would be nice to have some unit tests for this but that seems like it might be quite a bit of work to implement.

If I can find some time to work on it then I will take a stab at creating tests in a follow-up.

This revision is now accepted and ready to land.Oct 20 2024, 20:37

mimemailparser: Check that PHP mailparse extension is installed

For testing, I deployed the latest revision of this proposed patch in our downstream instance and created a task via incoming plain text mail with attachments - seems to still work as expected so no obvious breakage (yet): https://phabricator.wikimedia.org/T377859

This very patch got deployed on our rather active downstream instance 10 days ago. I have not heard complaints and I've seen tasks and task comments (replies) created via email, so I'm now pretty confident that it does what it should. Thus I'm going to merge it to reduce technical debt a bit more in Phorge.