1 (edited by ppinto 2014-09-11 23:38:43)

Topic: Alias management

==== Required information ====
- iRedMail version: iRedAdmin-Pro-MySQL-1.8.2
- Store mail accounts in which backend (MySQL):
- Linux/BSD distribution name and version: CentOS 6.5
====

We need to have a more complex alias management, example:
example.pt is a domain alias for example.com
example.com.br is a domain alias for example.com

Then we need per user alias, example:
info@example.pt to user1@example.com,user2@example.com
info@example.com.br to user2@example.com,user3@example.com

We already have this is the database and on postfix by just changing the query in /etc/postfix/mysql/virtual_alias_maps.cf

We now need to be able to manage this entries through the web interface, can this be done? How?

----

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

2

Re: Alias management

with default settings in iRedMail and iRedAdmin-Pro, you cannot manage alias for alias domains.

I'm wondering whether you can change a little bit, for example, alias 'info@....com' to 'user1@, user2@', then add another alias 'info-xxx@example.com' for 'user2@, user3@'.  just use a different alias account name with primary domain, don't use alias domain.

3

Re: Alias management

unfortunately no.
user* needs to have access to send and receive email from user*@example.[es,com,pt,com.br,co.mx,co.uk,...]

but the role accounts (info,help,support,...) are forwarding to different users depending on the TLD domain.

How can we add the domain aliases to the create user aliases interface, so that the operators can manage this from the web interface?

we already have this configuration working, we just need to be able to manage it from the web interface, without direct mysql queries to the database.

4

Re: Alias management

ppinto wrote:

We already have this is the database and on postfix by just changing the query in /etc/postfix/mysql/virtual_alias_maps.cf

Would you mind sharing your modification? i can see whether we can manage it with iRedAdmin-Pro.

5

Re: Alias management

ZhangHuangbin wrote:
ppinto wrote:

We already have this is the database and on postfix by just changing the query in /etc/postfix/mysql/virtual_alias_maps.cf

Would you mind sharing your modification? i can see whether we can manage it with iRedAdmin-Pro.

sure, here it is:

#query       = SELECT alias.goto FROM alias,domain WHERE alias.address='%s' AND alias.domain='%d' AND alias.domain=domain.domain AND alias.active=1 AND domain.backupmx=0 AND domain.active=1
query       = SELECT alias.goto FROM alias,domain WHERE alias.address='%s' AND alias.domain='%d' AND (alias.domain=domain.domain or domain.domain=(select target_domain from alias_domain where alias_domain='%d')) AND alias.active=1 AND domain.backupmx=0 AND domain.active=1

6

Re: Alias management

Looks fine. Did you analyze this new SQL query? Does it use proper index?

7

Re: Alias management

ZhangHuangbin wrote:

Looks fine. Did you analyze this new SQL query? Does it use proper index?

not yet, I ain't putting it into production yet

8

Re: Alias management

Is it possible to add this functionality to the interface? we're pretty much waiting for this to start using iredadmin

9

Re: Alias management

Still no plan yet.

We need to analyze the SQL query performance to make sure it uses proper INDEX. Or maybe change SQL structure of table "vmail.domain" to combine "domain" and "alias_domain" tables.

Or, if you have just few alias accounts like this, you can try to manage them manual. Are they frequently changed?