Configuring SMTP email on Exadata

Here is a very simple guide on configuring SMTP email forwarding on Exadata.

First of all, you need to install two additional packages – m4 and sendmail-cf. These can be downloaded from the Oracle public yum repository and installed as follows.

rpm -iv m4-1.4.5-3.el5.1.x86_64.rpm
rpm -iv sendmail-cf-8.13.8-8.1.el5_7.x86_64.rpm

You’ll then want to make a backup of your default mail configuration.

cd /etc/mail
cp -pi`date +%Y%m%d`
cp -pi`date +%Y%m%d`

Stop the mail server if it is running.

service sendmail stop

Next, edit /etc/mail/ and search for a line containing SMART_HOST. You’re looking to change the SMTP server and remove the two “dnl” comments at the beginning and end of the line. So –

dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
dnl define(`SMART_HOST', `smtp.your.provider')dnl
dnl #

becomes –

dnl # Uncomment and edit the following line if your outgoing mail needs to
dnl # be sent out through an external mail server:
dnl #
define(`SMART_HOST', `')
dnl #

Now you want to use the newly installed m4 executable to regenerate the “compiled” version of the config you just edited. Once generated, if you view the file and search for “relay” you’ll see the new SMTP server you’ve configured mentioned there.

m4 /etc/mail/ > /etc/mail/

You can now start up sendmail.

service sendmail start

And test it out

echo "Test" | mail -s "Test subject"

There are a few other options available to you to enhance the functionality. We’ve set up rules so that internal emails go via an internal Exchange server, and external emails go via another mail server which sits outside of the network. We’ve also moved the mail queue so that it sits on its own file system (I’ll probably blog this separately). This gives a nice level of protection on an Exadata server which you don’t necessarily want to crash just because one of your application sends thousands of emails which can’t immediately be delivered to your SMTP server.

Post a comment or leave a trackback: Trackback URL.


  • Weidong Zhou  On August 24, 2013 at 12:37 PM

    In general, I am also using the similar steps like yours to configure sendmail. At one client, I have to use ip address, instead of hostname of SMTP server to make it work. I couldn’t remember the exact reason why must use the IP address. Anyway, if use ip address, the change of will be different. Here is the example
    define(`SMART_HOST’, `[]’)dnl

    Note: the [ ] makes huge difference. Without it, it will not work. It took me a while to figure it out.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: