It should be possible to tweak the settings to avoid some spurious Discourse bounces due to these timeouts (fwiw, the error is:
Service closing transmission channel - command timeout).
Here’s the problem: in my logs, I see that timeouts are by far the most common “temporary” failure. If you’ve tweaked your Discourse increment/threshold settings such that timeout errors are not triggering bounces on Discourse, then you’re definitely not triggering bounces for any of the other kinds of errors, since these are less frequent. On the other hand: if your increment/threshold are such that you’ll e.g. catch a case where someone has a full mailbox and delivery fails a few times in a row, you’ll also probably end up catching some timeout cases as well, purely b/c these are much more statistically common.
At best, you can probably set your increment for soft bounces so that you’ll reliably catch e.g. an address where a send fails 20 times in a row (e.g. maybe something like reset time 4 days, threshold 12, soft increment 1, hard increment 12). But, it’s pretty likely that a case like this would already be flagged as a
permanent_fail by mailgun anyway - in this case, you don’t really have a choice to restrict email to that address: Mailgun is already suppressing mail via it’s own rules, until you manually re-enable it.
TLDR: it seems like
permanent_fail by itself will do what you need, and
temporary_fail may not be needed unless you have a specific reason to make your bounce rules more strict than Mailgun’s own rules.
You can check for timeout related failures on your own Mailgun account here (replacing the
*** with your domain):
I see at least a few per day - curious what other people see? This may be a coincidence, but it seems like the failures are generally with obscure/personal/university email hosts, which would point to something like old SMTP server software or high server load (I see no gmail/yahoo/protonmail/etc timeouts in spite of these being the majority).