system
Step 1:
#vim /etc/mail/sendmail.mc
Line no:79
FEATURE(`virtusertable', `hash o /etc/mail/virtusertable.db')dnl
Step 2:
edit virtusertable file
#vim /etc/mail/virtusertable
user1@dns.com dns@dns.com
Step 3:
restart the sendmail service

#service sendmail restart
Step 4:
#mail s “test” v user1@dns.com
sample mail for virtual user table
.
cc:
Step 5:
#su – user1
$exit
#su – dns
Outbound Mail(To change the From address for sending)
System
Step 1:
add the following entries in sendmail.mc file
#vim /etc/mail/sendmail.mc
Line no:104
FEATURE(genericstable)dnl
FEATURE(`always_add_domain')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/localhostnames')dnl
Step 2:
#hostname system4.dns.com
edit genericstable file
#vim /etc/mail/genericstable
user1@system4.dns.com dns@system4.dns.com
Step 3:
add the hostname entries in localhostnames file
#vim /etc/mail/localhostnames
dns.com
system4.dns.com
system4
Step 4:
restart the sendmail service
#service sendmail restart
Step 5:
From user1 to send a mail to another user
$mail s “test” v root@dns.com
sample mail for generics user table
.
cc:
Step 6:
check root mails
Inbound and outbound mail configure successful by through change to address and from address in rhel5
0 Comments