1

Topic: How to forward mail to specific MX server

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

The server (eg. first.com) has 2 entries mx:
5 mx.first.com
10 mx.second.com

What I want to achieve:
1) Sender (eg. someone@gmail.com) send mail to test@first.com
2) Message go to mx.first.com and save in inbox
3) mx.first.com forward mail to mx.second.com (on mx.second.com is configured mailbox test@first.com)
4) mx.second.com receives email - visible sender someone@gmai.com

I have full control on mx.first.com, but I have no control over mx.second.com

Thanks

----

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

2

Re: How to forward mail to specific MX server

How about per-user mail forwarding? It will save a copy in mailbox and forward to other address(es).
http://www.iredmail.org/docs/sql.user.m … rding.html

Or you want to forward all emails to mx.second.com? Maybe you can try bcc:
http://www.iredmail.org/docs/monitor.in … h.bcc.html

If you don't need to save a copy on mx.first.com, you can set per-domain relay:
http://www.iredmail.org/docs/per-account.transport.html

3

Re: How to forward mail to specific MX server

I will describe in more detail situations:
the first server: eg.com (dns entries: mx 5 mx.eg.com) [email: test@comp.com]
the second server: comp.com (dns entries: mx 5 mx.eg.com, mx 10 mx.comp.com) [email: test@comp.com)

If I send an email to test@comp.com eg. from gmail, he comes to the server mx.eg.com due to the priority of the DNS entry. So I save email on mx.eg.com and I want to automatically forward to test@comp.com but to the second server mx mx.comp.com

4

Re: How to forward mail to specific MX server

No direct solution. You have to write your own transport program to handle received email.