Linux Configure Sendmail as SMTP Mail Client ( submission MTA )

by Vivek Gite on July 24, 2009 · 7 comments

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:

DAEMON=no

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. mail.nixcraft.net act as a central MTA. Edit /etc/mail/submit.cf, enter:
# vi /etc/mail/submit.cf
Find the line beginning with D{MTAHost}, and update it to read as follows:

D{MTAHost}mail.nixcraft.net

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

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 7 comments… read them below or add one }

1 Senkumar July 27, 2009

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

Reply

2 Charon July 29, 2009

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

Reply

3 Ashutosh August 8, 2009

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.

Reply

4 Mahmudur April 19, 2010

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

Reply

5 Suranjit Paul October 24, 2010

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

Reply

6 Thilina October 7, 2011

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

Reply

7 Nic November 23, 2011

Ho to do it with postfix?

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 7 + 3 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: