1 (edited by tomasz23 2014-08-27 07:50:22)

Topic: Relay configuration bypass

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

I am seeking help regarding configuring relay for specific domain and general relay for everything else. I found how to configure this in postfix but the issue is that IredMail uses MySQL tables. I need to configure transport for specific domain with no authentication and default relay to use SASL. Currently I have everything working through the relay OK using main.cf configuration

Could someone help me out or point me in the direction where I can work out how to/what to configure to create domain specific relay settings while keeping my default domain operational?

   In postfix I read that:

    #relayhost = [smtp.domain.net]:587
    transport_maps = hash:/etc/postfix/transport

    domaintodeliverdirectyto :
    * smtp:[smtp.domain.net]:587

   Don't forget to postmap /etc/postfix/transport

   May want to use relay instead of smtp as the transport mechanisim.

But in IredMail case with the MySQL tables I am not sure how to mimic this configuration (also uncertain about providing username and password for default relay in such configuration as well).

Any help appreciated (can run as is but would love to know/understand how to make it work the multi relay way).




Re: Relay configuration bypass

With SQL backends (MySQL / PostgreSQL), per-domain transport is stored in SQL database "vmail", column "domain.transport". For example:

mysql> USE vmail;
mysql> UPDATE domain SET transport='smtp:[smtp.domain.net]:25' WHERE domain='your_domain.com';

For per-user transport, it's set in column "mailbox.transport".

NOTE: Per-user transport has higher priority than per-domain transport.


Re: Relay configuration bypass

Thanks for that - I guess this would work but I was after configuring relay at postfix level. That is I want to use for domaina.com this relay1.domain.com and for everything else user relay2.domain.com


Re: Relay configuration bypass

Try this:

transport_maps =

Then you can set transport for hosted domain with SQL column "domain.transport", and everything else in /etc/postfix/transport.


Re: Relay configuration bypass

Great that's what I've been after. Thank you very much for your help with this!