Depends on what you want to do.
If it is just for testing mai server functions on a lan you can call the one server sub1.domain.com and the other sub2.domain.com or what ever you want, but they need two different addresses.
If you want this arrangement to work for sending and receiving mail to and from internet it will not be so easy to use two mail servers on on lan and one public ip, this way.
To change name on one or both servers it should be just to log on in shell console as "admin". Then you will have up the automatic configuration shell. Then you can change the name of the server.
(But you will also have to have some local dns "server" function, possibly editing the file /etc/hosts will do it.)