• Resolved kengholm

    (@kengholm)


    Postie no longer strips the sig lines from emails. 2 common sig lines for our website:

    This message was sent by <more text>

    — CharFort/BusinessName
    City and State

    I’ve read several tutorials and a couple of sites that let me test my regex, but even the ones that work in the tests don’t work on the emails that Postie converts to posts. Could it have something to do with double hyphens being interpreted as emdash?

    Here are the patterns I have set up currently, that don’t seem to work:
    /^–\s?/miu
    /^–\s?\r?\n?/miu
    /–/miu
    /–\s/miu
    /—/miu
    /—\s/miu

    Thank you!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter kengholm

    (@kengholm)

    In my original submission about this issue, my double and triple hyphens all look like single dash characters, but in the Postie Message settings tab, they show up as repeated hyphens.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Not much has changed in the way Postie detects signatures lately. Often the email client adds some unexpected markup to the email. The best way to tell is use the Support AddOn to collect the diagnostics and send me the results and I will take a look.

    https://postieplugin.com/downloads/support-addon/

    Thread Starter kengholm

    (@kengholm)

    I get it now. After examining the debug output (I don’t know any software languages besides xaml, which is why it took so long), I see that Postie only recognizes sig lines that
    1) Start on a new line
    2) Have a return/linebreak between the pattern and the signature text
    I can live with the first restriction, but not the second because our website receives emails from contact forms that insert signatures (“– Forwarded by…”) and from individuals whose email apps add one-line signatures.
    Please don’t force the ^ before the pattern or the $ afterwards, as those can be added by Postie users who need them and can be omitted by users that need more flexibility.
    Thank you, Kathy

    Plugin Author Wayne Allen

    (@wayneallen-1)

    I appreciate your need, but what you describe is not the official signature specification.
    Many other people already have custom regex expressions so I can’t just change how they work.
    If you need behavior different than what Postie supplies there are many hooks/filters to make it do what you need. See https://postieplugin.com/extending/

    Thread Starter kengholm

    (@kengholm)

    Great, thank you. I’ll give that a try.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Stopped stripping signatures’ is closed to new replies.