1

Topic: Configure two server with the same domain.

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.8.1
- Linux/BSD distribution name and version: CentOS release 5.8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): apache
- Manage mail accounts with iRedAdmin-Pro? yes
- Related log if you're reporting an issue:
====

Hi.
I'm looking for solution where I want to migrate some mail users from iredmail(HostA) to another server. My goal is to have two severs like this:

- On the host A is several mailboxes for  domain (example.com)
- On the host B are different mailboxes for the same domain (example.com)
- If mail comes on Host A and the mailbox does not exist-> relay to Host B
- if some user from server B will send mail to user in the same domain (user1@example.com(on serverB) -->user2@example.com(on serverA)) and it doesnt exist on B it will be relayed to A.

I already tried it with modifing mysql table mailbox record for transport column smtp:ipofhostB:25 but I want something more universal without modification per user record, or listing users in transport maps.

Best solution will be to transport all mails for domain example.com for non existing mailboxes to server B. Or maybe there is another way?

----

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

2

Re: Configure two server with the same domain.

You have to have all mail accounts on BOTH servers. Let's say you have user 'A@', 'B@' on server "server1", and 'X@', 'Y@' on server "server2":

*) on server 1, update per-user relay of user 'X@' and 'Y@' to "smtp:[ip_of_server_2]:25" (without quotes).
*) on server 2, update per-user relay of user 'A@' and 'B@' to "smtp:[ip_of_server_1]:25" (without quotes)

Btw, the easier way is hosting all users under same domain on only one server. Hosting same domain on multiple servers will become a challenge if you're not familiar with Postfix.

3

Re: Configure two server with the same domain.

ZhangHuangbin wrote:

You have to have all mail accounts on BOTH servers. Let's say you have user 'A@', 'B@' on server "server1", and 'X@', 'Y@' on server "server2":

*) on server 1, update per-user relay of user 'X@' and 'Y@' to "smtp:[ip_of_server_2]:25" (without quotes).
*) on server 2, update per-user relay of user 'A@' and 'B@' to "smtp:[ip_of_server_1]:25" (without quotes)

Btw, the easier way is hosting all users under same domain on only one server. Hosting same domain on multiple servers will become a challenge if you're not familiar with Postfix.

One of the use cases is migration using two servers. The old server supports some users - different mail system the new one Iredmail. On the old server you can use something like:

local_recipient_maps =
fallback_transport = smtp:[A.B.C.D]

but on the Iredmail you CAN NOT user "fallback_transport".


Could you explain how to handle accounts on two servers simultaneously?

4

Re: Configure two server with the same domain.

Does this tutorial help?
https://gist.github.com/iredmail/fda90a … c18638e047