XF 2.2 Automatic Bounce Handler not working with IMAP and TLS, only IMAP and SSL

Lorthirk

Member
Hey,

I'm configuring the Bounce Handler with IMAP and TLS but the execution throws an error:

Code:
Stack trace
#0 src/vendor/laminas/laminas-mail/src/Protocol/Imap.php(138): Laminas\Mail\Protocol\Imap->nextLine()
#1 src/vendor/laminas/laminas-mail/src/Protocol/Imap.php(100): Laminas\Mail\Protocol\Imap->assumedNextLine('* OK')
#2 src/vendor/laminas/laminas-mail/src/Protocol/Imap.php(45): Laminas\Mail\Protocol\Imap->connect('mail....', 993, 'tls')
#3 src/XF/Mail/Storage/Imap.php(28): Laminas\Mail\Protocol\Imap->__construct('mail....', 993, 'TLS')
#4 src/XF/EmailBounce/Processor.php(256): XF\Mail\Storage\Imap::setupFromHandler(Array)
#5 src/XF/SubContainer/Bounce.php(15): XF\EmailBounce\Processor::getDefaultBounceHandlerStorage(Object(XF\Pub\App))
#6 src/XF/Container.php(31): XF\SubContainer\Bounce->XF\SubContainer\{closure}(Object(XF\Container))
#7 src/XF/SubContainer/Bounce.php(43): XF\Container->offsetGet('storage')
#8 src/XF/Job/EmailBounce.php(20): XF\SubContainer\Bounce->storage()
#9 src/XF/Job/Manager.php(260): XF\Job\EmailBounce->run(8)
#10 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 8)
#11 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 8)
#12 job.php(43): XF\Job\Manager->runQueue(false, 8)
#13 {main}

The strange thing is that with SSL I don't have any error, and the configuration should be the same according to my provider. Any hint?
 
Last edited:
The strange thing is that with SSL I don't have any error, and the configuration should be the same according to my provider. Any hint?
IMHO that's nonsense; explicit TLS ("TLS"/StartTLS) and implict TLS ("SSL") are pretty much mutually exclusive and don't use the same port, eg. it is very unlikely that the configuration would be "the same".

Port 993 is usually used for implicit TLS ("SSL", IMAPS), StartTLS ("TLS") usually runs on port 143.

Why do you want to use StartTLS? If possible I'd always use IMAPS.
 
Last edited:
IMHO that's nonsense; explicit TLS ("TLS"/StartTLS) and implict TLS ("SSL") are pretty much mutually exclusive and don't use the same port, eg. it is very unlikely that the configuration would be "the same".

Port 993 is usually used for implizit TLS ("SSL", IMAPS), StartTLS ("TLS") usually runs on port 143.
Ok, that may explain what's happening then, since the provider's doc says "SSL/TLS". Probably they're just using Implicit TLS.
 
Yeah, the options are confusing :)

PHP historically calls all implicit TLS connections "SSL" (although they are always TLS 1.2+ by now, at least they should) and explicit TLS connections (eg. StartTLS) "TLS".

As said before, port 993 is implict TLS/IMAPS, so only this ("SSL") will work on this port.
 
Top Bottom