So, I have a generic/application/system account (terminology varies) which has access to multiple mailboxes. The username I use is in the format <domain>/<username>/<mailbox>
and this is the only "out of the ordinary" thing. The following line works on PHP 7.0.6 (my laptop) but not on 5.4.16 (dev server):
$mbox = imap_open("<host>:993/ssl/novalidate-cert",
"<domain>/<username>/<mailbox>", <pass>,
NULL, array('DISABLE_AUTHENTICATOR' => 'GSSAPI'));
The error I get is:
PHP Notice: Unknown: Can not authenticate to IMAP server: AUTHENTICATE failed. (errflg=2) in Unknown on line 0
What I have tried:
- The mailboxes' original account (username in
<domain>/<user>
format) which works - Using
/debug
in$mailbox
andOP_DEBUG
flag - non of which did anything useful - Debugging messages to the server using python. This verifies that the username is sent as three-segment string and also works
- Removing the 3rd segment (mailbox) thinking I can select it later - leads to authentication failure in both cases/versions
Questions:
- Is this a PHP bug?
- Is there any other way to do this? (I cannot change PHP version)
- Can I somehow enable message logging? (no root so no tcpdump option)