Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mailman2Bridge] fix message separation and improve "From_ lines" disambiguation #4156

Merged
merged 3 commits into from
Jul 28, 2024

Conversation

enwuenwu
Copy link
Contributor

This PR mainly fixes separation of messages in the monthly mbox archives, which rendered the bridge broken without it.

"From_ lines" disambiguation is also improved a bit to make erroneous message splits less likely.

enwuenwu and others added 3 commits June 16, 2024 10:48
Enable PCRE_MULTILINE pattern modifier on mbox content parsing. Without it parsing monthly archives results in only a single message each.
Extend PCRE pattern matching individual "From_ lines" used to split single messages in mbox content. 

In addition to the matching line having to start with 'From ' it now also has to end with time and date (hh:mm:ss yyyy). 

This makes the pattern slightly more robust against accidental matches when a line within the actual message body starts with 'From ' which Mailman 2 (Pipermail) may not be configured to disambiguate.
Copy link

Pull request artifacts

Bridge Context Status
Mailman2 1 Mailman 2 (current) ✔️
Mailman2 1 Mailman 2 (pr) ✔️

last change: Tuesday 2024-07-23 15:41:56

@dvikan
Copy link
Contributor

dvikan commented Jul 28, 2024

thanks

@dvikan dvikan merged commit 2fcba49 into RSS-Bridge:master Jul 28, 2024
7 checks passed
NotsoanoNimus pushed a commit to Solstice-Software/better-rss-bridge that referenced this pull request Aug 8, 2024
…ambiguation (RSS-Bridge#4156)

* [Mailman2Bridge.php] enable PCRE_MULTILINE pattern modifier

Enable PCRE_MULTILINE pattern modifier on mbox content parsing. Without it parsing monthly archives results in only a single message each.

* [Mailman2Bridge.php] extend mbox "From_ lines" pattern

Extend PCRE pattern matching individual "From_ lines" used to split single messages in mbox content. 

In addition to the matching line having to start with 'From ' it now also has to end with time and date (hh:mm:ss yyyy). 

This makes the pattern slightly more robust against accidental matches when a line within the actual message body starts with 'From ' which Mailman 2 (Pipermail) may not be configured to disambiguate.

* [Mailman2Bridge.php] remove trailing slash from URI constant

---------

Co-authored-by: enwu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants