Need to rewrite the 'Envelop to' on the MTA

Is there someone who know how to rewrite the 'envelop To:' on the MTA? I need to get rid of the domain aliases on the MTA before the mail arrive on the store mail server. We are running iPlanet Messaging Server 5.2 HotFix 2.07 with dirsync and planning for 2005Q4 w DirectLdap.
[286 byte] By [Forum_DS5.x] at [2007-11-26 11:34:06]
# 1
Why do you think you need to remove "domain aliases"? Exactly what do you mean by "domain aliases"? If these are done in ldap, you should have no need to remove them.
jay_plesset at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2

It is because I am in a situation where I have domain aliases (AliasedObjectName) and inetcanonicaldomainname. I don't want to remove the aliases, I would like to rewrite them on the MTA before it gets to the STORE. And the ldapsearch return sometimes 2 entries. If there is a way to rewrite the domain part of the mail with a flat file or some rewriting rules I could solve my problem without rebuilding the ldap architecture, the provisioning tools and moving-renaming mailboxes.

Thanks for the fast response.

Forum_DS5x at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 3
While rewriting the domain is pretty easy, vacation mail will get broken in 6.x if the "to:" address doesn't match the ldap results.I suggest using domain aliases on the new system, too.
jay_plesset at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 4

What would be the recipe for rewriting the domain? I tried to modify imta.cnf file wothout satisfying result.

Only vacation response to mail that is sent to aliased domain would get broken, wouldn't it?

Does the vacation mail originate from the Store server (mailhost value)?

Thanks in advance?

Forum_DS5x at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 5
In our actual environment (5.2 HotFix 2.07 with dirsync) the domain part of the 'Envelop to' is getting rewritten before getting out of the MTA from the domain alias to the real domain name. I just want to reproduce the same behavior on the DirectLdap env.
Forum_DS5x at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 6
If you're using "Domain alias" as described in the provisioning guide, that hasn't changed at all for 6.x. You can continue to use it.I wonder, though, why dirsync is still part of your picture. dirsync is evil.
jay_plesset at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 7

Hi,

Rewriting a domain is pretty straight-forward. You can do this through the use of a rewrite rule e.g.

subdomain.domain$E$F$U%domain@localhost

This will cause an email address such as shane@subdomain.domain to be rewritten to shane@domain. The $E$F means that the change only applies to the 'e'nvelope 'forward' address a.k.a. the envelope to: address.

Regards,

Shane.

shane_hjorth at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 8

Hi,

Here is a part of the output of a rewrite on my dirsync msg server. The domain pop.test.net is a aliased domain of test.net

./imsimta test -rewrite earcham@pop.test.net

...

header To: address= eric.archambault@test.net

header From: address= eric.archambault@test.net

envelope To: address= earcham@test.net (route (mta1.test.com,mta1.test.com)) (host test.net)

envelope From: address = eric.archambault@test.net

and on the msg server in Direct Ldap mode:

header To: address= eric.archambault@test.net

header From: address= eric.archambault@test.net

envelope To: address= earcham@pop.test.net (route (newmta1.test.com,newmta1.test.com)) (host pop.test.net)

envelope From: address = earcham@pop.test.net

At the best I would like to keep the same behavior of the 'Envelope To'(from dirsync mode to DirectLdap mode).

I'd rather like to set something in the configuration instead of maintaining a domain.rules file or imta.cnf file (because we have many hosted domains with many aliased domain)

Thanks,

Message was edited by:

Forum_DS5.x

Forum_DS5x at 2007-7-7 3:49:58 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...