Official Red Hat Enterprise Linux (RHEL) 6.x documentation for Email Servers is available in the RHEL 6 Doc – Chapter 17, Mail Servers. This information applies to CentOS 6 as well.
The default MTA for SMTP service is now Postfix. Important config info is in Section 188.8.131.52, “Basic Postfix Configuration”.
If your server has more than one IP address and you want all the outgoing mail to appear with the same fixed source IP, use the setting smtp_bind_address (I add this new setting right after the line to allow incoming mail on all ip’s, inet_interfaces=all). See the official postfix documentation for smtp_bind_address, and a related serverfault question as well.
If you’re testing sending and receiving mail with the builtin Linux mail command (mailx), you may have trouble viewing the full email headers. Use the interactive mail command Print or Type (with a capital P or T) to show the full “Received:” headers – this helps you see the path the message followed on the way to your destination mailbox. You can read all about it in the official mailx man page.
Here’s an example of sending mail with mailx, finish the message with a single line containing only the “.” dot character (dot followed by ENTER), or just press CTRL+D.
mailx -s "my mail subject" "<email@example.com>" Hello friend, This is a test message from my new mail server. .