1

Topic: LDAP Split Domain

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 5.7
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: Ubuntu LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
====

I understand that this is not a supported setup, but I am trying to make something work here so we can have about half of our users on MS365.  I've been trying to modify the SQL Split Domain Delivery tutorial to work with LDAP, but I am running into roadblocks.  My thinking is to simplify things a little bit as this would only ever affect one of our domains.  Instead of modifying the steps in the SQL tutorial, I would try the following:

1) Add /etc/postfix/transport with:
mysplitdomain.com smtp:smtp.myotherdomain.com

2) postmap hash:/etc/postfix/transport

3) modify the /etc/postfix/main.cf to add the new transport

transport_maps =
    hash:/etc/postfix/transport
    proxy:ldap:/etc/postfix/ldap/transport_maps_user.cf
    proxy:ldap:/etc/postfix/ldap/transport_maps_domain.cf

4) Restart Postfix

I understand this will not be the most efficient way to do things as messages meant for mailboxes that exist in iRedMail will have an extra hop out to the SMTP server, out to 365, through the connector, then back, but I think it *should* work (along with a catch all account to eat up non existent mailboxes).  On the positive side it would also force all internal messages through our security gateway.  Looking for any input before I try it out.

----

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