1

Topic: Domain alias not working with external mails

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version: 1.4.0 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer: downloadable installer
- Linux/BSD distribution name and version: Debian GNU/Linux 10 (buster) - 10.10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
====

Hi all,

After successfully setting up an iRedMail server for my main domain, I tried to add my secondary domain as an alias by following the steps on here: https://docs.iredmail.org/sql.add.alias.domain.html

This didn't do the trick just yet, so I additionally added the secondary domain into the /etc/postfix/main.cf:

virtual_alias_domains = domain2.tld
virtual_alias_maps = hash:/etc/postfix/virtual

Note: I didn't remove any of the existing mysql entries under virtual_alias_maps.

And entered the mapping into /etc/postfix/virtual and executed "postmap /etc/postfix/virtual" afterwards:

@domain2.tld     @domain1.tld

This is working internally on the server. user1@domain1.tld can send to user2@domain2.tld and user2 will receive the mail in his mailbox. External emails also still arrive when sent to user@domain1.tld.

Unfortunately it doesn't function with external mails to the secondary domain.
In my /var/logs/mail.log I find the following lines:

postfix/smtpd[5541]: NOQUEUE: reject: RCPT from mail-oi1-x231.google.com[2607:f8b0:4864:20::231]: 451 4.3.5 <user1@domain2.tld>: Recipient address rejected: Server configuration problem; from=<username@gmail.com> to=<user1@domain2.tld> proto=ESMTP helo=<mail-oi1-x231.google.com>

And:

postfix/smtpd[5644]: warning: problem talking to server 127.0.0.1:12340: Connection timed out

On port 12340 dovecot is listening:

dovecot    513      root   67u  IPv4  17087      0t0  TCP 127.0.0.1:12340 (LISTEN)

In my dovecot log I find the following line repeatedly:

dovecot: quota-status: Error: quota-status: Client sent invalid recipient address: Invalid character in path

And that's where I'm stuck. I suspect one of two things: Either I simply missed a necessary configuration, which seems highly likely, since I've never set up a mail server on Debian before, or the dovecot error is caused by my secondary domain. The secondary domain contains an umlaut (ä/ö/ü), which I'm well aware can cause some issues. Therefore I also own the domain in it's punycode formatted variant. So, whenever I added my secondary domain with it's umlaut to a configuration, I also added the punnycode version of it, assuming it would solve any issues in that regard. Is it possible that dovecot can't handle any umlauts/punnycode formats? Or did I simply miss to configure something obvious?

Any push into the right direction is highly appreciated.

Regards,
Snot

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Domain alias not working with external mails

SnotMcBooger wrote:

The secondary domain contains an umlaut (ä/ö/ü)

- Non-ascii char is not supported.
- The document is enough, you're making a chaos: https://docs.iredmail.org/sql.add.alias.domain.html

3 (edited by SnotMcBooger 2021-08-14 00:05:26)

Re: Domain alias not working with external mails

Thank you for the quick reply.

ZhangHuangbin wrote:

- Non-ascii char is not supported.

What about punycode, since it doesn't contain non-ascii chars?

ZhangHuangbin wrote:

- The document is enough, you're making a chaos: https://docs.iredmail.org/sql.add.alias.domain.html

Interesting. Simply inserting the alias into the alias_domain table only threw a "Relay access denied" error for me when trying to send an e-mail to the secondary domain. After the additional changes it started to work internally between domain1 and domain2 at least, so I assumed there might just be additional configuration missing.

/Edit

After coming across an anciet reply of yours here (https://forum.iredmail.org/topic2900-in … omain.html) it lead me to try to send a test mail from some different mail hosters. 2 out of 4 mails arrived when sent to the domain with the umlaut. GMail and Hotmail didn't, my company exchange and some other web provider came through. So, thanks a lot for that comment already.

iRedMail seems to be working fine with punnycode/umlauts per se, it just seems to depend on the sender. Do you have any guess as to why or what logs I could check to dig deeper into this?

4 (edited by starkjohan 2022-03-10 13:09:33)

Re: Domain alias not working with external mails

Did you ever make any progress on this? I saw your info on serverfault.com but that didn't look very promising either.

5

Re: Domain alias not working with external mails

starkjohan wrote:

Did you ever make any progress on this? I saw your info on serverfault.com but that didn't look very promising either.

Sadly, no. Just came back to it and still can't get it to work.