1 (edited by PaVuk 2013-12-03 08:48:04)

Topic: Deactivate Domainalias

============ Required information ====
- iRedMail version: iRedAdmin-Pro-MySQL 1.7.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:
====

I create a list of all active domains and domainaliase via cron with my sqlscript.

SELECT domain from domain WHERE active=1;
SELECT alias_domain from alias_domain WHERE active=1;

Now I´ve registered that domainaliases of deactivated domains are not marked as beeing deactivated.

i.e.:
domain: DomainA
active: 0
but
alias_domain: AliasofDomainA
target_domain: DomainA
active: 1

Is it a bug or a feature or is my config broken?

----

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

2

Re: Deactivate Domainalias

Excuse me, what do you mean "not marked as deactivated"?

As you can find in below files, iRedMail checks alias domain status:

- /etc/postfix/mysql/domain_alias_catchall_maps.cf
- /etc/postfix/mysql/domain_alias_maps.cf
- /etc/postfix/mysql/virtual_mailbox_domains.cf

3

Re: Deactivate Domainalias

ZhangHuangbin wrote:

Excuse me, what do you mean "not marked as deactivated"?

As you can find in below files, iRedMail checks alias domain status:

- /etc/postfix/mysql/domain_alias_catchall_maps.cf
- /etc/postfix/mysql/domain_alias_maps.cf
- /etc/postfix/mysql/virtual_mailbox_domains.cf

Thanks for your quick reply.

My two SQL-Queries are wrong, if I want a list of active domains and aliasdomains, right?
So i worked on a correct SQL-Query based on virtual_mailbox_domains.cf

SELECT domain
FROM domain
WHERE backupmx =0
AND active =1
UNION SELECT alias_domain.alias_domain
FROM alias_domain, domain
WHERE alias_domain.active =1
AND alias_domain.target_domain = domain.domain
AND domain.active =1
AND domain.backupmx =0;

Do you think this is ok?
I need this list for a static local_domains_maps.
http://www.iredmail.org/forum/topic3800 … sdnew.html

4

Re: Deactivate Domainalias

How about use @local_domains_maps = ['.']; as mentioned in the post?

5 (edited by PaVuk 2013-12-03 17:06:36)

Re: Deactivate Domainalias

ZhangHuangbin wrote:

How about use @local_domains_maps = ['.']; as mentioned in the post?

Ok, that would be quite pragmatic, but that would define every domain (in the world) as local and the meaning of local would get lost.
I don´t want microsoft.com to be treated as local. smile

What about my SQL-query?