Add footer stripper to remove email signatures before sending XMPP #10

Merged
jason merged 1 commit from footer-stripper into main 2026-07-22 23:21:05 -04:00
Owner

Summary

Adds a per-user "footer stripper" feature that removes email signatures/footers (everything after a separator line like ---) from messages before they are sent over XMPP.

Details

  • Applies only in the Email→XMPP direction (postfix pipe handler), since SMS messages don't have footers to strip.

  • Searches for the first occurrence of a separator line (--- by default) and trims everything after it.

  • Configurable per-user via users.conf.json:

    {
      "alice": {
        "password": "secret",
        "strip_footer": true
      }
    }
    
  • Defaults to true for both string and object user entries (backwards-compatible).

  • Set "strip_footer": false to opt out.

Changes

  • New strip_footer() function using regex split on separator line
  • Config flag added to credential lookup (never re-parsed per-message)
  • Applied immediately before sending in email→XMPP path with logging of chars removed

Files changed

  • xmpp-email-bridge.py — ~24 lines added, single-file change as expected.
## Summary Adds a per-user "footer stripper" feature that removes email signatures/footers (everything after a separator line like `---`) from messages before they are sent over XMPP. ## Details - **Applies only** in the Email→XMPP direction (postfix pipe handler), since SMS messages don't have footers to strip. - Searches for the first occurrence of a separator line (`---` by default) and trims everything after it. - Configurable per-user via `users.conf.json`: ```json { "alice": { "password": "secret", "strip_footer": true } } ``` - Defaults to `true` for both string and object user entries (backwards-compatible). - Set `"strip_footer": false` to opt out. ## Changes - New `strip_footer()` function using regex split on separator line - Config flag added to credential lookup (never re-parsed per-message) - Applied immediately before sending in email→XMPP path with logging of chars removed ## Files changed - `xmpp-email-bridge.py` — ~24 lines added, single-file change as expected.
jason merged commit fd718ed1e2 into main 2026-07-22 23:21:05 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jason/xmpp-email-bridge!10
No description provided.