1 (edited by wdbacker 2011-12-07 21:52:37)

Topic: Mail alias not propagated to alias domains

==== Provide basic information to help troubleshoot and get quick answer ====
- iRedMail version: 0.7.3
- Linux/BSD distribution name and version: CentOS 6 i386
====

Hi,

When you add mail aliases to a domain, they are only working for the alias domains if you create the alias domain after creating all mail aliases.

E.g. suppose you have defined in iRedAdmin Pro a domain "mydomain.com".
You define  an alias domain "mydomainalias.com" for "mydomain.com".
You then define a mail alias "myalias@mydomain.com".

The problem is now that if you try to send mail to myalias@mydomainalias.com postfix gives a 5.1.1 error that the user is not known in the virtual mailbox table.

However, if you define the alias domain last, myalias@mydomainalias.com works fine:

E.g. suppose you have defined in iRedAdmin Pro a domain "mydomain.com".
You define a mail alias "myalias@mydomain.com".
You then define an alias domain "mydomainalias.com" for "mydomain.com".

In this case, the virtual mailbox table works fine and mail to myalias@mydomain.com arrives correctly.

So I think there could be something missing in the iRedAmin Pro backend code which creates mail aliases (it only creates mail aliases for the domain itself and not for the domain aliases).

----

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

2

Re: Mail alias not propagated to alias domains

Thanks for your feedback.
It could be a bug in iRedAdmin-Pro-LDAP, will try reproducing this issue and fix it soon.

3

Re: Mail alias not propagated to alias domains

Hi Zhang,

Btw, I have the same issue when defining a catch-all e-mail address for a domain with alias domains. The catch-all occurs only on the domain itself, not on the aliases of the domain (you get the same error on the alias domains that the users doesn't exist in the virtual mailbox table).

4

Re: Mail alias not propagated to alias domains

Got it, will try reproducing it and fixing it.
Thanks again. smile

5

Re: Mail alias not propagated to alias domains

Fixed and patchs attached.

Steps to apply patches:

- Save attachments and upload to your server which has iRedAdmin-Pro-LDAP-1.6.2 running. Assume they're /root/ldap_alias.patch and /root/ldap_catchall.patch.

- Change current working directory to the root directory of iRedAdmin-Pro-LDAP-1.6.2 in shell command line. For example, on CentOS 6:

# cd /var/www/iredadmin/

- Verify patches first with command 'patch --dry-run'.

$ patch --dry-run -p3 < ~/ldap_alias.patch
patching file libs/ldaplib/alias.py
patching file libs/ldaplib/iredldif.py

$ patch --dry-run -p3 < ~/ldap_catchall.patch
patching file libs/ldaplib/domain.py
Hunk #1 succeeded at 569 (offset -3 lines).
Hunk #2 succeeded at 631 (offset -3 lines).
patching file libs/ldaplib/iredldif.py
Hunk #1 succeeded at 173 (offset -4 lines).
Hunk #2 succeeded at 193 (offset -4 lines).

- Backup files which will be patched. For example, copy them to directory '/root'.

# cp libs/ldaplib/{alias,iredldif,domain}.py /root/

- Apply these two patches immediately (without '--dry-run'). Please apply 'ldap_alias.patch' first.

$ patch -p3 < ~/ldap_alias.patch
$ patch -p3 < ~/ldap_catchall.patch

Restarting Apache is required after patches applied. If it doesn't work as expected, please copy backup file to override patched file.

Please let me know whether or not it works for you.

Post's attachments

ldap_alias.patch 1.62 kb, 3 downloads since 2011-12-08 

ldap_catchall.patch 3.48 kb, 3 downloads since 2011-12-08 

You don't have the permssions to download the attachments of this post.

6

Re: Mail alias not propagated to alias domains

Yes, I can confirm you both problems are solved with these patches.

Thank you very much for the excellent support!

7

Re: Mail alias not propagated to alias domains

Glad to hear that. Thanks for your feedback. smile