Send mail between servers
Install send mail
yum install sendmail* m4*
Modify following lines in config file
vi /etc/mail/sendmail .mc
dnl DAEMON_OPTIONS(`Port=smtp,Addr=192.168.0.10, Name=MTA')dnl
dnl LOCAL_DOMAIN(`master.ssgroup')dnl
dnl LOCAL_DOMAIN(`master.ssgroup')dnl
save the file
master.ssgroup is domain name
Verify config
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.mf
service sendmail restart
chkconfig sendmail on
Client side
[root@master mail]# mailx -s hello tommy@master.ssgroup
hello
EOT
[root@master mail]#
[tommy@master log]$ cat /var/spool/mail/tommy
Received: (from root@localhost)
by master.ssgroup (8.14.4/8.14.4/Submit) id u82E8n7b003874
for tommy@master.ssgroup; Fri, 2 Sep 2016 07:08:49 -0700
From: root <root@master.ssgroup>
Message-Id: <201609021408.u82E8n7b003874@master.ssgroup>
Date: Fri, 02 Sep 2016 07:08:49 -0700
To: tommy@master.ssgroup
Subject: hello
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
hello
[tommy@master log]$
No comments:
Post a Comment