tomolimo / ticketcleaner

Home for Ticket Cleaner GLPI plugin
8 stars 2 forks source link

examples #5

Closed Smiley-k closed 5 years ago

Smiley-k commented 7 years ago

Hi, more examples ? I have a complete deletion of the description! I'm using the latest version. Thank you.

tomolimo commented 7 years ago

hello, you may find help with this: https://github.com/tomolimo/ticketcleaner/wiki/Debug-filters regards, Tomolimo

Smiley-k commented 7 years ago

Yes I tried, but alas not working.

I have here an example

i use */[a-z ]+\Best Regards.?you./ui**

but then deleted all description.

Best Regards,

This email is intended only for the person to whom it is addressed and/or otherwise authorized personnel. The information contained herein and attached is confidential and the property of "COMPANY". If you are not the intended recipient, please be advised that viewing this message and any attachments, as well as copying, forwarding, printing, and disseminating any information related to this email is prohibited, and that you should not take any action based on the content of this email and/or its attachments. If you received this message in error, please contact the sender and destroy all copies of this email and any attachment. Please note that the views and opinions expressed herein are solely those of the author and do not necessarily reflect those of the company. While antivirus protection tools have been employed, you should check this email and attachments for the presence of viruses. No warranties or assurances are made in relation to the safety and content of this email and attachments. "COMPANY" accepts no liability for any damage caused by any virus transmitted by or contained in this email and attachments. No liability is accepted for any consequences arising from this email. 

Information, software, products and services published on this email may include inaccuracies or typographical errors. In no event shall "COMPANY" and/or its employees be liable for any direct, indirect, punitive, incidental, special or consequential damages arising out of, or in any way connected with, the use of this email or for any information, products and/or services obtained herein, whether based on contract, tort, strict liability or otherwise, even if "COMPANY" has been advised of the possibility of damages. Because some jurisdictions do not allow the exclusion or limitation of liability for consequential or incidental damages, the above limitation may not apply to you. 
Smiley-k commented 7 years ago

I may have figured out how it works. but I would like more examples. Here for example how to delete a picture ? if I know sh1 179ecce84bbefa43bf990a6473473cbe5cf8cd3d

tomolimo commented 7 years ago

Hello, Normaly you just have to save the picture into the dedicated folder 'pictures' in the plug-in folder. Check the wiki. Regards Tomolimo

Smiley-k commented 7 years ago

Yes, of course I copied the picture from /glpi/files/_tmp# in glpi/plugins/ticketcleaner/pictures#

but it is not working, maybe more?

tomolimo commented 7 years ago

I think there is a bug I'll look at it tomorrow. Tomolimo

tomolimo commented 7 years ago

hello, could you give me back info about your configuration? Thank you Tomolimo

Smiley-k commented 7 years ago

Hi, Yes found the problem why the description was removed. At the end of the recording was blank. */[a-z ]+Best Regards.?you./ui** (sorry for this concern), but the picture is not removed from the signature.

The picture I copied from the folder /glpi/files/_tmp# in glpi/plugins/ticketcleaner/pictures#

what am I doing wrong ?

tomolimo commented 7 years ago

hello, could you give me back info about your GLPi configuration? Thank you Tomolimo

Smiley-k commented 7 years ago

Yes, of course. ubuntu 14.04 GLPI 9.1.1 Could be something else, say.

tomolimo commented 7 years ago

and versions of installed plugins?

Smiley-k commented 7 years ago

Forgot to specify version.

Ticket Cleaner 2.0.4

tomolimo commented 7 years ago

Did you look into the log file TicketCleaner.log?

Smiley-k commented 7 years ago
2016-11-28 15:29:58 [2@rp-vsr-03]
Ticket: 'test'
        File: '/var/www/glpi/files/_tmp/image001.png'   type: 'image/png'       sha1: '179ecce84bbefa43bf990a6473473cbe5cf8cd3d'        deleted: 'False'
2016-11-28 16:59:09 [2@rp-vsr-03]
Ticket: 'test'
        File: '/var/www/glpi/files/_tmp/image001.png'   type: 'image/png'       sha1: '179ecce84bbefa43bf990a6473473cbe5cf8cd3d'        deleted: 'False'
2016-11-29 09:37:49 [2@rp-vsr-03]
Ticket: 'Удаление подписи'
        File: '/var/www/glpi/files/_tmp/image001.png'   type: 'image/png'       sha1: '179ecce84bbefa43bf990a6473473cbe5cf8cd3d'        deleted: 'False'
2016-11-29 09:39:11 [2@rp-vsr-03]
Ticket: 'Test'
        File: '/var/www/glpi/files/_tmp/image001.png'   type: 'image/png'       sha1: '179ecce84bbefa43bf990a6473473cbe5cf8cd3d'        deleted: 'False'
2016-11-29 09:45:03 [@rp-vsr-03]
Ticket: 'Test'
        File: '/var/www/glpi/files/_tmp/image001.png'   type: 'image/png'       sha1: '179ecce84bbefa43bf990a6473473cbe5cf8cd3d'        deleted: 'False'
tomolimo commented 7 years ago

as a workaround, you may insert into the DB table the sha1 of the picture. the table is glpi_plugin_ticketcleaner_picturehashes

tomolimo commented 7 years ago

but to investigate further the issue: could you tell me the name of the web client that is used to send the emails?

Smiley-k commented 7 years ago

I send messages via outlook

our database has information about the picture

image

tomolimo commented 7 years ago

which outlook version? and which msexchange version? I have same troubles with our new exchange server.

Regarding the table content, you can see that the sha1 are not matching the one that are received by the mail receiver. The mail receiver receives 179ecce84bbefa43bf990a6473473cbe5cf8cd3d and the picture files generate another sha1. I suspect that msexchange newest release is doing some conversion (compression?) on embedded picture in emails.

so if you add a new record (or update existing one) with the sha1 from the TicketCleaner.log, then the embedded picture will be really deleted from the ticket.

Smiley-k commented 7 years ago

Yes, I use MS Exchange 2010. I'll try to do as you recommend.

outlook 2010

Smiley-k commented 7 years ago

Yes you are right, a solution to the problem when working with MS Exchange server.

Thank you very much.

but how to proceed with this in the future ?

tomolimo commented 7 years ago

It's seems to be an issue with outlook: see this: http://superuser.com/questions/211020/prevent-outlook-2010-insert-picture-resizing-image and this: https://www.howto-outlook.com/faq/unsharpimages.htm

tomolimo commented 7 years ago

this one is also very interesting: https://www.msoutlook.info/question/545 the conclusion is: if you change the way the 'wrap text' is done for the embedded picture, then it will change the compression of the picture...

tomolimo commented 7 years ago

As an example: image On the left is the embedded picture sent with my outlook (before sending of course), and on the right is the picture that GLPi received, you can see that Outlook has re-sampled and resized the initial picture, and such the DB stored sha1 can't matched the one received...

Smiley-k commented 7 years ago

okay, thank you.

tomolimo commented 5 years ago

linked to #9