znuny / Znuny

Znuny/Znuny LTS is a fork of the ((OTRS)) Community Edition, one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management.
https://www.znuny.org
GNU General Public License v3.0
343 stars 83 forks source link

Bug - Sisimai to slow to handle big email #391

Closed gody01 closed 1 year ago

gody01 commented 1 year ago

Environment

Expected behaviour

After pop3 Mail Fetch, mail should be deleted from server.

Actual behaviour

When fetching large Email (15Mb+) after successful fetch, EmailBounce testing is taking so much time, that pop session is terminated (Server: Zimbra). Next pop command 'delete' is then unsuccessful.

Unfortunately, on Znuny side, bounce processing is eventually ended and converted to Ticket, but on mail server mail is still present in inbox. So the same ticket is created over and over again.

How to reproduce

You need big Email, CentOS 7.x (on that, Bounce Checking is taking over 4minutes). Steps to reproduce the behavior:

  1. Go to '...' console
  2. Click on '...' enter: ./otrs.Console.pl Maint::PostMaster::MailAccountFetch --debug and
  3. Scroll down to '...' observer time to fetch mail
  4. See error on server, if mail is big enough mail will still be present. On faster infrastructure (and with CentOS 8 for example) only significant time delay before DELE command can be observed.

Additional information

Slow EmailBounce processing is already confirmed by author of Sisimail: https://github.com/sisimai/p5-sisimai/issues/492

Screenshots

gody01 commented 1 year ago

For quick & dirty solution attached patch can be applied in Kernel/cpan-lib/Sisimai

Message.pm.diff.gz

It will shorten mail messagebody to 32766 bytes and processing will be again under 1 second.

Author of Sisimail has estimated that he will fix Sisimai in about 2 weeks. However if someone has similar problem on production attached fix prevents this problem.

hanneshal commented 1 year ago

Hi @gody01,

thanks for the report and getting in touch already with the maintainers of the lib and providing a hotfix!

I have a look at this in some days

Thank You!

gody01 commented 1 year ago

Hello,

Author of Sisimai fixed the issue in v4.25.16 (https://metacpan.org/dist/Sisimai) I tested fix and it is few orders of magnitude faster on my systems.

Is there any chance, to update cpan-lib with new version for 6.0.x and 6.5.x ?

hanneshal commented 1 year ago

Hi @gody01 thanks for the feedback. We will test it and put it on the list for 6.5 and 7.

6.0 is out of support and wont receive any updates.

Regards and thank you! Johannes

Edit: Internal issue 627

rkaldung commented 1 year ago

Updated bundled Sisimai with Znuny LTS 6.5.3 and Znuny 7.0.6