IMAP: Having issues authenticating with Outlook/Office365
ghub2015 opened this issue · 3 comments
I am testing IMAP against Outlook/Office365 using /opt/sandia/webapps/scot3/bin/alertbot.pl but not having success. I would appreciate any feedback or suggestions.
Result:
$ cd /opt/sandia/webapps/scot3/bin/
$ ./alertbot.pl
Attribute (imap_client) does not pass the type constraint because: Validation failed for 'Mail::IMAPClient' with value undef at accessor Scot::Util::Imap::imap_client (defined at ../lib/Scot/Util/Imap.pm line 53) line 21
Scot::Util::Imap::imap_client('Scot::Util::Imap=HASH(0x9561f30)') called at ../lib/Scot/Util/Imap.pm line 111
Scot::Util::Imap::get_messages_aref('Scot::Util::Imap=HASH(0x9561f30)', 'HASH(0x95309d0)') called at ../lib/Scot/Bot/ForkAlerts.pm line 67
Scot::Bot::ForkAlerts::run('Scot::Bot::ForkAlerts=HASH(0x9540248)', 'HASH(0x95309d0)') called at alertbot.pl line 173
SCOT log (/var/log/scot.prod.log):
2016/02/25 08:55:50 [15302] Imap.pm: 73 ++++ Building IMAP connection
2016/02/25 08:55:50 [15302] Imap.pm: 74 ++++ OPTS : $VAR1 = 'Server';
$VAR2 = 'outlook.office365.com';
$VAR3 = 'Port';
$VAR4 = 993;
$VAR5 = 'User';
$VAR6 = 'XXXXXXXXXXXXXXXX';
$VAR7 = 'Password';
$VAR8 = 'YYYYYYYYYYYYYYYY';
$VAR9 = 'Ssl';
$VAR10 = [
'SSL_verify_mode',
'SSL_VERIFY_NONE'
];
$VAR11 = 'Uid';
$VAR12 = 1;
$VAR13 = 'Ignoresizeerrors';
$VAR14 = 1;
$VAR15 = 'SSL_verify_mode';
$VAR16 = 'SSL_VERIFY_NONE';
Config (/opt/sandia/webapps/scot3/scot.conf):
'production' => {
'email_accounts' => {
'XXXXXXXXXXXXXXXX' => 'YYYYYYYYYYYYYYYY',
'scot-alerts-test' => 'password',
'scot-alerts' => 'password'
},
'version' => '3.3',
'imap' => {
'ignoresizeerrors' => 1,
'username' => 'XXXXXXXXXXXXXXXX',
'port' => 993,
'uid' => 1,
'hostname' => 'outlook.office365.com',
'ssl' => [
'SSL_verify_mode',
'SSL_VERIFY_NONE'
],
},
Never attempted working with office 365 and I have no way of testing to
make it work where I'm at.
Some things to check:
Make sure that the Port is correct and the SSL options are set correctly.
I'd assume that outlook.office365.com has a valid cert, so you could remove
the ssl_verify_mode stanza and see if you get a new error message.
Are you behind a proxy or are there firewall restrictions?
Todd
On Thu, Feb 25, 2016 at 10:14 AM, ghub2015 notifications@github.com wrote:
I am testing IMAP against Outlook/Office365 using
/opt/sandia/webapps/scot3/bin/alertbot.pl but not having success. I would
appreciate any feedback or suggestions.Result:
$ cd /opt/sandia/webapps/scot3/bin/
$ ./alertbot.pl
Attribute (imap_client) does not pass the type constraint because: Validation failed for 'Mail::IMAPClient' with value undef at accessor Scot::Util::Imap::imap_client (defined at ../lib/Scot/Util/Imap.pm line 53) line 21
Scot::Util::Imap::imap_client('Scot::Util::Imap=HASH(0x9561f30)') called at ../lib/Scot/Util/Imap.pm line 111
Scot::Util::Imap::get_messages_aref('Scot::Util::Imap=HASH(0x9561f30)', 'HASH(0x95309d0)') called at ../lib/Scot/Bot/ForkAlerts.pm line 67
Scot::Bot::ForkAlerts::run('Scot::Bot::ForkAlerts=HASH(0x9540248)', 'HASH(0x95309d0)') called at alertbot.pl line 173SCOT log (/var/log/scot.prod.log):
2016/02/25 08:55:50 [15302] Imap.pm: 73 ++++ Building IMAP connection
2016/02/25 08:55:50 [15302] Imap.pm: 74 ++++ OPTS : $VAR1 = 'Server';
$VAR2 = 'outlook.office365.com';
$VAR3 = 'Port';
$VAR4 = 993;
$VAR5 = 'User';
$VAR6 = 'XXXXXXXXXXXXXXXX';
$VAR7 = 'Password';
$VAR8 = 'YYYYYYYYYYYYYYYY';
$VAR9 = 'Ssl';
$VAR10 = [
'SSL_verify_mode',
'SSL_VERIFY_NONE'
];
$VAR11 = 'Uid';
$VAR12 = 1;
$VAR13 = 'Ignoresizeerrors';
$VAR14 = 1;
$VAR15 = 'SSL_verify_mode';
$VAR16 = 'SSL_VERIFY_NONE';Config (/opt/sandia/webapps/scot3/scot.conf):
'production' => {
'email_accounts' => {
'XXXXXXXXXXXXXXXX' => 'YYYYYYYYYYYYYYYY',
'scot-alerts-test' => 'password',
'scot-alerts' => 'password'
},
'version' => '3.3',
'imap' => {
'ignoresizeerrors' => 1,
'username' => 'XXXXXXXXXXXXXXXX',
'port' => 993,
'uid' => 1,
'hostname' => 'outlook.office365.com',
'ssl' => [
'SSL_verify_mode',
'SSL_VERIFY_NONE'
],
},—
Reply to this email directly or view it on GitHub
#33.
Hi Todd. I also think it is related to the SSL stanza (although 'SSL_VERIFY_NONE' should be more forgiving; in fact allowing "man-in-the-middle").
So, can this be removed completely?
'ssl' => [
'SSL_verify_mode',
'SSL_VERIFY_NONE'
],
I tried but still no joy via that approach.
Re: Firewall/proxy, I have also successfully used telnet from the SCOT instance to the Office365 host on port 993 without issue.
Resolved.
This appears to have been a 2 Factor Authentication issue. It works fine if there is no 2FA.