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
3.m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf
4.vi /etc/mail/access
192.168.0RELAY
@cracker.orgREJECT
5.service sendmail start | restart
6.chkconfig dovecot on
7.vi /etc/dovecot.conf
protocols = pop3 pop3s imap imaps
8.service dovecot start | restart
9.chkconfig dovecot on
10.vi /etc/aliases
user5:user2
11.newaliases
/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.
By default dovecot service start only the imap protocol. To start pop protocol with dovecot, we should write in /etc/dovecot.conf file.
Using /etc/aliases file we can map the user name to send mail of one user to another user. To rebuild database we use the newaliases command.
Submit