RHEL 6 and CentOS 6 Email Server

English: email envelope

Email (Photo credit: Wikipedia)

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, “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" "<someuser@somedomain.com>"
Hello friend, This is a test message from my new mail server.

About notesbytom

Keeping technology notes on WordPress.com to free up my mind to solve new problems rather than figuring out the same ones repeatedly :-).
This entry was posted in Linux, System Administration and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s