Failed to connect to the mail server

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

Moderators: Developer, Contributor

Post Reply
bagnara
Posts: 6
Joined: 23 Jul 2014, 12:34

Failed to connect to the mail server

Post by bagnara »

Despite the fact mail fetching works, I am getting emails (one every 5 minutes because that is the frequency of the cron job) with the following contents:

----- cut here
Start checking all mailboxes: Friday 25th of July 2014 10:15:01



Mailbox:
Message: Failed to connect to the mail server


Done checking all mailboxes
----- cut here

My mailbox configuration is as follows:

Email Reporting: Mailbox settings
Enabled [?] Yes
Description [?] Mailbox for Test project
Mailbox type [?] POP3
Hostname [?] mail.mydomain.it
TCP port (optional) [?] 995
Connection encryption [?] SSLv3
Username [?] test-mantis
Password [?] *********
Authentication method [?] PLAIN

Any idea what could I do to further investigate the issue?
bagnara
Posts: 6
Joined: 23 Jul 2014, 12:34

Re: Failed to connect to the mail server

Post by bagnara »

Perhaps I did not make that clear enough: the emails are actually fetched and operated upon by Mantis in a seemingly correct way.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to the mail server

Post by SL-Gundam »

Well based on the output you gave, EmailReporting is not able to connect to your mail server. Which should mean that it cannot work as it should as emails cannot be retrieved in that situation.

What mail server are you using?

Is this "mail.mydomain.it" the actual hostname you are using?
Why SSLv3? try "SSL"
Why authentication method PLAIN? try "user"
bagnara
Posts: 6
Joined: 23 Jul 2014, 12:34

Re: Failed to connect to the mail server

Post by bagnara »

SL-Gundam wrote:Well based on the output you gave, EmailReporting is not able to connect to your mail server. Which should mean that it cannot work as it should as emails cannot be retrieved in that situation.
Emails were and are retrieved. The issue was caused by an empty mailbox definition: after removing that the error disappeared.
SL-Gundam wrote:Why SSLv3? try "SSL"
Why authentication method PLAIN? try "user"
With SSLv3 and PLAIN it works: do you think I should switch to SSL and USER anyway?

Now the residual problem I have is that every 5 minutes I get an email from Cron Daemon containing:

Code: Select all

Start checking all mailboxes: Saturday 26th of July 2014 09:25:01



Done checking all mailboxes
What should I do to receive an email only in case of error?
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to the mail server

Post by SL-Gundam »

Don't change anything if the current settings work so leave sslv3 and plain imo

Currently there is no solution for that. It's purpose is a log, not an error list. Meaning that it outputs all kind of things when processing emails

Would it be enough if the log was empty when there are no errors? Or do you only care about those 2 static lines and not the other output?
bagnara
Posts: 6
Joined: 23 Jul 2014, 12:34

Re: Failed to connect to the mail server

Post by bagnara »

Here is how I solved the issue.
The crontab entry:

Code: Select all

*/5 *   *   *   *    /usr/bin/php /var/www/mantis/plugins/EmailReporting/scripts/bug_report_mail.php 2>&1 | /usr/bin/logger -p local0.info -t bug_report_mail
And the rsyslog configuration file /etc/rsyslog.d/30-mantis.conf:

Code: Select all

# Log EmailReporting Mantis messages to Mantis log file
:syslogtag, isequal, "bug_report_mail:" /var/log/mantisbt.log
Post Reply