Linux Configure Sendmail as SMTP Mail Client ( submission MTA )

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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 16 comments so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
16 comments… add one
  • Senkumar Jul 27, 2009 @ 16:00

    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 ?

  • Charon Jul 29, 2009 @ 15:10

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

  • Ashutosh Aug 8, 2009 @ 10:16

    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.

  • Mahmudur Apr 19, 2010 @ 6:02

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

  • Suranjit Paul Oct 24, 2010 @ 7:01

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

  • Thilina Oct 7, 2011 @ 10:18

    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!!!

  • Nic Nov 23, 2011 @ 14:09

    Ho to do it with postfix?

  • Ab Jun 5, 2012 @ 19:05

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

  • Kiran Jul 16, 2012 @ 17:01

    Good one

  • Bahnu Apr 16, 2013 @ 17:51

    I am still not able to configure after following above steps

  • Flopex May 23, 2013 @ 16:43

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

  • Supriya Aug 6, 2013 @ 12:15

    How to block mailserver sending mail out to the internet.

  • Isaac Sep 11, 2013 @ 9:14

    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.

  • Jooe Feb 21, 2014 @ 12:48

    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 :/

  • Mahesh VIjapure Sep 8, 2014 @ 4:48

    Neither this is working for me , i followed above instructions but all in vein.brought up with the below error after sending mail using “mail

    /home/abc_user/dead.letter… Saved message in /home/abc_user/dead.letter

  • Kunal Nov 3, 2014 @ 8:12

    When I send mail from my smtp server to a user, the original message received by that user
    contains my ip address logged in the header. How do I change or remove that ip address?
    Please reply ASAP.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @