O365/Fetchmail

Hi all

Have searched tons about Fetchmail/o365 but to no avail, we are migrating to Office 365 but still have the exchange on-premise for RT to work. Just want to get out the question, has anyone here managed to IMAP a Shared Mailbox in O365 into RT? Also read this but no solution: https://quornicus.wordpress.com/2016/01/08/fetchmail-office-365-configuration-rt/

poll serverdomainname.here
protocol IMAP
auth password**
user "local.domain\user-credentials\shared-mailboxname"
pass "secretpassword"
mda “/usr/bin/rt-mailgate --queue Testqueue --action correspond --url http://rt.domainname” keep

Error: Authorization failure.

I have also tried to use SSL but fetchmail debug gives same error, even when trying to imap the users mailbox. We have a consultant doing this migration for us to O365, but not even them have managed to come around this issue. In my fetchmailconf file I have 15 working boxes that I’m polling, but only o365 is not working.

fetchmail: outlook.office365.com key fingerprint: 3A:A4:58:42:56:CD:BD:11:19:5B:CF:1E:85:16:8E:4D
fetchmail: outlook.office365.com fingerprints match.
fetchmail: IMAP< * OK The Microsoft Exchange IMAP4 service is ready. [SABFADEAUABSADAANgBDAEEAMAAwADcANgAuAGUAdQByAHAAcgBkADAANgAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
fetchmail: IMAP< A0001 OK CAPABILITY completed.
fetchmail: Protocol identified as IMAP4 rev 1
fetchmail: GSSAPI error gss_inquire_cred: Unspecified GSS failure. Minor code may provide more information
fetchmail: GSSAPI error gss_inquire_cred: No Kerberos credentials available
fetchmail: No suitable GSSAPI credentials found. Skipping GSSAPI authentication.
fetchmail: If you want to use GSSAPI, you need credentials first, possibly from kinit.
fetchmail: IMAP> A0002 LOGIN “local.domain\user-credential” *
fetchmail: IMAP< A0002 NO LOGIN failed.
fetchmail: Authorization failure on local.domain\user-credential@outlook-emeawest.office365.com
fetchmail: For help, see http://www.fetchmail.info/fetchmail-FAQ.html#R15
fetchmail: IMAP> A0003 LOGOUT
fetchmail: IMAP< * BYE Microsoft Exchange Server 2016 IMAP4 server signing off.
fetchmail: IMAP< A0003 OK LOGOUT completed.
fetchmail: 6.3.26 querying outlook.office365.com (protocol IMAP) at Mon 26 Sep 2016 03:13:44 PM CEST: poll completed
Merged UID list from outlook.office365.com:

Thankful of any input on this, will post solution when found.

Found the solution to this after some head scratching, StartTLS is required towards o365, contrary to the information we got before migrating.

poll outlook.office365.com
protocol IMAP
user "email.forauthorization@yourdomain.now/Sharedmailboxname"
pass "password"
ssl
mda “/usr/bin/rt-mailgate --queue Youqueue --action correspond --url http://rt.domain” keep

Above works for me!

[Beskrivning: T3]http://www.t3.se/

JOEL BERGMARK
Thirdline support
joel.bergmark@t3.semailto:joel.bergmark@t3.se | www.t3.sehttp://www.t3.se/
[Beskrivning: T3]http://www.facebook.com/pages/Telecom3-Sverige-AB/126032287454737

Från: rt-users [mailto:rt-users-bounces@lists.bestpractical.com] För Joel Bergmark
Skickat: den 26 september 2016 15:29
Till: rt-users@lists.bestpractical.com
Ämne: [rt-users] O365/Fetchmail

Hi all

Have searched tons about Fetchmail/o365 but to no avail, we are migrating to Office 365 but still have the exchange on-premise for RT to work. Just want to get out the question, has anyone here managed to IMAP a Shared Mailbox in O365 into RT? Also read this but no solution: https://quornicus.wordpress.com/2016/01/08/fetchmail-office-365-configuration-rt/

poll serverdomainname.here
protocol IMAP
auth password**
user "local.domain\user-credentials\shared-mailboxname"
pass "secretpassword"
mda “/usr/bin/rt-mailgate --queue Testqueue --action correspond --url http://rt.domainname” keep

Error: Authorization failure.

I have also tried to use SSL but fetchmail debug gives same error, even when trying to imap the users mailbox. We have a consultant doing this migration for us to O365, but not even them have managed to come around this issue. In my fetchmailconf file I have 15 working boxes that I’m polling, but only o365 is not working.

fetchmail: outlook.office365.com key fingerprint: 3A:A4:58:42:56:CD:BD:11:19:5B:CF:1E:85:16:8E:4D
fetchmail: outlook.office365.com fingerprints match.
fetchmail: IMAP< * OK The Microsoft Exchange IMAP4 service is ready. [SABFADEAUABSADAANgBDAEEAMAAwADcANgAuAGUAdQByAHAAcgBkADAANgAuAHAAcgBvAGQALgBvAHUAdABsAG8AbwBrAC4AYwBvAG0A]
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
fetchmail: IMAP< A0001 OK CAPABILITY completed.
fetchmail: Protocol identified as IMAP4 rev 1
fetchmail: GSSAPI error gss_inquire_cred: Unspecified GSS failure. Minor code may provide more information
fetchmail: GSSAPI error gss_inquire_cred: No Kerberos credentials available
fetchmail: No suitable GSSAPI credentials found. Skipping GSSAPI authentication.
fetchmail: If you want to use GSSAPI, you need credentials first, possibly from kinit.
fetchmail: IMAP> A0002 LOGIN “local.domain\user-credential” *
fetchmail: IMAP< A0002 NO LOGIN failed.
fetchmail: Authorization failure on local.domain\user-credential@outlook-emeawest.office365.com
fetchmail: For help, see http://www.fetchmail.info/fetchmail-FAQ.html#R15
fetchmail: IMAP> A0003 LOGOUT
fetchmail: IMAP< * BYE Microsoft Exchange Server 2016 IMAP4 server signing off.
fetchmail: IMAP< A0003 OK LOGOUT completed.
fetchmail: 6.3.26 querying outlook.office365.com (protocol IMAP) at Mon 26 Sep 2016 03:13:44 PM CEST: poll completed
Merged UID list from outlook.office365.com:

Thankful of any input on this, will post solution when found.