1

Topic: Managing member aliases broken

==== Required information ====
- iRedMail version: 0.8.6 (pro panel version 1.4.1)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Linux/BSD distribution name and version: RHEL6/64
- Related log if you're reporting an issue:
====

I think I might have mentioned this before. And I don't see anything in the changelog making me think it's been fixed in 1.4.2 . So, perhaps this is a local config issue?

If I go into a user's General settings, in the "member of Mail Aliases" box, it shows all the possible aliases, all unchecked... *regardless* of whether or not the email is actually a member of that alias.

So, at the moment, to manage alias membership, I have to instead go into each individual alias and change the membership there.

If this is a known bug, please fix. If it's fixed in 1.4.2, let me know.

If there are other things I should be checking as to why this isn't working, I'll check 'em if you tell me what to check.

Thanks.

----

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

2

Re: Managing member aliases broken

I checked iRedAdmin-Pro-PGSQL-1.4.2 moment ago, it correctly displays alias membership in user profile page.

Sorry about this undocumented change.

3

Re: Managing member aliases broken

Is there a quick patch I can apply to 1.4.1 to fix this?

Thanks.

4

Re: Managing member aliases broken

Sorry, we don't have a separate patch for this.
It's easy to upgrade iRedMail and iRedAdmin-Pro, we recommended you to upgrade them by following out tutorials:
http://www.iredmail.org/doc.html#upgrade_tutorial

5

Re: Managing member aliases broken

Just updated to 1.5.2 . And still broken.

I'm wondering if this is not working because users are in the "goto" column of the "alias" table with an alias domain name. And if iRedAdmin Pro, when doing the lookup, does not lookup the user for his or her alias domain as well.

If not, I would respectfully request that the lookups be updated to include the alias for an email domain.

Thanks.

6

Re: Managing member aliases broken

It doesn't check domain alias name while updating mailing list members. But why not use the primary domain name?

7

Re: Managing member aliases broken

ZhangHuangbin wrote:

It doesn't check domain alias name while updating mailing list members. But why not use the primary domain name?

Unfortunately, due to the way we migrated over from another email provider, the primary domain is not the domain we actually want to use. The domain we actually want to use is currently set up as an alias to the primary domain. If we could "rename" the primary domain to what we wanted, that would solve the problem.

But, I could easily where one might add with an alias domain, anyway. So, it would still be useful.

8

Re: Managing member aliases broken

Renaming Domains is a Future Feature, for now you should be able to do it without issue by changing the domains table entry through PgSQL Tools.

9

Re: Managing member aliases broken

Looks like my reply was not submitted or lost, i have to type again.
---------

Below are steps to rename a mail domain, i suggest you try it on a testing machine first.

Let's say you're using mail domain 'domain.com' as primary domain, but you wish to use 'primary.com' as primary domain.

*) Remove all alias domain assigned to 'domain.com' with iRedAdmin-Pro. of course you should remember them, so that you can add them back later.

*) Export all SQL records related to this domain in database 'vmail'. especially sql tables: domain, mailbox, alias, domain_admins. If you have some bcc settings, export from 4 bcc tables too. Note: export them to plain SQL files.

It's easy to recognize accounts under certain domain, because most tables have column `domain`, you can query them with sql command like this:

sql> SELECT ... FROM [table] WHERE domain='domain.com';

*) Update exported plain SQL files, replace 'domain.com' by 'primary.com'. For example, with perl command:

# perl -pi -e 's#domain.com#primary.com#g' /path/to/plain.sql

You must review updated files, to make sure it's what you want after update.

Note: maildir path will be changed too, so you must move mailboxes to another directory. Mailboxes are stored under /var/vmail/vmail1/domain.com by default, after modified, it will be /var/vmail/vmail1/primary.com. You must create this folder with correct owner and permission (it's better to stop Dovecot service before moving mailboxes, and start it after you imported modified sql files):

# cd /var/vmail/vmail1
# mkdir primary.com
# chown vmail:vmail primary.com
# chmod 0700 primary.com
# mv domain.com/* primary.com/

*) Import updated sql files after reviewed carefully.
*) Delete old records related to 'domain.com in 'vmail' database.
*) Assign alias domain names to 'primary.com' if necessary.

That's it.

Ideally, iRedAdmin-Pro can do most steps for you, except moving mailboxes.

10

Re: Managing member aliases broken

Thanks. I presume, though, that I also have to manually edit config files for dovecot, postfix, amavisd, policyd domain tables (we haven't switched that over, yet), roundcube, and perhaps other things?

ZhangHuangbin wrote:

Looks like my reply was not submitted or lost, i have to type again.
---------

Below are steps to rename a mail domain, i suggest you try it on a testing machine first.

Let's say you're using mail domain 'domain.com' as primary domain, but you wish to use 'primary.com' as primary domain.

*) Remove all alias domain assigned to 'domain.com' with iRedAdmin-Pro. of course you should remember them, so that you can add them back later.

*) Export all SQL records related to this domain in database 'vmail'. especially sql tables: domain, mailbox, alias, domain_admins. If you have some bcc settings, export from 4 bcc tables too. Note: export them to plain SQL files.

It's easy to recognize accounts under certain domain, because most tables have column `domain`, you can query them with sql command like this:

sql> SELECT ... FROM [table] WHERE domain='domain.com';

*) Update exported plain SQL files, replace 'domain.com' by 'primary.com'. For example, with perl command:

# perl -pi -e 's#domain.com#primary.com#g' /path/to/plain.sql

You must review updated files, to make sure it's what you want after update.

Note: maildir path will be changed too, so you must move mailboxes to another directory. Mailboxes are stored under /var/vmail/vmail1/domain.com by default, after modified, it will be /var/vmail/vmail1/primary.com. You must create this folder with correct owner and permission (it's better to stop Dovecot service before moving mailboxes, and start it after you imported modified sql files):

# cd /var/vmail/vmail1
# mkdir primary.com
# chown vmail:vmail primary.com
# chmod 0700 primary.com
# mv domain.com/* primary.com/

*) Import updated sql files after reviewed carefully.
*) Delete old records related to 'domain.com in 'vmail' database.
*) Assign alias domain names to 'primary.com' if necessary.

That's it.

Ideally, iRedAdmin-Pro can do most steps for you, except moving mailboxes.

11

Re: Managing member aliases broken

dwbotsch wrote:

I presume, though, that I also have to manually edit config files for dovecot, postfix, amavisd, policyd domain tables (we haven't switched that over, yet), roundcube, and perhaps other things?

No.

Postfix/Amavisd/Dovecot/... query SQL database to get account info, they just need correct SQL server address/port/username/password/database_name, and they're not changed while you renaming domain name. so, no need to change their config files.