SMTP routing

i want to route mails sent to local domain to the localhost and others to a particular gateway ...(particular IP address).please give an example in detail how to do it using mappings file and rewriting rules.i am using ims5.2 with directory server 5.1.
[287 byte] By [706767] at [2007-11-25 8:19:41]
# 1
even i wanna do the same so if have done this then kindly let me know how can i do this ?i even wanna configure my nms to listening on different port , any idea how to do this ? regardsPrashant
qmailindia at 2007-7-1 14:30:21 > top of Java-index,E-Mail, Calendar, & Collaboration,Sun Java System Messaging Server...