Email signature not being stripped out when user write new topic or reply to a topic

Hallo

When sending a new post or reply to a post via mail the email signature was not
stripped out.

The following was posted as a new topic:

Mal sehen was hier mit der Signatur passiert!

-- 
Mit lieben Grüßen

Manfred Bayer-Lemerz

Is there a setting to turn the stripping out off or on?

I have the original email headers/source available for anyone who wants to look at this bug more closely.

thanks

Manfred

1 Like

Signature stripping is done automatically. Since there’s no standard, it’s hard to get it right for all the billions signature formats out there. Can you PM me the raw email so that I can have a look?

2 Likes

Thanks for the fast answer! Will send you the File right away!

For our group it would be helpful to understand what the preferred signature format is. For example, we could let folks know that anything after ten dashes ---------- would be parsed as a signature. We could then be in contact with our most difficult signature offenders (those that include images as part of their signature) and ask them to prepend their signature line with ten dashes. I realize this method wouldn’t work for everyone, but it would be very helpful for our smaller group (300 members).

Or possibly include something in the Admin that allowed us to specify our own local signature formats that would be stripped from incoming emails.

3 Likes

Usenet signature cut lines are standardized. How many people get it right (follow suit) in email is another matter. The quoted text in the first post does appear to be a standard Usenet cut line: hyphen-hyphen-space.

3 Likes

When I was young, I was told that the standard is two lines, space and linebreak.

A solution that I’ve mused about is that there couple be a use setting that included the text to remove. People could then paste their sig in there and have it removed when they posted.

Its still rather fiddly,but easier than machine learning.

5 Likes

I upgraded our email_reply_trimmer library and pushed it to master. Can you give it a try?

https://github.com/discourse/discourse/commit/726eb7bdcad38720caa7e3f8e411b26fb741d90a

5 Likes

Not sure, if this behaviour really belongs to this change: Emails are not accepted because of a invalid main body or a body, that is too short. In fact, the body is long enough according to the rules (min. 20 characters) and I cannot see a reason, why it should not be accepted. Maybe we strip out too much of the content?

I can provide you the email that matters.

Dirk

1 Like

I have a few users who are willing to update their email signatures, but I’m confused on what I should tell them.

What signature protocols does Discourse accept?

What is the signal to for discourse to cut the signature?

3 Likes

I believe @gerhard is in the best position to advise here.

Discourse uses HTML emails by default and it automatically detects and strips email signatures of the most popular email clients. So, this should work out of the box as long as your users send HTML emails and use their email client to insert signatures.

For plain text emails it’s always a good idea to start signatures with the de facto standard of two dashes and a space.

-- 
signature
4 Likes

Is there any way to manually add signatures from my users to my board’s email trimmer library?

I only have 20 users, that’s all it’ll ever be. So it’s easy to manage.

Ideas?

2 Likes

Hi @gerhard, for the life of me I can’t seem to get automatic signature trimming to work. Emails tested just have standard Microsoft Outlook type signatures containing images and/or text appended at the bottom of any new email sent.

Is this likely just a wrong setting on my part?

Do you have always show trimmed content checked?

Yes, it is checked. Is there any other setting needed?

It should be unchecked if you don’t want to show trimmed content.

1 Like

Hmm - that is the setting I started with, that was also not trimming out signatures for me.

I wonder if it is only the very first post by email, and not any subsequent posts that get trimmed?

Does it happen on all incoming emails? The email signature trimmer works well on the majority of mine, but a few random ones get through, along with a persistent one sent from X-Mailer: Microsoft Outlook 16.0.

No, all posts by email get the trimmer treatment.

3 Likes