1

Topic: Forwardings clarification

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

I would like some help in setting up a simple 'mailing list', basically I would like sales@mydomain.tld to be forwarded to a number of mailboxes. From what I can glean from the DB structure I will need to add a separate row in the forwardings table for each mailbox on the sales@mydomain.tld 'list' and a row in the alias table with sales@mydomain.tld.

Is this the correct way to go about it? Do I need to set 'is_list'?

Also what are the is_alias and is_forward for?

Thanks for your help,
Sam

----

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

2 (edited by RikuS 2017-08-09 18:42:12)

Re: Forwardings clarification

Based on this page http://www.iredmail.org/docs/sql.create.mail.alias.html you're correct about creating mail alias account (mailing list): create an alias and as many rows on forwardings as needed.

-- Create mail alias account
sql> INSERT INTO alias (address, domain, active)
       VALUES ('alias@mydomain.com', 'mydomain.com', 1);

-- Create alias 'sales@domain.com' for user 'john@domain.com'
sql> INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_list, active)
       VALUES ('sales@domain.com', 'john@domain.com',  'domain.com', 'domain.com', 1, 1);

Per-user alias addresses documentation seems to be outdated (http://www.iredmail.org/docs/user.alias.address.html), but if I understand correctly it should be done like this with 0.9.7 and later releases:

-- Add alias 'sales@domain.com' for existing user 'john@domain.com'
sql> INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_alias, active)
       VALUES ('sales@domain.com', 'john@domain.com',  'domain.com', 'domain.com', 1, 1);

Mail forwarding docs (http://www.iredmail.org/docs/sql.user.m … rding.html) are also outdated, but they seem to be done simply by adding a new address to forwardings:

-- Forward mails for 'john@domain.com' to 'amy@domain.com'
sql> INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_forwarding, active)
       VALUES ('john@domain.com', 'amy@domain.com',  'domain.com', 'domain.com', 1, 1);

3

Re: Forwardings clarification

Ah ok as I thought!

Thanks for the clarification, would be good If the documentation was updated as a lot of the information available refer to (what I can only imagine) an old schema design where the alias table has a 'goto' column which is more inline with how I know postfix to work.

4

Re: Forwardings clarification

RikuS wrote:

Per-user alias addresses documentation seems to be outdated (http://www.iredmail.org/docs/user.alias.address.html)
...
Mail forwarding docs (http://www.iredmail.org/docs/sql.user.m … rding.html) are also outdated

Both have been updated today. It's now up to date.

5

Re: Forwardings clarification

sam.roberts wrote:

Ah ok as I thought!

Thanks for the clarification, would be good If the documentation was updated as a lot of the information available refer to (what I can only imagine) an old schema design where the alias table has a 'goto' column which is more inline with how I know postfix to work.

Yes you're right, some of the docs are still based on old database schema.

Btw, there was a typo on first example, is_alias needs to be is_list for mail alias accounts (mailing lists). Fixed.

6

Re: Forwardings clarification

ZhangHuangbin wrote:
RikuS wrote:

Per-user alias addresses documentation seems to be outdated (http://www.iredmail.org/docs/user.alias.address.html)
...
Mail forwarding docs (http://www.iredmail.org/docs/sql.user.m … rding.html) are also outdated

Both have been updated today. It's now up to date.

Awesome, thanks. Still though this seems to be the old version:
http://www.iredmail.org/docs/sql.user.m … rding.html

7

Re: Forwardings clarification

RikuS wrote:

Still though this seems to be the old version:

We commit changes to repo: https://bitbucket.org/zhb/iredmail-docs/src
Then our website server pull the changes every 10 minutes. You're in the 10 minutes timeframe. Anyway, i updated it manually.

8

Re: Forwardings clarification

ah excellent!

I'll have a re-read of the docs

Thanks!