Send Mail Configuration

How to configure the SEND MAIL in Linux ?

now we requrired two machines one is server and client

Step 1:


take on machine(server) and change the below settings

# vi /etc/sysconfig/network

HOSTNAME = hostname of the server


# vi /etc/hosts
ip address of client       client host name

Step 2:

install the SEND Mail in one machine with the help of following Commands

# yum install sendmail-cf

# rpm -e postfix

if postfix is there remove it

open any editor and perform below steps
# vi /etc/mail/sendmail.mc
comment -  line no 118

now we have to generate the cf file
# m4 /etc/mail/senmail.mc > /etc/mail/sendmail.cf

Step 3:

after generating the cf file restart the services

# systemctl restart sendmail

# iptables -F


*******Perform same steps for another mail server*******

after configuring all the above steps, Lets try to send Mail from one machine to another

take an machine(server) and try to send the below mail by following steps

# mail -s "some subject" root@hostnameofclient
some body text
.(end with a dot)

lets check the mail in another machine(Client)

# less /var/spool/mail/root



here we will able to see the all mails are in boxed




THANK YOU !!! 

Comments