Configuring the bounce handler

Facula

Well-known member
Licensed customer
I just wanted to confirm...

Has anything changed regarding the recommended server setup for the bounce handler?

IIRC in XF1.x, when this was introduced, one had to designate the bounce email address as the default mailbox in cPanel - the idea being that any rejected emails would be picked up and processed by the bounce handler.

However, my web admin has me questioning this as I'm working through an issue with him and I'm wondering if the required configuration has changed.

To be clear, when I refer to the "default address" I'm not referring to in XF - I'm referring to in cPanel

Per XF1.x, you had to set the bounce address as the catch-all in cPanel (which is called the default address)

1793575108277.webp

However in XF2.x, this same "enable variable..." wording appears in a slightly different location - I'm assuming the difference is that there is now unsubscribe AND bounce auto-handlers

1793575395917.webp

But, I want to better understand how XF works in this regard.

1) is it required to have a catch-all/default cpanel email address set up?

2) in order for automatic handling of both bounce and unsub to work, which one do you have to make the catch-all? I mean, if an unsub gets catch-all-directed to the bounce@ inbox, does XF know how to handle it? Might seem like a dumb question but this is not explicitly covered in the online manual...in fact nothing about setting up the automated handlers is in the manual, at least not that I could find.

I'm pretty sure I have it set up correctly but my web host seems to think it should not be done this way (after I alerted him to a completely difference problem):

"Xenforo shouldn't use the cpanel catch-all. It looks like you're using bounce@ with verp and an IMAP bounce handler, so it will manage all bounce@ and bounce+xx@ and deliver them to Xenforo."​

3) So is he correct that you do not have to use the cPanel catch-all in order for bounce/unsub handling to work?
 
Don't know anything about C-panel and neither why it should have anything to do with XF handeling bounces.

My current setup regarding this:
  • the forum sends transactional and other mails via the smarthost of my provider unter forum@myforumdomain.com (regular mailbox)
  • for bounce handling, I created a subdomain that is otherwise unused like backfire.myforumdomain.com and for this subdomain a dedicated mailbox/mailaccount with the catchall *@backfire.myforumdomain.com. This mailbox is then used for the bounce handler in XF
  • I left unsubscribe things at http and do not use the option for "unsubscribe per email"
This does work fine so far (and did it as well when using the built in php-mailer for sending rather then the smarthost before) with one single exception I experienced with the smarthost recently and for the first time: One single notification email that was sent via smarthost got rejected during the smtp-dialog by the receiving system as Spam (hotmail-address hosted by Microsoft, who would have guessed :rolleyes: ), backfired to the server by the smarthost and ended up there in the error log of the server, but not in the dedicated mail-error log with the entry

Expected response code "250" but got code "554", with message "554 5.7.1 Spam message rejected

by symfony mailer. As a consequence, XF tried so resend the mail a couple of times over the following days, obviously unaware that this was a kind of permanent error (or that it existed at all in the first place). Which then led to more error messages for the same mail over the following days as Microsoft consequently refused the mail. The user had already registered while I was still using the php-mailer, connecting directly to the receiving server and back then there was no problem.

As this was the first and only time of this happening I've no idea if that is normal or a bug.
 
Last edited:
cPanel is irrelevant to the discussion really, I was just giving info on my setup. What matters is the configuration of mailboxes and designation of the catch-all (which cPanel calls "default address".

So talking about cPanel was mainly to explain how they use "default" and so does XF but that these are not the same thing. cPanel "default address" is the "catch-all" mailbox. XF "default email address" is the email address that XF sends emails from.

for bounce handling, I created a subdomain that is otherwise unused like backfire.myforumdomain.com and for this subdomain a dedicated mailbox/mailaccount with the catchall *@backfire.myforumdomain.com. This mailbox is then used for the bounce handler in XF
that's an interesting approach.
 
that's an interesting approach.
I went for the dedicated subdomain for the simple reason that I wanted to make sure that no other mail (like i.e. with a typo in the localpart) might end up in the catchall for my usual forumdomain (where a couple of regular mailboxes exist) and potentially confuse the bounce system with wichever consequences. Probably overpicky, but subdomains are free and one should not touch the bounce-mailbox manually, so better safe than sorry. ;)
 
I went for the dedicated subdomain for the simple reason that I wanted to make sure that no other mail (like i.e. with a typo in the localpart) might end up in the catchall for my usual forumdomain (where a couple of regular mailboxes exist) and potentially confuse the bounce system.
Well that also is one of the reasons why I'm bringing up this discussion - because I'm wondering if there have been improvements since 1.x for handling these, meaning, XF might ignore emails that do not contain the appropriate bounce headers. So having emails that are not technically bounces but just end up in the catch-all would be ignored

But if that is the case, and VERP is on, then anything with the appropriate addressing to route it to the bounce email box should get there all on it's own, without using any catchall on the server side.

So why is there even a recommendation to have the catch all then? That is one of my questions. But essentially I think there needs to be better explanation of how the system is intended to work so people know how to set it up

I mean, I started working with computers in the 1980s when I was ~10 years old. So I'm no tech dummy, but I did not keep on the path once I got into college, so I know enough to be dangerous and can figure things out quickly, as long as I get answers to my questions....which seems to be hard lately for some reason...half the time I just end up using chat
 
I'm wondering if there have been improvements since 1.x for handling these, meaning, XF might ignore emails that do not contain the appropriate bounce headers. So having emails that are not technically bounces but just end up in the catch-all would be ignored
I've no idea, never used XF 1.x

In general: Where would be the advantage to enable a mailbox dedicated for bounces to receive other mail?

But if that is the case, and VERP is on, then anything with the appropriate addressing to route it to the bounce email box should get there all on it's own, without using any catchall on the server side.

So why is there even a recommendation to have the catch all then? That is one of my questions. But essentially I think there needs to be better explanation of how the system is intended to work so people know how to set it up
Don't know what you mean with VERP but in general XF is designed to be as compatible as possible with as many environments as possible. For the extended bounce handling this means: As there are quite a bunch of things, individual per mail, added to the local part of the bounce mailaddress you'd either need some mechanism like GMail (which allows "+ $anything" to be added to the local part of a mail address and still delivers it to the correct mail box) or a catchall b/c else the bounce email won't be delivered correctly.

They literally explain it in the settings:
Enable variable email address values for automated email handling

If enabled, sent emails will include the recipient email address in the bounce/unsubscribe address field. This enables more accurate and more secure automated email handling. If using automated bounce/unsubscribe processing, enabling this option is strongly recommended.

This option requires that the specified account is a catch-all account or supports a "+" as a wildcard separator (such as in Gmail). For example, if this option is enabled with a bounce address of bounce@example.com, the email might be returned to bounce+123abc+user=domain.com@example.com.
So you don't need a wildcard address if your mail server supports this "+" notation (which clearly is not a given).

As I understand it you can have a dedicated bounce mailbox w/o those variable email settings as well and still use automated bounce handling. But this will limit the quality of the automated handling to a degree:

This option allows the "Bounced email address" account to be automatically read and processed for bounced email reports. This will detect if emails sent to a user bounce, forcing the user to update their email address and preventing the system from emailing them until this happens. This can help reduce the chance of email sent from your board from being considered spam.

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.
For this simpler automated bounce handling a normal mailbox/mailaddress should be sufficient. Du to the dedication this mail address should definitvely be limited to bounces only and therefor use a different mailaddress from the one you are sending forum mails with (as sometimes people will simply hit answer and write to that address which could be potenially bad with automated bounce handling being directed to that mail box).

But then: Why fall back to a limited solution when the better one is available for free and not even more complicated? Where is the problem with setting up a dedicated catch all address?
 
But then: Why fall back to a limited solution when the better one is available for free and not even more complicated? Where is the problem with setting up a dedicated catch all address?
this is my question. If my email system works with + addressing (which it does) then why would I check this box for "enable the variable email address value for automated email handling" in the first place?

What is the benefit?

Or where does that "have" to be used?

I'm unchecking this box on all my sites and eliminating the catch-all. I previously had the "bounce@" address as the catch all. But then next what I want to know is if I can still have a catchall to another inbox? Or could that possibly capture emails that were meant for the bounce box, that just didn't get properly processed by the server?

Maybe that's the issue, some other servers might not configure the bounce as expected, and an email that should go to the + addressed bounce box end up in the catch-all.

I guess maybe I'll just test that one....
 
If my email system works with + addressing (which it does) then why would I check this box for "enable the variable email address value for automated email handling" in the first place?
B/c this makes sure that the bounce management makes use of the + addressing possibilities in the first place.
What is the benefit?
Improved bounce handling.
I'm unchecking this box on all my sites and eliminating the catch-all.
This would be perfectly stupid. If your mail system really supports the + adressing you can check the "variable mail address value" and still get rid of your catch all. That is how I understand it.
But then next what I want to know is if I can still have a catchall to another inbox?
Sure, why not?

Or could that possibly capture emails that were meant for the bounce box, that just didn't get properly processed by the server?
Maybe that's the issue, some other servers might not configure the bounce as expected, and an email that should go to the + addressed bounce box end up in the catch-all.

Should not happen if your mailer supports the + notation. All the enhanced thingy does is to add individual localparts in the + notation to the bounce mail address before sending the mail, so there should be no issues. So all the remote server has to do is to bounce to the bounce address delivered with the mail (which is individual for each mail). Any mailsystem should be able to do that. Have not tried it - give it a shot and report back.
 
This would be perfectly stupid.
Thanks for saying "I think you misinterpreted that sentence" into an insult, but got it.

So the check box activates Xenforo's method of adding + addressing to the email bounce pathway, so that the server takes that bounce email and passes it to the bounce email address. Got it.

So then my question is, how would the automated bounce handing system even work if you didn't check that box? Like, under what scenario would you designate a bounce email box but then would not need to check that box?
 
So then my question is, how would the automated bounce handing system even work if you didn't check that box?
It will have to dig the necessary information about the recipient's address from the body of the bounced mail which may work but is obviously more prone to failure than the enhanced version that includes this via the beefed up bounce-mail-address.
Like, under what scenario would you designate a bounce email box but then would not need to check that box?
I'd guess if neither your mailsystem serves the "+" notation nor you have the option to create a catchall-address but still want automated bounce-handling. It's probably not the best idea, but I assume it is there as a fallback option. Not every XF installation is administrated by s/o with unlimited power about the environment and if it is i.e. part of a bigger organisation sometimes getting a catchall address may be not possible due to organisational or policy constraints and your mailsystem may not support the "+" notation neither, either due to limitation of the mailsystem itself or i.e. the spamfilter, virusscanner or whatever else there may be sitting in front of the mailboxes.

Sadly the XF manual is pretty silent when it comes to this option:

 
Back
Top Bottom