# Subdomain emails are redirected to main domain

**URL:** https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015
**Category:** Support
**Tags:** english
**Created:** [September 17, 2026, 7:52am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015 "2026-09-17T07:52:28Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Szymon](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Szymon](https://forum.yunohost.org/u/Szymon)
#### Post date: [September 17, 2026, 7:52am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015/1 "2026-09-17T07:52:28Z")

</div>

### I have searched the forum for similar issues

on

### This category is for general issues(=something is broken) regarding YunoHost, _NOT_ apps.

on

### This form is written in English but feel free to write in French if you’re more comfortable!

on

### What type of hardware are you using

Old laptop or computer

### What YunoHost version are you running

12.1.40.1

### How are you able to access your server

Direct access via physical keyboard/screen

### Are you in a special context or did you perform specific tweaking on your YunoHost instance ?

No

### Describe your issue

Hello Yunohost Team,

Thank you for providing this system!

I have public IP at home and would like to configure small development server for me and few colleagues.

Server is running YunoHost 12.1.40.1  
**Yunohost domains are configured as follows:**  
\*\* • laaasdsad\_pl\*\* (outgoing emails enabled) (as I understand so in this way it will be able to notify me from WpForms and it works is able to notify to OVH emailbox).  
**• dev.laaasdsad\_pl** (incomming / outgoing emails enabled) (it should host local emails RoundCube for dev group and also tools like gitea, file share).  
\*Real domain name change to laaasdsad\_pl for description only.

**I am able to send email from RoundCube to outside world but I am not able to receive them properly.**

Trying to send email from poczta.onet\_pl I got:

\<szymon.k@laaasdsad\_pl\> (expanded from \<szymon.k@dev.laaasdsad\_pl \>): host  
mx0.mail.ovh\_net[178.33.252.245] said: 550 5.1.1 \<szymon.k@laaasdsad\_pl\>:  
Recipient address rejected: User unknown (in reply to RCPT TO command)  
In local Yunohost mail logs:

```auto
2026-09-16T12:57:08.254148+02:00 laaasdsad postsrsd[8518]: srs_forward: <szymon.k@dev.laaasdsad_pl> not rewritten: Domain excluded by policy
2026-09-16T12:57:08.300778+02:00 laaasdsad postfix/cleanup[8517]: 3DA3B247072: message-id=<2bd5f8fba32ac37c5c496aa3f5309856@dev.laaasdsad_pl>
2026-09-16T12:57:08.353502+02:00 laaasdsad postfix/qmgr[1801]: 3DA3B247072: from=<szymon.k@dev.laaasdsad_pl>, size=642, nrcpt=1 (queue active)
2026-09-16T13:12:38.046193+02:00 laaasdsad postfix/smtp[1925]: D6F9A2470A6: to=<szymon.k@laaasdsad_pl>, orig_to=<szymon.k@dev.laaasdsad_pl>, relay=mx0.mail.ovh.net[178.33.252.245]:25, delay=8.6, delays=1.1/0.09/7.2/0.22, dsn=5.1.1, status=bounced (host mx0.mail.ovh.net[178.33.252.245] said: 550 5.1.1 <szymon.k@laaasdsad_pl>: Recipient address rejected: User unknown (in reply to RCPT TO command))
2026-09-16T13:33:49.963508+02:00 laaasdsad postsrsd[2299]: srs_forward: <szymon.k@dev.laaasdsad_pl> not rewritten: Domain excluded by policy
2026-09-16T13:33:50.010818+02:00 laaasdsad postfix/cleanup[2298]: EABFF241331: message-id=<e6a3b62ba2a5c2535e42487df44025b4@dev.laaasdsad_pl>
2026-09-16T13:33:50.063799+02:00 laaasdsad postfix/qmgr[1788]: EABFF241331: from=<szymon.k@dev.laaasdsad_pl>, size=614, nrcpt=1 (queue active)
2026-09-16T13:33:52.900620+02:00 laaasdsad postfix/smtp[2302]: B41D22470AE: to=<szymon.k@laaasdsad_pl>, orig_to=<szymon.k@dev.laaasdsad_pl>, relay=mx0.mail.ovh.net[178.33.252.245]:25, delay=1.2, delays=0/0/0.93/0.23, dsn=5.1.1, status=bounced (host mx0.mail.ovh.net[178.33.252.245] said: 550 5.1.1 <szymon.k@laaasdsad_pl>: Recipient address rejected: User unknown (in reply to RCPT TO command)) 

```

\*\* It looks like domain name is stripped \*\*  
from @dev.laaasdsad\_pl to @laaasdsad\_pl right ? \*\*

I tried to:

```auto
Success! Configuration updated for 'yunohost'
Success! Configuration updated for 'nginx'
Success! Configuration updated for 'dnsmasq'
dnsmasq:

```

then `reboot `

I checked:

```auto
szymki@laaasdsad:/etc/default$ sudo cat postsrsd
Default settings for postsrsd
Local domain name.
Addresses are rewritten to originate from this domain. The default value
is taken from postconf -h mydomain and probably okay.
SRS_DOMAIN=laaasdsad_pl
Exclude additional domains.
You may list domains which shall not be subjected to address rewriting.
If a domain name starts with a dot, it matches all subdomains, but not
the domain itself. Separate multiple domains by space or comma.
We have to put some "dummy" stuff at start and end... see this comment :

SRS_EXCLUDE_DOMAINS="dummy laaasdsad_pl dev.laaasdsad_pl dummy"

```

I also checked:

```auto
szymki@laaasdsad:~$ cat /etc/postfix/virtual-mailbox-domains
This file is regenerated automatically
Please DO NOT edit manually ... changes will be overwritten!
dev.laaasdsad_pl

```

OVH mail configuration looks like:

```auto
;relate with OVH mail box in main domain 
$TTL 3600
        IN NS dns100.ovh.net.
        IN NS ns100.ovh.net.
        IN MX 50 mx2.mail.ovh.net.
        IN MX 5 mx1.mail.ovh.net.
        IN MX 100 mx3.mail.ovh.net.
IN MX 1 mx0.mail.ovh.net.

;related with dev group mail boxes

dev IN MX 10 dev.laaasdsad_pl.
dev IN A 195.222.XXX.XX
dev 3600 IN TXT "v=spf1 a mx ip4:195.222.XXX.XX -all"

```

### Share relevant logs or error messages

Do you have any suggestions ?

---

<div class="post-metadata">

### Author: ![tmb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/t/7c8e57/32.png) [@tmb](https://forum.yunohost.org/u/tmb)
#### Post date: [September 18, 2026, 8:06am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015/2 "2026-09-18T08:06:38Z")

</div>

Did you try sending from outside of yunohost?  
Could be yet onother issue, I had not tested local sending to a subdomain of the main-domain:

> [@Issues to fix email breakages caused by upgrades (regression)](https://forum.yunohost.org/t/issues-to-fix-email-breakages-caused-by-upgrades-regression/42922):
>
> Hello yunohost devs. I attempt to triage and formulate the issues that are the root cause(s) for my problems with the email system that surfaced while upgrading from Yunohost 11 to 12. And for which I also found some other prior reports about. I currently suspect things may boil down to two issues and causes, but as email is not an easy topic for me I hope you can help to nail down proper fixes, to continue yunohost’s fabulous “just works” email setup. The problems I see: Email recept…

---

<div class="post-metadata">

### Author: ![Szymon](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Szymon](https://forum.yunohost.org/u/Szymon)
#### Post date: [September 18, 2026, 8:53am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015/3 "2026-09-18T08:53:36Z")

</div>

Hey,

Yes, I tried sending from google and poczta.onet.pl to yunohost subdomain. Main domain email is handled by OVH (IP reputation and not marked as spam).

Detailed rejection information I shared earlier was provided from Onet.pl.

Domains are organized as follows:

laaasdsad\_pl (main domain website hosted by Yunohost but 1 email by OVH)

dev.laaasdsad\_pl (developer apps and mailboxes hosted by Yunohost)

Kindly Regards

---

<div class="post-metadata">

### Author: ![tmb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/t/7c8e57/32.png) [@tmb](https://forum.yunohost.org/u/tmb)
#### Post date: [September 18, 2026, 9:07am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015/4 "2026-09-18T09:07:02Z")

</div>

Sorry, I overlooked your external origin, so there is a known issue involved…

The common experience seems to be that currently the yunohost main-domain must have mail\_in enabled for any secondary-domains to be able to receive email. (See other thread where I tried to summarize the current state of problems.)

---

<div class="post-metadata">

### Author: ![tmb](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/t/7c8e57/32.png) [@tmb](https://forum.yunohost.org/u/tmb)
#### Post date: [September 18, 2026, 10:02am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015/5 "2026-09-18T10:02:49Z")

</div>

I don’t know whether “[Subdomain emails are redirected to main domain](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015)” would be a problem of its own, if it works for you after you enable mail\_in for the main-domain.

The root problems could just be that currently

- all domains use the main-domain mailboxes, instead of, e.g. generic @localhost mailboxes
- mail\_in for subdomains does not work independently (without mail\_in ‘on’ for main-domain)

While (locally) rewriting unconfigured (i.e. non-mail\_in) sub-domains (not secondary-domains) to their parent-domain could be a feature (a default setting that avoids having to set up users for every configured app-subdomain).

---

<div class="post-metadata">

### Author: ![Szymon](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/s/34f0e0/32.png) [@Szymon](https://forum.yunohost.org/u/Szymon)
#### Post date: [September 18, 2026, 10:36am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015/6 "2026-09-18T10:36:36Z")

</div>

Hi, I enbaled email inbox in main Yunohost domain without configuring MX at OVH so Yunohost complains about bad configured DNS but looks like it works on both mailboxes OVH and Yunohost dev.laaasdsad\_pl  
Thank you for suggestion and support 🙂 👏

---

<div class="post-metadata">

### Author: ![system](https://forum.yunohost.org/uploads/default/original/2X/f/f59fe8e3ee6b100b4f574d30d6e30479c68b89f0.png) [@system](https://forum.yunohost.org/u/system)
#### Post date: [October 18, 2026, 10:37am UTC](https://forum.yunohost.org/t/subdomain-emails-are-redirected-to-main-domain/43015/7 "2026-10-18T10:37:26Z")

</div>

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