Answer: Do the following steps as:
1.vi /etc/mail/local-host-names
example.com
2.vi /etc/mail/sendmail.mc
dnl # DEAMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,Name=MTA`)dnl
MASQUERADE_AS(`example.com')dnl
define(`SMART_HOST',`smtp.abc.com')
3.m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf
4.vi /etc/mail/virtusertable
info@example.comadmin@example.com
5.vi /etc/mail/access
192.168.0RELAY
/etc/mail/local-host-names file contains the aliases to hostname. Mail server program reads the /etc/mail/sendmail.cf. To change the configuration on mail server, we should edit the /etc/mail/sendmail.mc file and should generate the sendmail.cf using m4 command.
By default sendmail server allows to connect to local host only. So we should edit the /etc/mail/sendmail.mc file to allow connect to other hosts.
By default sendmail server will not forward mail. We should specify on /etc/mail/access to relay or to block mail coming from domain or network or individual email address.
To masquerade the address, MASQUERADE_AS option is in /etc/mail/sendmail.mc. SMART_HOST deliver all local mail locally and outgoing mail through another mail server.
/etc/mail/virtusertable file is used map virtual address to real address.
Eg.
info@example.comuser1@example.com
enquiry@example.comadmin@abc.com