XF 2.3 Is there a guide for setting up bounced email handling with Gmail?

Stuart Wright

Well-known member
After suddenly and unexpectedly getting lots of server errors relating to wrong login credentials for the bounced email account, I decided to switch to Google OAuth. But I must have botched it because it (by which I assume Xenforo) deleted all my emails for the last year. As far as I can see, they are not recoverable in Gmail. Obviously this is a serious ****up.

Using my main email address admin@avforums.com login for Google Cloud Console, under the AVForums project, I created a new app with an OAuth 2.0 Client and redirect URI as specified in Xenforo's setup page.

I then changed the Automated bounce handler in AVForums admin https://www.avforums.com/admin.php?options/groups/emailOptions/#emailBounceHandler to use IMAP with Google OAuth using the client ID and secret key from the Google Client.

I've disabled bounced email handling in Xenforo for the moment.

I need some help.
Thanks
 
Last edited:
The behaviour of this is documented below the option:

This option will read and remove emails from the specified account when processing. It MUST be directed to an account whose sole purpose is collecting bounce emails from this XenForo installation. A value must be entered for the "Bounced email address" option.

I would say you set it up correctly seeing the behaviour that you did, but it must be an account that isn't used for any other purpose because the processor will delete emails it has already processed. Not 100% sure if they are fully deleted or still available under "All Mail" (or Bin). It's worth checking.
 
After suddenly and unexpectedly getting lots of server errors relating to wrong login credentials for the bounced email account, I decided to switch to Google OAuth. But I must have botched it because it (by which I assume Xenforo) deleted all my emails for the last year. As far as I can see, they are not recoverable in Gmail. Obviously this is a serious ****up.

Using my main email address admin@avforums.com login for Google Cloud Console, under the AVForums project, I created a new app with an OAuth 2.0 Client and redirect URI as specified in Xenforo's setup page.

I then changed the Automated bounce handler in AVForums admin https://www.avforums.com/admin.php?options/groups/emailOptions/#emailBounceHandler to use IMAP with Google OAuth using the client ID and secret key from the Google Client.

I've disabled bounced email handling in Xenforo for the moment.

I need some help.
Thanks
Just FYI, we use G. Workspace for our business. They sent notices telling us that we had to make sure all login handlers were using the latest OAuth. We had a couple of services break when the old auth methods were disabled.

The bounced email account shouldn’t have been wiped out, that’s very odd. Is that just a straight up Gmail account or a workspace account?
 
The bounced email account shouldn’t have been wiped out, that’s very odd.
As pointed out by @Chris D and documented in the option description it is normal expected behaviour that the mailbox used for automatic bounce handling gets cleared automatically by XenForo.
This is nothing special to GMail, all mailboxes used for automatic bounce & unsubscribe processing are processed the same way.

I'd use 3-4 E-different Mail-Adresses / Mailboxes

Default email address
This should be the email address used so send emails from XenForo (eg. smth. like noreply@domain, info@domain, etc.)
It should not be configured to receive any emails (unless you want to have dozens of auto responders, users replying to threads, conversations, birtday greetings, unsubscribe requests, ...).
Either bounce emails sent to this mailbox with an appropriate message ("This email address is only used for sending emails. For support please contact ...") or drop without notice.
Do not use an autoresponder as that would generate backscatter for spam.

Contact email address
This should be another dedicated mailbox used to receive (and if you want for manually send emails from your email client).
Probably smth. like admin@domain, support@domain, contact@domain etc.

Bounced email address
This should be another dedicated mailbox used to receive bounce emails only, probably smth. like bounce@domain
This mailbox will be automatically processed / cleared by XenForo.
Make sure that the mailbox support VERP and enable this.

Unsubscribe email address (optional)
This should be another dedicated mailbox used to receive unsubscribe emails only, probably smth. like unsubscribe@domain
This mailbox will be automatically processed / cleared by XenForo.
 
As pointed out by @Chris D and documented in the option description it is normal expected behaviour that the mailbox used for automatic bounce handling gets cleared automatically by XenForo.
This is nothing special to GMail, all mailboxes used for automatic bounce & unsubscribe processing are processed the same way.
Yep, I get that part but that's why I asked if it was a generic Gmail account or a Google Workspace operated account, because there are protections to recover deleted content within certain time periods. I should have written what I meant more clearly, apologies.
 
Thanks for the replies.
I use Google Workspace and Outlook for emails on my PC. They vanished from Outlook without a trace. This is what pissed me off so much.
I was able to open Gmail and move everything from trash back in to my inbox. I never use Gmail and don't like the unintuitive interface.

We use Amazon SES to send emails, by the way. Somehow.

So the issue, here, is how to tell Xenforo or the OAuth thingy to only work on bounce@avforums.com.
We have admin@avforums.com as the main email for the forum and the Google login.
bounce@avforums.com is set up as the bounce email address in Xenforo. We pay monthly for that mailbox. No idea whether we need to or not.
But Xenforo deleted emails in the admin@avforums.com mailbox.
There was nowhere in the OAuth setup (another thing which I am totally unfamiliar with) which allowed me to specify what it does or what email address to work with. I created it and crossed my fingers.

We need a video tutorial for dummies like me. For the moment, bounced email handling is disabled, which is not a situation I am happy with.
 
  • Like
Reactions: ENF
There was nowhere in the OAuth setup (another thing which I am totally unfamiliar with) which allowed me to specify what it does or what email address to work with. I created it and crossed my fingers.
The OAuth setup should use the target email address for the OAuth 2.0 Client IDs list in the "Name" field.
And yes, this should be better documented.
 
What Name field? Do you mean the App name should be bounce@avforums.com?
View attachment 322196
That's the branding section (for what I assume is your Google connected accounts auth app), I was referring to the actual auth tokens for the individual email accounts that you would set here:
https://console.cloud.google.com/apis/credentials

That section you're showing, we use for the main site authentication for users to join/login to the.
The credentials tokens, we use to power services that have individual emails assigned. (support, bounce, etc.)

I can't show an example right now, but you'd get a set of client ID/client secret codes (for each email function/address) that you'd setup in XenForo. The name field would be the target email address and you'd have to set the relative URL's in the lower part of that screen. (Origin, Redirect, etc.)
 
Last edited:
That's the branding section (for what I assume is your Google connected accounts auth app), I was referring to the actual auth tokens for the individual email accounts that you would set here:
https://console.cloud.google.com/apis/credentials

That section you're showing, we use for the main site authentication for users to join/login to the.
The credentials tokens, we use to power services that have individual emails assigned. (support, bounce, etc.)

I can't show an example right now, but you'd get a set of client ID/client secret codes (for each email function/address) that you'd setup in XenForo. The name field would be the target email address and you'd have to set the relative URL's in the lower part of that screen. (Origin, Redirect, etc.)
Thank you. This is all over my head, though. I'll have to get someone to do it for me.
 
Back
Top Bottom