1

Topic: Email Aliases for all users

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

After the upgrade and also a crash on system (which was recovered by Zhang), I found that for every single email address, there is a new aliase!

For example, if i had zhang@domain.com, I still have this user and also a new zhang@domain.com aliase.

I don't know if it belongs to the new upgrade or caused by the crash!

These many aliases made a lot of issues on our iRedadmin.
Is it safe to remove all of them?

----

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

2

Re: Email Aliases for all users

*) Which iRedMail release are you running? did you upgrade it yourself?
*) About the recovery, please contact us directly, we need to check whether it's caused by recovery: http://www.iredmail.org/contact.html

3

Re: Email Aliases for all users

ZhangHuangbin wrote:

*) Which iRedMail release are you running? did you upgrade it yourself?
*) About the recovery, please contact us directly, we need to check whether it's caused by recovery: http://www.iredmail.org/contact.html

We are using the latest. We upgrade it oursleves.

I also find the iredmail is creating a new alias for every new user. So it is by iredmail and not caused by crash.
Why?
Why did you need to create the same alias for a user?


For us, the user profile takes over a minute to load because it has to load all aliases.

4

Re: Email Aliases for all users

Did you run the sql commands used to "Drop unused SQL columns and records in vmail.alias table"?
http://www.iredmail.org/docs/upgrade.ir … lias-table

5

Re: Email Aliases for all users

ZhangHuangbin wrote:

Did you run the sql commands used to "Drop unused SQL columns and records in vmail.alias table"?
http://www.iredmail.org/docs/upgrade.ir … lias-table


Thanks.

It has been fixed!
The issue was 0.9.6 to 0.9.7 upgrade


I applied all requirements.
The only error I am getting is whenever I want to update a Throttle for a domain.

Here is the log not sure if it is related to this subject or not:

[Wed Aug 02 23:41:09.890341 2017] [:error] [pid 3739] [remote 76.71.76.131:128] Traceback (most recent call last):
[Wed Aug 02 23:41:09.890747 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process
[Wed Aug 02 23:41:09.890753 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     return self.handle()
[Wed Aug 02 23:41:09.890754 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle
[Wed Aug 02 23:41:09.890756 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     return self._delegate(fn, self.fvars, args)
[Wed Aug 02 23:41:09.890758 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/usr/lib/python2.7/site-packages/web/application.py", line 420, in _delegate
[Wed Aug 02 23:41:09.890760 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     return handle_class(cls)
[Wed Aug 02 23:41:09.890761 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/usr/lib/python2.7/site-packages/web/application.py", line 396, in handle_class
[Wed Aug 02 23:41:09.890763 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     return tocall(*args)
[Wed Aug 02 23:41:09.890765 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/var/www/iredadmin/controllers/decorators.py", line 104, in decorated
[Wed Aug 02 23:41:09.890766 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     return f(*args, **kw)
[Wed Aug 02 23:41:09.890768 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/var/www/iredadmin/libs/sqllib/decorators.py", line 31, in proxyfunc
[Wed Aug 02 23:41:09.890770 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     return func(*args, **kw)
[Wed Aug 02 23:41:09.890771 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/var/www/iredadmin/controllers/sql/domain.py", line 295, in POST
[Wed Aug 02 23:41:09.890773 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     form=form)
[Wed Aug 02 23:41:09.890775 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/var/www/iredadmin/libs/sqllib/decorators.py", line 31, in proxyfunc
[Wed Aug 02 23:41:09.890776 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     return func(*args, **kw)
[Wed Aug 02 23:41:09.890778 2017] [:error] [pid 3739] [remote 76.71.76.131:128]   File "/var/www/iredadmin/libs/sqllib/domain.py", line 1126, in update
[Wed Aug 02 23:41:09.890780 2017] [:error] [pid 3739] [remote 76.71.76.131:128]     lib_trot = iredapd_throttle.Throttle()
[Wed Aug 02 23:41:09.890781 2017] [:error] [pid 3739] [remote 76.71.76.131:128] AttributeError: 'module' object has no attribute 'Throttle'
[Wed Aug 02 23:41:09.890788 2017] [:error] [pid 3739] [remote 76.71.76.131:128]

6

Re: Email Aliases for all users

In addition:


python migrate_sql_alias_table.py
* Read SQL username/password from iRedAdmin config file: /var/www/iredadmin/settings.py
* Backend: mysql
Traceback (most recent call last):
  File "migrate_sql_alias_table.py", line 65, in <module>
    records = db.select('alias', what='address,goto,moderators,domain,active,islist,is_alias')
  File "/usr/lib/python2.7/site-packages/web/db.py", line 682, in select
    return self.query(qout, processed=True)
  File "/usr/lib/python2.7/site-packages/web/db.py", line 644, in query
    self._db_execute(db_cursor, sql_query)
  File "/usr/lib/python2.7/site-packages/web/db.py", line 587, in _db_execute
    out = cur.execute(query, params)
  File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1054, "Unknown column 'goto' in 'field list'")

7

Re: Email Aliases for all users

This is the error I am getting whenever we want to update a profile:
Error: OperationalError(1054, "Unknown column 'dest_domain' in 'field list'")

8

Re: Email Aliases for all users

Did you upgrade iRedMail step-by-step? and not skip any new release? Seems you skipped some steps, and just apply the steps you want.

9

Re: Email Aliases for all users

A system administrator made all our upgrades and he is not available for a long time now.

Any help? Which steps do you think we missed?

10

Re: Email Aliases for all users

You have to check SQL structure, make sure it's up to date.
We offer paid support, if you need our assistance, please don't hesitate to contact us: http://www.iredmail.org/contact.html