Linux Configure Sendmail as SMTP Mail Client ( submission MTA )

by on July 24, 2009 · 14 comments· LAST UPDATED July 24, 2009

in , ,

I've central e-mail server. Other servers does not need to operate as a mail server. How do I configure Sendmail as submission-only e-mail server (mail client) under CentOS / Fedora / RHEL / Debian Linux / UNIX like operating systems?

Sendmail or any MTA can work in two different modes. It can accept incoming SMTP e-mail requests and send mail from the local machine / workstation or server (cluster node). This is called outbound MTA and it always runes in a queue-only mode.

Step # 1: Disable Sendmail Daemon In a Listing Mode

Edit the file /etc/sysconfig/sendmail using the text editor such as vi, enter:
# vi /etc/sysconfig/sendmail
Modify the line:


Save and close the file. Setting DAEMON=no tells Sendmail to execute only the queue runner on this machine, and never to receive SMTP mail requests on port # 25.

Step #2: Configure Mail Submission

You need to tell sedmail about a central MTA which will accept mail on port # 25 for all your domains. For e.g. act as a central MTA. Edit /etc/mail/, enter:
# vi /etc/mail/
Find the line beginning with D{MTAHost}, and update it to read as follows:


Save and close the file. is the hostname of the server to which this machine should forward its all outgoing mail. Please note that must be configured to accept mail from your other workstations or server. Once done reload sendmail.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 14 comments… read them below or add one }

1 Senkumar July 27, 2009 at 4:00 pm

I’m using my own sendmail server like as MTA(outbound) and if I need to relay mails of host what settings need to be adjusted in host ?


2 Charon July 29, 2009 at 3:10 pm

nice tip, but what if I need to use non-standart port and authorization?


3 Ashutosh August 8, 2009 at 10:16 am

Hi vivek,
will this work for
-SMTP authenticated mail servers as well
-SSL/TLS supported mail servers
-Mail servers not running on port 25.

The server in question is google hosted mail server. Can you give any links which details how to point local sendmail to our gmail server to send outbound mails.


4 Mahmudur April 19, 2010 at 6:02 am

How can I create SMTP Authentication in Linux mail server via Sendmail package


5 Suranjit Paul October 24, 2010 at 7:01 am

How can i create Mail server (send mail & recieve mail) ?


6 Thilina October 7, 2011 at 10:18 am

Thanks man!!! Awesome tip..Exactly I was looking for..I only needed to option two make it a mail client use a remote server as the outgoing mail server..Thanks a lot!!!


7 Nic November 23, 2011 at 2:09 pm

Ho to do it with postfix?


8 Ab June 5, 2012 at 7:05 pm

Is there any specific configuration in addition to the mentioned 2steps.


9 Kiran July 16, 2012 at 5:01 pm

Good one


10 Bahnu April 16, 2013 at 5:51 pm

I am still not able to configure after following above steps


11 Flopex May 23, 2013 at 4:43 pm

Was looking for this for days, thanks it solved my problem.


12 Supriya August 6, 2013 at 12:15 pm

How to block mailserver sending mail out to the internet.


13 Isaac September 11, 2013 at 9:14 am

Great but now all the local mail such as root@localhost is heading out to that server as well, need a way to keep the localhost mail on the local server.


14 Jooe February 21, 2014 at 12:48 pm

Hello, and thank you for this interesting article.
I wanted to follow those indications, but unfortunately, when running on Fedora 19 release, the sendmail version has been updated to 8.14.7-1, and the content of the /etc/sysconfig/sendmail has been modified.
the option : DAEMON = no doesn’t seem to exist anymore, and I would like to keep this parameter with the current version of sendmail.
Do you know where i could have the same option in 8.14.7-1 ?
I can’t find anything on the internet referring to this :/


Leave a Comment

Tagged as: , , , , , , , , , , , ,

Previous Faq:

Next Faq: