In groups i have created ExampleGroup1 and ExampleGroup2, now if users register in server example1.com than automaticali add in contact of ExampleGroup1 or if users register in server example2.com than automaticali add in contact of ExampleGroup2.
I dont really understand how can you have users from different domains in one server. Explain that better. also, you can try Registration plugin. It lets one to define a default group where all new users are added upon registration. That’s a one default group per server. You can try to modify that plugin for your needs, of course.