In this exercise we will setup some basic postfix functionality.

[root@security1 ~]# yum -y install system-switch-mail postfix

After this you should change default mail agent.

[root@security1 ~]# system-switch-mail

If you want to see non-default setup you will run

[root@security1 ~]# postconf -n

This will change /etc/postfix/main.cf file, on part mynetworks.

[root@security1 ~]# postconf -e "mynetworks=127.0.0.1/32"

Without -n optin command will give you all postfix configuration. This will print default content of mynetworks (this isn't in main.cf)

[root@security1 ~]# postconf -d mynetworks
mynetworks = 127.0.0.0/8 192.168.0.0/24

Setup postfix so he will listen on all interfaces, not only to localhost, change also and hostname as myorigin parameter. You will use procmail for local email processing. Disable the SMTP VRFY command. This stops some techniques used to harvest email addresses. Vrfd command allows connecting hosts to check whether username is valid for local recepient for mail. We want to this be private, so we need to turn of that. Change and SMTP banner. So, find in /etc/postfix/main.cf next and change

inet_interfaces = all Service will listen on all local interfaces
myhostname = security1.setenforce.com
myorigin = $myhostname
mailbox_command = /usr/bin/procmail Local mail delivery
disable_vrfy_command = yes You can't see my users :)
smtpd_banner = $myhostname ESMTP