You can configure the Postfix mail server as a substitute for sendmail. The configuration files are stored in the /etc/postfix directory. The main configuration file, main.cf, is somewhat simpler than sendmail.cf, as it includes over 600 lines. Back up this file and open it in a text editor. There are several things that you should configure in this file to get it working-and limit access to your system and network:
Activate and modify the following myhostname directive to point to the name of your computer:
#myhostname = host.domain.tld
Activate and modify the following mydomain directive to reflect the domain name or IP network address of your system (if you substitute your IP network address, use the same format as illustrated for the sendmail.mc file):
#mydomain = domain.tld
Activate and modify the following myorigin directive, assuming you've activated the aforementioned myhostname directive.
#myorigin = $mydomain
The following two commands set Postfix to listen to only the local computer. Activate and deactivate the following commands to remove that limitation:
#inet_interfaces = all inet_interfaces = localhost
Activate and modify the following mynetworks command to point to the IP network address that you want to serve.
#mynetworks = 188.8.131.52/28, 127.0.0.0/8
Now start or restart Postfix to make sure it reads your new /etc/postfix/main.cf configuration file:
# chkconfig postfix on # service postfix restart
Your Postfix service should now be up and running and ready to accept mail from any (valid) source, as specified by the preceding directives.