XF 2.2 Bounce connection error: cannot login, user or password wrong

PJK

Active member
I've noticed I'm getting this same error for the last 45 days randomly starting beginning of June. I've used SMTP with AWS SES for years without issue. How do I troubleshoot this? Here is the full error:

  • Laminas\Mail\Exception\RuntimeException: Bounce connection error: cannot login, user or password wrong
  • src/XF/Mail/Storage/Imap.php:32
  • Generated by: Unknown account
  • Jul 29, 2022 at 7:53 PM

Stack trace​

#0 src/XF/EmailBounce/Processor.php(256): XF\Mail\Storage\Imap::setupFromHandler(Array)
#1 src/XF/SubContainer/Bounce.php(15): XF\EmailBounce\Processor::getDefaultBounceHandlerStorage(Object(XF\Pub\App))
#2 src/XF/Container.php(28): XF\SubContainer\Bounce->XF\SubContainer\{closure}(Object(XF\Container))
#3 src/XF/SubContainer/Bounce.php(43): XF\Container->offsetGet('storage')
#4 src/XF/Job/EmailBounce.php(20): XF\SubContainer\Bounce->storage()
#5 src/XF/Job/Manager.php(258): XF\Job\EmailBounce->run(8)
#6 src/XF/Job/Manager.php(200): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(84): XF\Job\Manager->runJobEntry(Array, 8)
#8 job.php(43): XF\Job\Manager->runQueue(false, 8)
#9 {main}

Request state​

array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(66) "xxxxx"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
SMTP is for sending email.. not for checking. And usually your bounce email address is accessed either by IMAP or POP3 (in your case, it appears IMAP).
I'm assuming you've set up Amazon SES to receive email, created the bucket for your bounced email account to access in Amazon S3 or, if not, have configured Amazon WorkMail?
You don't have to host your bounced/unsubscribe both at Amazon SES... I don't. Amazon SES is simply used to send my mail...all inbound email routes to another MTA instance at another location.
 
SMTP is for sending email.. not for checking. And usually your bounce email address is accessed either by IMAP or POP3 (in your case, it appears IMAP).
I'm assuming you've set up Amazon SES to receive email, created the bucket for your bounced email account to access in Amazon S3 or, if not, have configured Amazon WorkMail?
You don't have to host your bounced/unsubscribe both at Amazon SES... I don't. Amazon SES is simply used to send my mail...all inbound email routes to another MTA instance at another location.
I use SES for sending, but bounced email is a gmail email and the Automated bounced email handler is IMAP to gmail. Worked great but not sure what happened. What do I need to do to resolve the issue?

Thanks
 
What do I need to do to resolve the issue?

If referring to the error in your first post.. it tells you exactly what the problem was.
The login user name and/or password is wrong that XF is trying to use. Have you tried manually logging into that account through the gmail web interface?
There is the possibility that Google/Gmail disabled the account for some reason.
 
If referring to the error in your first post.. it tells you exactly what the problem was.
The login user name and/or password is wrong that XF is trying to use. Have you tried manually logging into that account through the gmail web interface?
There is the possibility that Google/Gmail disabled the account for some reason.
I never touched those settings and the error randomly started. I've logged into the email fine without issue. Any ideas how to troubleshoot this? I'm using SSL:
Connection type: IMAP
Host imap.gmail.com:993

Is it possible the port needs to be changed? How do I figure out what to use?

Thanks
 
Last edited:
I never touched those settings and the error randomly started. I've logged into the email fine without issue. Any ideas how to troubleshoot this? I'm using SSL:
Connection type: IMAP
Host imap.gmail.com:993

Is it possible the port needs to be changed? How do I figure out what to use?

Thanks
I'm having this issue as well I wonder if it's this

IMG_20221024_174552.webp
 
I'm having this issue as well I wonder if it's this
Very likely it could be... and I totally forgot about them doing that as I had to work through some hoops on a local clinic to get their TimeTrex instance to send alerts through one fo their Google Workspace accounts.
It's one of the reasons I try to avoid using Google email (either Gmail or Workspace) for automated stuff like that.
 
Ah interesting. What is the best/easiest alternative to gmail for this? Thanks
Are you using the standard gmail account? If so, not really anything. I think there was a place in Google Workspace enable "insecure" logins... but I'd have to get back into it and check for sure.
I simply use ZoHo. Now you do have to pay for an account with them for each user - I got lucky and was grandfathered in since I had accounts with them from years ago for a domain. I have a domain set up with them, and that allows me to use domain associated bounce/unsubscribe email addresses instead of pointing them at a hosting providers domain.

You may want to review this

 
Are you using the standard gmail account? If so, not really anything. I think there was a place in Google Workspace enable "insecure" logins... but I'd have to get back into it and check for sure.
I simply use ZoHo. Now you do have to pay for an account with them for each user - I got lucky and was grandfathered in since I had accounts with them from years ago for a domain. I have a domain set up with them, and that allows me to use domain associated bounce/unsubscribe email addresses instead of pointing them at a hosting providers domain.

You may want to review this

Thanks. I see in Google security:

Less secure app access​

To protect your account, apps and devices that use less secure sign-in technology are blocked. To keep your account secure, Google will automatically turn this setting OFF if it’s not being used.

This setting is no longer available. Learn more

 
Will look into ZoHo, are there any free options that people use?
If you were using regular Gmail, you could always look at outlook/live/hotmail and see if it works. I'm pretty sure that they still allow you to access via a client, which is basically what you are doing. The main issue that you may have is that they detect any inbound mail as spam and block it from going through if you are relaying through them.
ZoHo still does free accounts, but you can only access them via the web interface, not through a client app unless you are on their paid level.
 
If you were using regular Gmail, you could always look at outlook/live/hotmail and see if it works. I'm pretty sure that they still allow you to access via a client, which is basically what you are doing. The main issue that you may have is that they detect any inbound mail as spam and block it from going through if you are relaying through them.
ZoHo still does free accounts, but you can only access them via the web interface, not through a client app unless you are on their paid level.
Thanks. Zoho looks good, $1/month is reasonable. Do you hookup your domain email to Zoho? Or whats the most common setup for XF admins to use?
 
I've setup emails in Cpanel on my domain, and getting these errors for bounce and unsubscribe:
  • Laminas\Mail\Protocol\Exception\RuntimeException: Bounce connection error: cannot read - connection closed?
  • src/vendor/laminas/laminas-mail/src/Protocol/Imap.php:123
  • Generated by: Unknown account
  • Oct 30, 2022 at 7:23 PM
--------------
  • Laminas\Mail\Protocol\Exception\RuntimeException: Unsubscribe connection error: cannot read - connection closed?
  • src/vendor/laminas/laminas-mail/src/Protocol/Imap.php:123
  • Generated by: Unknown account
  • Oct 30, 2022 at 7:14 PM
-----

The webhost said I need to talk to XF. How can I resolve these issues to get this working? Thanks
 
You are really going to need to see the server logs on why the connection is being closed.
You need to make sure that you are connecting via the correct port, using the correct security protocol and that the login credentials are correct.

Thanks. Zoho looks good, $1/month is reasonable. Do you hookup your domain email to Zoho?
Yes, I lucked out and joined them many years ago... and had an active domain account with them and got grandfathered in... so my astrowhat.com email is hosted there and all my transactional is sent through a sub-domain from Amazon SES.
 
  • Like
Reactions: PJK
Ah interesting. What is the best/easiest alternative to gmail for this? Thanks
There is a workaround

Your Gmail bounce email, create 2 factor authentication security for it. This is crucial.

Now you have a new Google option to generate app passwords

IMG_20221105_215310.jpg
Now create a app password for mail, and it's used for "other"...call it IMAP or whatever.

Use this new password it gives you as your bounce email password.

In xenforo

And you're all good again 👍
 
Top Bottom