EmailReporting crashed after server upgrade

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

Moderators: Developer, Contributor

Post Reply
Darland
Posts: 7
Joined: 25 May 2015, 11:32

EmailReporting crashed after server upgrade

Post by Darland »

Dear all,

I did a server upgrade to Debian Jessy. Immediately after that plugin stopped working. It starts, then in a minute it consumes 1GB of memory and fails, producing no output to console. I spent hours tracing the error and it seems to happen on cmdAuthenticate call when command 'A0003' is issued (IMAPProtocol.php). Strange thing that plugin works perfectly on another server running Debian Jessy, which was upgraded 2 weeks ago. Packages are all the same, including PEAR modules.
What could be the problem?

Thank you!
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: EmailReporting crashed after server upgrade

Post by SL-Gundam »

What version EmailReporting and MantisBT are your running?

Are there any emails in the IMAP mailbox being processed?
Darland
Posts: 7
Joined: 25 May 2015, 11:32

Re: EmailReporting crashed after server upgrade

Post by Darland »

Mantis version is 1.2.17
EmailReporting is 0.9-DEV

Issue happens both with empty and non-empty mailbox
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: EmailReporting crashed after server upgrade

Post by SL-Gundam »

Weird

The pear packages are used as is.
I'm assuming both debian jessy's are using the same version of MantisBT and EmailReporting...
Are they connected to the same database or do they have different databases?
Is there a firewall active on the problematic debian jessy?
Darland
Posts: 7
Joined: 25 May 2015, 11:32

Re: EmailReporting crashed after server upgrade

Post by Darland »

Two Debian Jessys are PROD and TEST. TEST is a clone of PROD - both files and the database.
And the issue happens only on PROD. I've even tranferred back the whole Mantis installation to PROD from TEST and EmailReporting stopped working with the same symptoms.
I use iptables and rules are set to ACCEPT
Darland
Posts: 7
Joined: 25 May 2015, 11:32

Re: EmailReporting crashed after server upgrade

Post by Darland »

Settings for a mailbox
http://1drv.ms/1HJgVfB
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: EmailReporting crashed after server upgrade

Post by SL-Gundam »

Since you mention a production and test environment i suppose that the mail server to the address is different... or are they addressing the same mail server and the same mailbox?

Also I often get best results with the "Authentication method": "USER"
Darland
Posts: 7
Joined: 25 May 2015, 11:32

Re: EmailReporting crashed after server upgrade

Post by Darland »

Only one mail server running Dovecot.
I enabled only LOGIN and PLAIN auth methods on that server.
For some reason, SSL/TLS never worked with EmailReporing so I've always used NONE as encryption.
Darland
Posts: 7
Joined: 25 May 2015, 11:32

Re: EmailReporting crashed after server upgrade

Post by Darland »

The most crazy thing, that plugin stopped working only on one of the servers after un upgrade. Before an upgrade it worked for ~6 months without any issue. And it doesn't work both in FPM and CLI modes of PHP.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: EmailReporting crashed after server upgrade

Post by SL-Gundam »

The pear IMAP package will automatically check whether the mail server supports STARTTLS. if supported, it wil use it.

Thats why encryption is a but finicky for IMAP. Though a couple months ago i did extensive work in this area among other things to fix IMAP Exchange support. If you are running the latest version of EmailReporting then IMAP might actually try encryption as long as the default port is used

I would like you to update EmailReporting to the latest version. Just download it from here https://github.com/mantisbt-plugins/EmailReporting [^] by clicking on "Download ZIP"

Overwrite all the existing files in the EmailReporting folder

After that please add the following add the end in your MantisBT config_inc.php
----------------------------
$g_show_detailed_errors = ON;

$g_display_errors = array(
E_WARNING => 'halt',
E_NOTICE => 'halt',
E_USER_ERROR => 'halt',
E_USER_WARNING => 'halt',
E_USER_NOTICE => 'halt'
);
----------------------------

After that please try to reproduce the problem again and post any error that is outputted

After this i suggest removing the added lines from your config_inc.php

Hopefully this will give us a better error with which we can find the cause of all this
Darland
Posts: 7
Joined: 25 May 2015, 11:32

Re: EmailReporting crashed after server upgrade

Post by Darland »

Genius!

It works with TLS 1.2 now. Even better than before!

I noticed that when I do a complete test I see these error messages:

Code: Select all

Mailbox: Support
Location: Retrieve list of messages
[pear_error: message="BAD, Error in IMAP command FETCH: Invalid messageset" code=0 mode=return level=notice prefix="" info=""]
repeated for each empty project folder, which I have in the mail box. Anyway it seems to work even with these error messages.

As we use the plugin for production environment, I would be very happy to make a small donation to support the author.
Thank you much for this great instrument!
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: EmailReporting crashed after server upgrade

Post by SL-Gundam »

EmailReporting is a collaboration from multiple people over the years so its not just me. Also i don't think i've set up any way to donate money to the authors of EmailReporting

So if you feel you want to donate something, find a good cause and give them the money.

The error you have is most likely because of a dovecot issue. See this: https://community.bittitan.com/kb/Pages ... geset.aspx
Upgrading dovecot should fix that
Post Reply