CIT 470 Advanced Network and System Administration: Lab #16: Sendmail | |||||||
|
|||||||
In this lab, we'll set up an e-mail client/server system. If you have any problems with sendmail, check for log entries in /var/log/maillog and bounced messages in /var/spool/mail/root.
su service sendmail stop
yum install sendmail-cf sendmail-doc
rpm -ql sendmail-cf
mv cf cf.examples mkdir cf cp -p cf.examples/Build cf cp -p cf.examples/Makefile cf
cd cf vim cit470.mc
./Build cit470.cf
less cit470.cf
vim /etc/hosts
sendmail -C cit470.cf -bt > ? > /parse student@localhost > /parse student@cit470 > /parse student@cit470.nku.edu > /parse student@nku.edu > /quit
cp cit470.cf /etc/mail cd /etc/mail mv sendmail.cf sendmail.cf.dist mv cit470.cf sendmail.cf
service sendmail start
sendmail -v student Subject: test This is a test .
less /var/spool/mail/student
sendmail -v student@myservername Subject: u@h format test This is a yet another test message. .
less /var/spool/mail/student
sendmail -v student@nku.edu Subject: Remote server mail test Test ///. .
Use the virtual machine as the client host.
cd cf vim client.mc
./Build client.cf
less client.cf
sendmail -C client.cf -bt > ? > /parse student@localhost > /parse student@cit470 > /parse student@cit470.nku.edu > /parse student@nku.edu > /quit
sftp root@MY_CLIENT_IP
su cd /etc/mail mv sendmail.cf sendmail.cf.dist cp client.cf sendmail.cf
vim /etc/hosts
service sendmail restart
sendmail -v student Subject: Client: test Client test I. .
mailq
grep smtp /etc/services vim /etc/sysconfig/iptables service iptables restart
sendmail -v -q
less /var/spool/mail/student
sendmail -v student@nku.edu Subject: Client: Remote server mail test Client test ][. .
cd cf vim cit470.mc ./Build cit470.cf cp cit470.cf /etc/mail/sendmail.cf service sendmail restart