I was just able to send a message using a gmail address and using the web based gmail app - this had an image signature that was successfully trimmed
The same email account when sending a message using my local Outlook 2016 app on PC however did not get its signature stripped (same signature image, but set up in Outlook)
Realistically, the largest proportion of users of the forum will be using Microsoft Outlook app, so that would have to be a benchmark for ‘success’ of the trimming process.
Is it only one Outlook 2016 email source giving you trouble with signatures, or all of them?
Is Outlook 2016 known to insert stuff that is resistant to trimming? or was Outlook 2016 perhaps not deemed to be one of the popular apps that should be included in the email_reply_trimmer library?
Has anyone come up with a strategy for dealing with this? (other than asking users to remember to switch off automatic signatures whenever emailing the forum - which I know will elicit grumbles!)
I see also that while not trimmed, signatures in Outlook 2016 messages are not being parsed properly, in my case with messed up text formatting and fonts, as well as a couple of added text characters and an over scaled image - or is this the result of an unsuccessful trimming effort?
It’s one Outlook 16 user’s signature that always gets through the trimmer, and another with an unknown client (but sent through outlook.com and/or MS-Exchange) that has some white square image files at the bottom, like this:
Is this email_reply_trimmer library something that any idiot (such as myself) can mess around with to see if they can identify the patterns in the script as applied for other email apps and add a filter for Outlook 2016 signatures? I think I read this script is now part of core for Discourse? Or am I kidding myself?
I have never messed around with GitHub, and would not want to potentially mess anyone else up in the process of experimenting, or even inflict irreparable harm on my own forum.
This feature would be tremendously useful - being able to add offending signatures to a ‘strip this out if you see it again’ list. Matching could be a little more straightforward since it would just remove that text verbatim, rather than having to speculatively try to match all signatures.
That isn’t quite right - it should have the space in the middle, so: “- -”
Personally, I have found it pretty difficult to get users to put that into their signatures. It is okay if you can look over their shoulder to set it up for them, but they struggle on their own!! Maybe yours are more tech savvy.
They really don’t. If you cut and paste the regex in line 144 into https://rubular.com/ you’ll see that it matches -- (hyphen-hyphen-space) but not - - (hyphen-space-hyphen).
Ah, I see. It sure looks as though there is a space in between, unless you cut and paste it into something else (from line 144): "--/s" - looks like a space in between the hyphens to me when presented as code.
“–/s” cut and pasted into markdown directly, clearly no space.
This might explain why I’ve struggled to have any success with this! Thank you for holding the line.
I don’t know Ruby but \s seems to match a line return as well as a space - if that’s right then -- on its own line, without the space, should be OK too.
Markdown uses a bunch of hyphens for a horizontal rule. We have messages that include meeting details below a horizontal rule. Is there an alternative that we can use to make a separator without causing trimming?
For example, an example incoming email might contain the following:
This is the content of an example email. It might contain meeting details. If this post were sent via email, then this part - and everything after it - would be trimmed.
The issue is that when they reply to a Discourse post via email a couple of white images seem to get appended to their post. This results in a chunk of unwanted white space after their text. It only seems to happen to this one user. They do not have an email signature per se.
I am still getting maybe 5-10% of member signatures slipping through.
If current heuristics can’t handle these, I really think a manual database for signatures or even embedded images in emails that keep being submitted and that don’t automatically get picked up is essential.
There is no way in the world that I can expect users to change their email signatures just for the forum, which represents only a tiny portion of their day to day email activity.