Notification email cannot be the same as reply by email

AI 生成的摘要

A user, stroupaloop, is experiencing an issue where they cannot change the reply by email address to a custom domain (team+%{reply_key}@custom.gov) due to an error. Investigation by techAPJ revealed that the issue is not a bug, but a feature that prevents the reply by email address from being the same as the notification_email setting. The feature was added to prevent a potential cascading reply loop.

The recommended solution is to use a different email address for the reply by email setting, such as reply+%{reply_key}@custom.gov. Additionally, it was discovered that the error message for this scenario was previously more informative but was lost due to a regression. The error message has since been restored via a pull request.

I’ve setup the reply by email address settings as listed in the thread below, EXCEPT I’m unable to change the reply by email address

NOTE: I’ve setup everything else according to the post, to include the correct polling port (995), polling host (pop.gmail.com) and the accurate username/password combo (plus SSL enabled).

The field contains the following

replies+%{reply_key}@example.com

When I try to change it to

team+%{reply_key}@custom.com

I receive the following error

I’m currently receiving a polling error via AWS SES (our transactional email service) every 5m (POP3 polling frequency) and I’m guessing it’s because the reply by email address is incorrect, BUT I can’t change it. Help?

Verified bug …

I can add @gmail.com BUT not a @custom.gov

Any idea on the time horizon to fix? Thanks!

1 个赞

Is the email you are trying to change it to the same as the SiteSetting.notification_email?

For example:
SiteSetting.notification_email = foo@bar.com and you are trying to set it to “foo+%{reply_key}@bar.com”

1 个赞

Hey @jaming that isn’t the issue. The issue is that the ranges of accepted domains in that field box doesn’t include .gov :frowning:

However, I assume, as long as the transactional email service (e.g. SES, Mandrill) can accept incoming email, it doesn’t matter if the notification_email email is the same as the reply by email address or not

1 个赞

Weird can you reproduce this @techapj?

Okay, I can repro this case, and it’s not specific to .gov domain.

@jaming is correct, this is because notification email setting is same as reply by email address.

Let’s say I set notification email to “team@discourse.org”, now I can’t set reply by email address to “team+%{reply_key}@discourse.org”, it will generate error as per this code:

So, if the notification email is set to “team@custom.gov”, then it’s not possible to set “team+%{reply_key}@custom.gov” as reply by email address.

Techincally it’s not a bug, it’s a feature which @zogstrip added via:

https://github.com/discourse/discourse/commit/f7d2fc05244d20c05e8c747c1e6ea66331d60d05

So I would recommend adding another email (perhaps reply+%{reply_key}@custom.gov) for reply by email address setting.

4 个赞

Can we improve the error message in this case? I agree this is an important safety feature otherwise @stroupaloop would have set up a cascading reply disaster, a sort of … loop :wink:

2 个赞

Uh, I’m pretty sure there used to be a useful error message there. I think that’s a regression.

edit: yes, definitely a regression

1 个赞

Yes, there was a regression due to this commit. Fixed via:

https://github.com/discourse/discourse/pull/3483

3 个赞