Skip to content

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

Merged
dvikan merged 3 commits intoRSS-Bridge:masterfrom
enwuenwu:fix-mailman2
Jul 28, 2024
Merged

[Mailman2Bridge] fix message separation and improve "From_ lines" disambiguation #4156
dvikan merged 3 commits intoRSS-Bridge:masterfrom
enwuenwu:fix-mailman2

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.
@github-actions
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
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 <108224417+8279279374@users.noreply.github.com>
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