Issue configuring reply by email: 553 5.7.1 Sender address rejected: not owned by user

Hello!
I’m prettu new to discourse admin so please forgive me if I’m asking something already answered (I already searched for similar issues but did not foud a solution).

I configured our instance to deliver notification messages via authenticated SMTP: I tested it several times and it works; the notification email address is forum@HIDDEN.TLD

As soon as I configure the “reply by email” address to our chosen reply address - forumreply+%{reply_key}@HIDDEN - and set replay by email enabled, all our email notifications and test messages stops to be accepted by our SMTP server whith this error message:

553 5.7.1 <forumreply+verp-8e9a1faf39a04faac9b5de75c5ea1f89@softwareworkers.it>: Sender address rejected: not owned by user forum@HIDDEN

I understand I cannot use forum+%{reply_key}@HIDDEN since Notification email cannot be the same as reply by email

I’m not able to have a look at the source of the failing message, so I cannot check how email headers are configured.

Please: can someone confirm that the “reply by email” settings I did are fine? How can I have a look to the headers of the rejected emails, are they saved in some log file (I cannot find it)?

If the “reply by email” config is fine then I should check out why our SMTP server is rejecting legit outgonig email.

Thanks for any suggestion!
Best regards.

Your mail server doesn’t like the address. You need to figure out how to allow the user that is sending mail be allowed to use that address. It may be that it doesn’t like the + addressing? But I suspect it’s that it’s denying forumreply.

Hello Jay,

thank you for your quick reply,

Jay Pfaffman via Discourse Meta meta@discoursemail.com writes:

Your mail server doesn’t like the address. You need to figure out how
to allow the user that is sending mail be allowed to use that
address. It may be that it doesn’t like the + addressing? But I
suspect it’s that it’s denying forumreply.

Thanks to your reply I can now have a look to the relevant email headers
meta.discourse.org used in notification email sent to me:

Return-Path: <meta+verp-7f805e7e715078262ca96f39e643111c@discoursemail.com>
Message-ID: <topic/119897/590490@meta.discourse.org>
In-Reply-To: <topic/119897@meta.discourse.org>
References: <topic/119897@meta.discourse.org>
 5.7.1 Sender address rejected: not owned by user

So it’s clear that the meta.discourse.org instance is using the same
email address both for the notification email and the reply by email address template: am I misreading the headers?

In other words it seems to me that meta.discourse.org is using

reply by email address: meta+%{reply_key}@discoursemail.com

This means that the Return-Path is the same of From: this is why any
authendicated SMTP server will never complain about this.

In our instance, instead, we cannot use

reply by email address: forum+%{reply_key}@HIDDEN

since
Notification email cannot be the same as reply by email;
in fact I get a validation error if I try:

reply_by_email_address: Value must contain '%%{reply_key}' and be different from the notification email.

(why the double %%?)

If I use

forum+%%{reply_key}@HIDDEN

(note double %%) our Discourse instance is able to send the email via
our SMTP server, but the headers are different from the ones I
observe from meta.discourse.org

Return-Path: <forum+%verp-9b32231ead642e0cb2cb33563aaf413b@HIDDEN>

Please ho can I set our instance to have the same behaviour as
meta.discourse.org regarding reply by email delivery?

To be clear, I need to understand how to configure things in order to
have this set of email headers:

Return-Path: <forum+verp-7f805e7e715078262ca96f39e643111c@HIDDEN>

the same way meta.discourse.org instance is able to generate?

Thanks for your support.
degrees380

You shouldn’t see that - it’s in the translation files because %{…} is a replacement key. The double %% overrides that, e.g.:

    errors:
      invalid_integer_min_max: "Value must be between %{min} and %{max}."
…
  site_settings:
    reply_by_email_address: "Template for reply by email incoming email address, for example: %%
{reply_key}@reply.example.com or replies+%%{reply_key}@example.com"

Where are you seeing this error? Also, what version are you on?

On our hosted sites we override these values as they’re specific to our hosting. It’s possible this check is outdated, we’re looking into it.

This is your SMTP server saying “your authenticated user doesn’t own this address, you can’t use it.” You’ll want to check with the administrators of your SMTP server to determine what can be changed there to permit this.

2 Likes

Hello Michael,

Thank you for investigating into this!

Michael Brown via Discourse Meta meta@discoursemail.com writes:

[…]

Where are you seeing this error?

https://forum.softwareworkers.it/admin/site_settings/category/email

If I set reply by email address I get the following error message:

reply_by_email_address: Value must contain '%%{reply_key}' and be different from the
notification email.

Also, what version are you on?

v2.3.0.beta11 +75

[quote=“degrees380, post:3, topic:119897”]
the same way meta.discourse.org instance is able to generate?
[ 2 more citation lines. Click/Enter to show. ]
[/quote]

On our hosted sites we override these values as they’re specific to
our hosting. It’s possible this check is outdated, we’re looking
into it.

What check are you talking about plz.? The one that give the above
mentioned error if we set a reply by email address template using the
same email message we set in notification email?

Are you saying that Discourse would let us use both:

notification_email=forum@HIDDEN
reply_by_email_address=forum+%{reply_key}@HIDDEN

if it was not for that possible outdated check?

This is your SMTP server saying “your authenticated user doesn’t own
this address, you can’t use it.”

I would simply like to be able to the same notification_email and
reply_by_email_address as meta.discourse.org do:

Return-Path: <meta+verp-7f805e7e715078262ca96f39e643111c@discoursemail.com>
Message-ID: <topic/119897/590490@meta.discourse.org>
In-Reply-To: <topic/119897@meta.discourse.org>
References: <topic/119897@meta.discourse.org>

[…]

Thanks! Gio’.

That should be showing up with a single %, we’ll have to fix that.

I’ve discovered that if you set reply_by_email_address first you can then change notification_email to the value you want without error. This is possibly unintended :slight_smile:

2 Likes

That workaround worked, now we are able to reply by email!

Thank you Michael!

1 Like