# Category email in requires reply\_by\_email\_enabled?

**URL:** https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855
**Category:** Bug
**Created:** [January 20, 2026, 9:08am UTC](https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855 "2026-01-20T09:08:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [January 20, 2026, 9:08am UTC](https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855/1 "2026-01-20T09:08:33Z")

</div>

## Situation

- `reply_by_email_enabled` disabled, we _do not want_ people to reply by email
- an admin-only category for notifications from an external system
- the category has an email address set up
- `email_in` is enabled
- emails are sent to the email address of the category
- emails are bouncing with `BadDestinationAddress`

## The cause

After an hour of debugging, I came across the following [FIX: Disallow replies to categories when reply by email disabled (#33… · discourse/discourse@e05ef50 · GitHub](https://github.com/discourse/discourse/commit/e05ef50c709afb9b4777223e22881b695868d4c2)

> FIX: Disallow replies to categories when reply by email disabled ([#33641](https://github.com/discourse/discourse/pull/33641))
> 
> When the reply\_by\_email\_enabled setting is set to false, we no longer include a reply link in e-mail notifications. However, we do not prevent actual e-mails to a configured email\_in address associated with a category. This change into consideration the setting in Email::Receiver#check\_address.

and the [affected code](https://github.com/discourse/discourse/commit/e05ef50c709afb9b4777223e22881b695868d4c2#diff-fc9b77ad520bae78c4c71a3107a685a58427c10ff1da85c1cb993f164bd09624R872-R874) will no longer return a category if `reply_by_email_enabled` is not enabled.

```plaintext
    def self.check_address(address, include_verp = false)
      # only check for a group/category when 'email_in' is enabled
      if SiteSetting.email_in
        group = Group.find_by_email(address)
        return group if group

        category = Category.find_by_email(address)
        return category if category && SiteSetting.reply_by_email_enabled? <-- added
      end

```

### Why? 😱

I have so many questions:

1. why this change? At all? It only makes the system more inflexible. If I don’t want people to email to a category, then I would simply remove the email address from the category?
2. why is this implemented this way?

- apparently email in to groups is not a problem?
- if `reply_by_email_enabled` is false then there is no need to even look up the category?
- by not returning the category the error becomes `BadDestinationAddress` which is VERY wrong and REALLY hard to debug

1. the setting this now suddenly depends on, is called **reply** by email. That is not what I am doing.
2. the same confusion is visible in the title of the PR, which is called “disallow replies to categories”, which is not what this is about (in Discourse a “reply to a category” is not even possible).

Besides the way this was implemented, I honestly fail to see the point.

I cannot think of ANY situation where simply removing the email address from the category would not do the job if one wants to prevent people from emailing to a category. And the implication of this is that it has now become impossible to have a category receiving emails without enabling site-wide reply by email.

If there is a really good reason that I am missing, feel free to recategorize as #Contribute > Feature

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 20, 2026, 6:38pm UTC](https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855/2 "2026-01-20T18:38:30Z")

</div>

I actually found out about this myself and am already looking into it.

I agree the fix done in [FIX: Disallow replies to categories when reply by email disabled (#33… · discourse/discourse@e05ef50 · GitHub](https://github.com/discourse/discourse/commit/e05ef50c709afb9b4777223e22881b695868d4c2) was bad as it relied on and introduced a side effect, but we didn’t notice as the tests are arranged such that the conditions for triggering it weren’t present. I’m working on correcting that now.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 20, 2026, 9:29pm UTC](https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855/3 "2026-01-20T21:29:45Z")

</div>

My proposed fix:

[https://github.com/discourse/discourse/pull/37227](https://github.com/discourse/discourse/pull/37227)

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 4, 2026, 3:02pm UTC](https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855/4 "2026-02-04T15:02:28Z")

</div>

This has been merged @RGJ - can you verify after updating that your configuration works as expected?

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [February 10, 2026, 3:30pm UTC](https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855/5 "2026-02-10T15:30:01Z")

</div>

Yes, works like a charm now! Thank you 🙂

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 12, 2026, 3:39am UTC](https://meta.discourse.org/t/category-email-in-requires-reply-by-email-enabled/393855/6 "2026-02-12T03:39:23Z")

</div>


