1

Topic: Transport filter base on regular expression with PgSQL/MySQL backend

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

Hi All
I used regular expression to transport our mail in old mail server
I want  migrate to iRedMail
I store my transport data to vmail.domain table ,but transport doesn't work ,and no error message in postfix log

Someone with experience using transport base on regular expression with PgSQL/MySQL backend ?
Or where am I mistake.......

=====
In iRedMail server postconf
transport_maps = proxy:pgsql:/etc/postfix/pgsql/transport_maps_user.cf, proxy:pgsql:/etc/postfix/pgsql/transport_maps_domain.cf

In iRedMail server domain table status
vmail=# select domain,transport from domain;
        domain         |      transport     
-----------------------+---------------------
1404.example.com  | dovecot
/@cc.*\.example\.com/ | cc-mail.example.com

------------
In old mail server postconf
transport_maps = regexp:/etc/postfix/transport

In old mail server /etc/postfix/transport
/@bc.*\.example\.com/       :bc-mail.example.com
/@cc.*\.example\.com/        :cc-mail.example.com
/@dc.*\.example\.com/         :dc-mail.example.com

----

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

2

Re: Transport filter base on regular expression with PgSQL/MySQL backend

You can do it like on old server. for example:

transport_maps =
    regexp:/etc/postfix/transport,
    proxy:pgsql:/etc/postfix/pgsql/transport_maps_user.cf,
    proxy:pgsql:/etc/postfix/pgsql/transport_maps_domain.cf

3

Re: Transport filter base on regular expression with PgSQL/MySQL backend

Thank you
It's working fine