Topic: Sending email as alias with forwarding address containing delimiter
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.0 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu 20.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx (with Apache Reverse Proxy)
- Manage mail accounts with iRedAdmin-Pro? No (free edition only)
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello everybody,
first of all, I really like using iredmail and thank you for this easy to use and good email server management software.
I also assume that the following "problem" is probably a very rare case.
Preliminary information:
I am using the recipient delimiter feature to automatically sort emails so that emails to user1-test@example.com are delivered to user1 in the test folder.
Now to my case:
If an alias address is defined for user1, for example something@example.com and I want to use an address with delimiter of user1 (user1-something@example.com) as forwarding address, the delivery of e-mails works as desired, i.e. e-mails to something@example.com are delivered to user1 in the something folder, but sending with the alias address something@example.com is not possible for user1. (Set up as described under docs[.]iredmail[.]org/user.alias.address.html)
After a short research in the source code of iRedAPD (thanks to be open source) I suspect that it is due to the query of the MySQL database (github[.]com/iredmail/iRedAPD/blob/master/plugins/reject_sender_login_mismatch.py#L284), because there, if I understood the source code correctly, it is only checked with the "real_sasl_username". But this only covers the case when you use user1@example.com as forwarding address, without any delimiter.
To fix this, an additional query per different delimiter would be needed.
My question would therefore be whether if this is a "bug" on the part of the software, as this case may simply not have been considered or is this a desired behavior and it is not intended at all to use an address with delimiter as forwarding address of an alias address?
Have any of you encountered a similar problem and been able to fix it otherwise?
(In my opinion, in such a case, a filter rule could also be used to sort the e-mails from something@example.com, which checks the recipient address and uses it to sort the e-mails. I just wanted to avoid additional manual filter rule).
If further information is needed, I will be happy to provide it.
In any case, many thanks in advance
Best regards
Xameon
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.