Accepting Mail for old domain and new domain

Hi,

I am working on our 2 front end email handlers that will accept mail for our domain. A while back, there was a domain name change, but I have been asked to configure it to still accept mail for our old domain and the new domain. So.. for example.. they have asked that any mail sent to darren@olddomain.com end up in the proper and current mail box for darren@newdomain.com. Most mail (the vast majority) comes to newdomain.com, BUT.. they would like to still get mail for the other. Its my thought to accept mail for both domains, and re-write anything coming to olddomain.com to newdomain.com. SO darren@olddomain.com rewrites to darren@newdomain.com. Considering the ldap link for accepting mail is functional, how would I configure this? (old domain address are not in ldap in anyway, shape or form). I would prefer to find the what i think is "very few users" that need this, and configure them, and do it that way.. but i have been instructed to do it for the entire domain.

any thoughts?

Thanks,

Darren

[1044 byte] By [DarrenLCC] at [2007-11-26 11:22:39]
# 1
Darren, have a quick search through this forum for "domain alias". That's all you really need.
jay_plesset at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 2
I have done some more research, its only a handful of users. Is there an easier way?
DarrenLCC at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 3
In LDAP use mailalternateaddres to each of your usersmailalternateaddress: darren@my.old.domainand configure mappings file to accept mails for your old domain.Ram
ram@qedcommx at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 4
I have confirmed that there are only 2 accounts still using this old domain. I will try this mailalternateaddress solution.Thanks for the help!!!
DarrenLCC at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 5
would I need only add an entry like this in the mappings filetcp_*|*|*|*@olddomain.com $Yunder the SEND_ACCESS section? doesn't seem to work...
DarrenLCC at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 6

Try editing your imta.cnf

You have to add a Rule to accept mails to your aold domain

! Rules to select local users

$* $A$E$F$U%$H$V$H@correo.bansefi.gob.mx

newserver.new.domain $U%$D@newserver.new.domain

new.domain $U%$D@newserver.new.domain

my.old.domain $U%$D@newserver.new.domain<-- ADD this line

and run:

imsimta dnbuild

imsimta restart dispatcher

Ram

ram@qedcommx at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 7

added that line as shown and got a little different response.

now when doing a manual telnet to port 25 and attempting to send to

darren@olddomain.com i get an

550 5.1.1 unknown or illegal alias: darren@olddomain.com

I do have darren@olddomain.com in the mailalternateaddress attribute

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

Noticed in the ldap access log, its looking for the following

&(objectClass=sunManagedOrganization)(|(associatedDomain=olddomain.com)(sun PreferredDomain=olddomain.com)))" attrs=ALL

of course it won't find that there as its our newdomain.com can i rewrite the addresses to darren@newdomain.com somehow for the 3 users that still need mail coming to olddomain.com

DarrenLCC at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 9
Try adding:DOMAIN_UPLEVEL=3In option.datRam
ram@qedcommx at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 10
Please note, Ram's method will break vacation reply for Messaging 6.xDomain Alias requires a few ldap entries, and breaks nothing.
jay_plesset at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 11
It would require a few ldap entries plus what config changes in imta.cnf as mentioned above? Would these entries have any affect on current config?I for sure need vacation responses. I will keep looking.
DarrenLCC at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 12
Would it break vacation messages for both domains..or only the olddomain.com ?
DarrenLCC at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 13

If you're using 5.2, it won't break vacation at all. Messaging 6 uses some new stuff for vacation. With 6.x, unless the to: address matches the user's mail, mailAlternateAddress or mailEquivalentAddress fully, no vacation reply is sent. This is to prevent replying to lists.

If you're runnig 5.2 (and I can't tell, as you've not stated), here's how to do the domain alias thing. It's really not difficult:

http://docs.sun.com/source/816-6009-10/dirldap.htm#27650

jay_plesset at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 14
I am running Sun Java(tm) System Messaging Server 6.2-3.04 .
DarrenLCC at 2007-7-7 3:38:01 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 15
The documentation shown is valid for 6.2 as well. It's still the easiest way to achieve your stated goals.
jay_plesseta at 2007-7-21 15:32:00 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 16
ANy docs around on how to do it with 6.2?
DarrenLCCa at 2007-7-21 15:32:00 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 17
ok.. thanks,, I will go through them. Are there any gotchas or things that could go wrong that you know of?Thanks for all the help from everyone. I will see if I can get it working and post back when/if I do.
DarrenLCCa at 2007-7-21 15:32:00 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 18
The 5.2 doc should apply equally to 6.2. The ldap attributes are unchanged. No gotchas that I know of. If you do it wrong, it just doesn't work. Since you're aliasing a second domain to act like the first one, the first domain isn't affected at all.
jay_plesseta at 2007-7-21 15:32:00 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 19

UPDATE:

I was successfully able to set up domain aliasing using the following command.

> # cd /opt/SUNWcomm/bin

> # ./commadmin domain modify -D admin -w password -n currentdomain.com -d currentdomain.com -A +associatedDomian:olddomain.com

After doing this, i just need add any address (darren@olddomain.com) to the mailalternateaddress attribute of any user and mail is accepted.

Thanks for the help on this one. It works great.

DarrenLCCa at 2007-7-21 15:32:00 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...
# 20
Glad it's working for you.
jay_plesseta at 2007-7-21 15:32:00 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...