Originally Posted by bouba
Does anyone found a solution for this pb please ? I have the same.
I'm assuming you guys just want to keep an archived copy of the email so....
Install MailScanner and Spamassassin
Create a ruleset for non-spam emails
To: domain.com deliver store-/var/archive/incoming/domain_com forward firstname.lastname@example.org
From: domain.com deliver store-/var/archive/outgoing/domain_com forward email@example.com
This will take any mail from domain.com deliver it to the intended user, store the email in a file in /var/archive/<direction>/domain_com and then send it to another email account.
If you want it to go to a seperate mail server you can edit the transport map for that subdomain that the mail is forwarded to point to another sub-domain and change "forward firstname.lastname@example.org
" to "forward email@example.com
". Otherwise get exim4 and do split spools.
You can also do per user for the ruleset so you could do something like this.
deliver store-/var/archive/incoming/domain_com forward firstname.lastname@example.org
deliver store-/var/archive/outgoing/domain_com forward email@example.com
If you are really that concerned about it being the same "domain" the servers can "think" they are both part of the same domain but the server sending them the mail doesn't have to. Just edit the hosts file of the server that is splitting the mail so it thinks it is on a subdomain.
If you need further help, please let me know.