can u help me in configuring a multi domain mail gateway
It would be nice if you told us what mail server you are running (ie. exim, postfix, sendmail, qmail, etc..)
Anyhow, in order to do this, read about smarthost and how to set up relaying. That's your answer.