1

Topic: Can't create forwarder

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

Hello,

I cannot create a forwarder. Please help.

When I attempt to create it according to the documentation:


mysql> use vmail;
Database changed
mysql> UPDATE alias SET goto='a@b,c@d' WHERE address='e@f';
ERROR 1054 (42S22): Unknown column 'goto' in 'field list'


The column doesn't exist:


mysql> show columns from alias;
+--------------+--------------+------+-----+---------------------+-------+
| Field        | Type         | Null | Key | Default             | Extra |
+--------------+--------------+------+-----+---------------------+-------+
| address      | varchar(255) | NO   | PRI |                     |       |
| name         | varchar(255) | NO   |     |                     |       |
| accesspolicy | varchar(30)  | NO   |     |                     |       |
| domain       | varchar(255) | NO   | MUL |                     |       |
| created      | datetime     | NO   |     | 1970-01-01 01:01:01 |       |
| modified     | datetime     | NO   |     | 1970-01-01 01:01:01 |       |
| expired      | datetime     | NO   | MUL | 9999-12-31 00:00:00 |       |
| active       | tinyint(1)   | NO   | MUL | 1                   |       |
+--------------+--------------+------+-----+---------------------+-------+
8 rows in set (0.00 sec)


How can I fix this? Thank you!!

----

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

2 (edited by tmowbray 2017-07-19 03:42:10)

Re: Can't create forwarder

Using PGSQL, but having exact same issue.  Column "goto" doesn't exist in table "alias"

Also, table "alias" has no entries in it (and yes, I have users setup)...so I don't see how an update statement could be applied.

EDIT:

This may be the answer I'm looking for...
https://bitbucket.org/zhb/iredmail/issu … lias-table

3

Re: Can't create forwarder

tmowbray wrote:

Using PGSQL, but having exact same issue.  Column "goto" doesn't exist in table "alias"

I'm pretty sure that you created mail accounts manually, but you didn't have correct SQL records in "vmail.alias" table for mail users, that's why it complains and cannot migrate.

To fix it:

*) All mail user accounts stored in "vmail.mailbox" table must have a sql record in "vmail.alias" table. This sql design is historical and i have no comment here.

*) You should sync "vmail.mailbox" to "vmail.alias" with correct data, then run the migrate script mentioned in iRedMail-0.9.7 upgrade tutorial to switch to new SQL structure.

About the "correct data", check our script used to create mail user for old iRedMail releases (just line 131):
https://bitbucket.org/zhb/iredmail/src/ … SQL.sh-131