Failed to connect to Exchange

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

Moderators: Developer, Contributor

horizn
Posts: 19
Joined: 03 Feb 2015, 09:07

Re: Failed to connect to Exchange

Post by horizn »

SL-Gundam wrote:If so, i am curious what the cause of the issue was
it is not resolved it is a spambot. look at his message and account details. I'll answer you on monday.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

Yeah i thought something was off.

Talk to you on Monday then
horizn
Posts: 19
Joined: 03 Feb 2015, 09:07

Re: Failed to connect to Exchange

Post by horizn »

SL-Gundam wrote:I think everything should have worked. But it doesn't so... i'm stumped

The telnet tests you did towards imap, were they from the webserver where EmailReporting is running? or from another machine?

Have you tested the mailbox through the running of bug_report_mail.php and through using the mailbox test feature?
I've tested it from webserver and from my desktop, both passed.

Yes, I've tried mailbox test feature as well:

Code: Select all

Operation NOT successful

Description: Helpdesk
Mailbox type: IMAP
Hostname: tls://outlook.domain.com
TCP port (optional): 993
Connection encryption: TLS
Username: helpdesk@domain.com
Password: ******
Authentication method: PLAIN
Basefolder (optional):

Message: Failed to connect to the mail server
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

Please adjust the following settings

Connection encryption: None
Authentication method: USER

The IMAP extension will attempt to use STARTTLS if the server supports it so encryption will be automatic

As that were the settings that were used in the telnet tests
horizn
Posts: 19
Joined: 03 Feb 2015, 09:07

Re: Failed to connect to Exchange

Post by horizn »

SL-Gundam wrote:Please adjust the following settings

Connection encryption: None
Authentication method: USER

The IMAP extension will attempt to use STARTTLS if the server supports it so encryption will be automatic

As that were the settings that were used in the telnet tests
Nothing is happening after that: only refreshing the same page (with configuration).
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

if nothing is happening then everything works
horizn
Posts: 19
Joined: 03 Feb 2015, 09:07

Re: Failed to connect to Exchange

Post by horizn »

SL-Gundam wrote:if nothing is happening then everything works
lol, I've checked this combination and I thought that reply like this (refreshing page only) means: it is not working.
It looks like that only TLS is not working but this is not a big issue. I am looking for more detailed documentation.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

Like i said it will try STARTTLS automatically so it encryption is supported by the mail server it will be used

The page refresh depends in a MantisBT configuration setting whether querie counts are shown. But this might be changed since it seems to be causing confusion

Current documentation is on the wiki and on the readme. Further documentation can be found in the forums.

https://www.mantisbt.org/wiki/doku.php/ ... lreporting
https://github.com/mantisbt-plugins/Ema ... t_mail.txt

I admit somethings still need further clarification but it is a work in progress
horizn
Posts: 19
Joined: 03 Feb 2015, 09:07

Re: Failed to connect to Exchange

Post by horizn »

The problem I have is: EmailPlugin is not able to download email messages from Exchange server.
I've tested it with external pop3 account and it works like a charm (each email message is a diffrent ticket). I've configured the same exchange email account (helpdesk@domain.com) with exactly the same settings like in EmailReporting plugin configuration (Encryption: None, port 143, Auth method: USER) in my ThunderBird client and it is working: ThunderBird is able to download emails.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

Port 143 is IMAP, not POP3

Empty the port input field and EmailReporting will decide automatically based on mailbox type and encryption selected
horizn
Posts: 19
Joined: 03 Feb 2015, 09:07

Re: Failed to connect to Exchange

Post by horizn »

SL-Gundam wrote:Port 143 is IMAP, not POP3

Empty the port input field and EmailReporting will decide automatically based on mailbox type and encryption selected
I know that, but this plugin does not work with imap, no matter Exchange or DoveCot. It is working with with POP3 like a charm, but I we don't use POP3. I can make IMAP account for you for tests if you like.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

If you are willing to do that then please send them to me by PM and will see whether i can get IMAP to work
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

horizn
Posts: 19
Joined: 03 Feb 2015, 09:07

Re: Failed to connect to Exchange

Post by horizn »

SL-Gundam wrote:This should now be fixed.

https://github.com/mantisbt-plugins/Ema ... 1a498ea086
now I have some different problem. I've replaced mail_api.php with fixed one, but:

I am sending email to mantis@domain.name
then I am checking that email has arrived:

Code: Select all

# ls /var/mail/domain.name/mantis/new/
1424427343.H817219P11930.domain
I am running script:

Code: Select all

# php /var/www/mantis/plugins/EmailReporting/scripts/bug_report_mail.php
Start checking all mailboxes: Friday 20th of February 2015 10:16:22


Done checking all mailboxes
so I am checking one more mailbox on server:

Code: Select all

# ls /var/mail/domain.name/mantis/new/
# ls /var/mail/domain.name/mantis/cur/
1424427343.H817219P11930.domain
So script is working, found this mail and marked it as read. the problem is that no ticket has been created in mantis. It is working like a charm with pop3.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Failed to connect to Exchange

Post by SL-Gundam »

It might have added the email as a note to an existing issue

But i will test again
Post Reply