In this exercise we will do some basic setup for sendmail service. Let's start with simply installation and configuration. Install service on both machine.

[root@security2 ~]# yum -y install sendmail-cf*

In /etc/mail/sendmail.mc add line which will to allow connections from remote systems

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

Restart service,and open port 25 in firewall and try to send mail to user anna:

[root@security2 ~]# /etc/init.d/sendmail restart

Just quick howto send mail through telnet command:

[root@security2 ~]# telnet security1 25
...
HELO security2 Like I am :)
...
MAIL FROM:root@security1 My address
...
RCPT TO:anna@security1 Your address
...
DATA
...
text message for anna. This is text message
.