Add footer stripper to remove email signatures before sending XMPP #10
Loading…
Reference in a new issue
No description provided.
Delete branch "footer-stripper"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:Defaults to
truefor both string and object user entries (backwards-compatible).Set
"strip_footer": falseto opt out.Changes
strip_footer()function using regex split on separator lineFiles changed
xmpp-email-bridge.py— ~24 lines added, single-file change as expected.