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

**URL:** https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897
**Category:** Support
**Created:** [10 juni 2019 om 09:21 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897 "2019-06-10T09:21:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![degrees380](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@degrees380](https://meta.discourse.org/u/degrees380)
#### Post date: [10 juni 2019 om 09:21 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/1 "2019-06-10T09:21:46Z")

</div>

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:

```plaintext
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](https://meta.discourse.org/t/notification-email-cannot-be-the-same-as-reply-by-email/28840)

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.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [10 juni 2019 om 10:03 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/2 "2019-06-10T10:03:30Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![degrees380](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@degrees380](https://meta.discourse.org/u/degrees380)
#### Post date: [10 juni 2019 om 13:27 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/3 "2019-06-10T13:27:45Z")

</div>

Hello Jay,

thank you for your quick reply,

Jay Pfaffman via Discourse Meta [meta@discoursemail.com](mailto: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:

```plaintext
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

```plaintext
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**

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

```

since  
[Notification email cannot be the same as reply by email](https://meta.discourse.org/t/notification-email-cannot-be-the-same-as-reply-by-email/28840);  
in fact I get a validation error if I try:

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

```

(why the double %%?)

If I use

```plaintext
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`

```plaintext
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:

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

```

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

Thanks for your support.  
degrees380

---

<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: [10 juni 2019 om 14:40 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/5 "2019-06-10T14:40:33Z")

</div>

> [@degrees380](#):
>
> (why the double %%?)

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

```plaintext
    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?

> [@degrees380](#):
>
> the same way `meta.discourse.org` instance is able to generate?

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.

> [@degrees380](#):
>
> `Sender address rejected: not owned by user forum@HIDDEN`

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.

---

<div class="post-metadata">

### Author: ![degrees380](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@degrees380](https://meta.discourse.org/u/degrees380)
#### Post date: [13 juni 2019 om 15:11 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/6 "2019-06-13T15:11:33Z")

</div>

Hello Michael,

Thank you for investigating into this!

Michael Brown via Discourse Meta [meta@discoursemail.com](mailto:meta@discoursemail.com) writes:

[…]

> Where are you seeing this error?

[https://forum.softwareworkers.it/admin/site\_settings/category/email](https://forum.softwareworkers.it/admin/site_settings/category/email)

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

```plaintext
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:

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

```

if it was not for that _possible_ outdated check?

> > [@degrees380](#):
> >
> > `Sender address rejected: not owned by user forum@HIDDEN`
> 
> 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](http://meta.discourse.org) do:

```plaintext
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’.

---

<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: [13 juni 2019 om 15:41 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/7 "2019-06-13T15:41:02Z")

</div>

> [@degrees380](#):
>
> Value must contain ‘%%{reply\_key}’ and be different from the notification email.

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

> [@degrees380](#):
>
> I would simply like to be able to the same `notification_email` and  
> `reply_by_email_address`

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 🙂

---

<div class="post-metadata">

### Author: ![degrees380](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@degrees380](https://meta.discourse.org/u/degrees380)
#### Post date: [13 juni 2019 om 19:56 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/8 "2019-06-13T19:56:07Z")

</div>

> [@supermathie](#):
>
> 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 🙂

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

Thank you Michael!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [13 juli 2019 om 19:56 UTC](https://meta.discourse.org/t/issue-configuring-reply-by-email-553-5-7-1-sender-address-rejected-not-owned-by-user/119897/9 "2019-07-13T19:56:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
