is it possible to automatically ignore some attachments?

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
alexlehm
Posts: 3
Joined: 03 Apr 2014, 11:23

is it possible to automatically ignore some attachments?

Post by alexlehm »

[moved question from General Discussion as suggested]

I am using a mail client that automatically adds a smime signature to my mails, which is in the form of an attachment called smime.p7s.
Each time I add a note by email, a new file gets attached to the ticket called smime, 1-smime, 2-smime etc

Is it possible to automatically ignore file attachments that match a given filename or filename pattern? I assume if more colleagues in our project turn on email signatures, that will become quite annoying.

The configuration of the email plugin supports blocking files based on hash, but this doesn't cover my usecase.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: is it possible to automatically ignore some attachments?

Post by SL-Gundam »

EmailReporting 0.9.0-DEV has a feature to block attachments based on a md5 hash code
alexlehm
Posts: 3
Joined: 03 Apr 2014, 11:23

Re: is it possible to automatically ignore some attachments?

Post by alexlehm »

I am aware of that, but that doesn't cover my use case, the signature is a file that is different for each mail, so that it cannot be ignored based on content, rather it has to be ignored based on filename.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: is it possible to automatically ignore some attachments?

Post by SL-Gundam »

MantisBT has a configuration variable with which you can block specific attachments based on extension. See link below for the setting "disallowed_files"

http://www.mantisbt.org/docs/master/en- ... loads.html
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: is it possible to automatically ignore some attachments?

Post by NandoNaldo »

In the white box ( Block attachments matching these MD5 hashes) what should i write ?
I don't want the mail signature to be attached in the issue
Thnx
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: is it possible to automatically ignore some attachments?

Post by SL-Gundam »

Its meant to block attachments
You need to provide the MD5 hash of said attachments

Easiest would be if you already have an attachment you don't want in MantisBT.
1. Download it
2. Calculate the MD5 hash which can be done with a variety of tools available on the internet
3. At the resulting MD5 hash to the list in EmailReporting

Attachments that are not always the same are problematic with this solution

For erasing complete signatures i suggest have a look at "Strip signature configuration options (Experimental)" in EmailReporting
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: is it possible to automatically ignore some attachments?

Post by NandoNaldo »

Hi, i set all the options like you said, but nothing happend.

i already converted our firm signature with http://www.md5hashgenerator.com/, i set to YES the Strip signature configuration options but nothing happend
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: is it possible to automatically ignore some attachments?

Post by SL-Gundam »

The MD5 blocklist is meant for blocking attachments, not text in an email. If your signature is an image it would work... otherwise it won't

As for signature stripping. Make sure you fill in the proper starting placeholder for the signature. It's what EmailReporting will be looking for and will use for the starting point of the stripping. By default this is "--" which propably does not apply for your signature
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: is it possible to automatically ignore some attachments?

Post by NandoNaldo »

is it possibile to eleminate the signature of ma mail, trying to edit smth on the code ? because i am trying with block md5 but it's not working
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: is it possible to automatically ignore some attachments?

Post by SL-Gundam »

Like i said in the previous post. The MD5 blocklist is meant for blocking attachments, not text in an email. If your signature is an image it would work... otherwise it won't

The only other option would be to use the "Strip signature configuration options"
- set "Strip signature from email body" to "Yes"
- Fill in the starting marker in "Delimited by". This starting marker also needs to be present on a single line in your email (preferably right before the start of your signature)
NandoNaldo
Posts: 122
Joined: 09 Mar 2016, 21:44

Re: is it possible to automatically ignore some attachments?

Post by NandoNaldo »

Hello, i would like to say that i solved the problem regarding the signature:

I converted our signature ( it was an image) with http://onlinemd5.com/ generator and it worked :)

Thank You
Post Reply