Sendmail server comes default with Linux flavors.  Sendmail is an email routing application for Linux operating systems.Sendmail is a general purpose internetwork email routing facility that supports many kinds of mail-transfer and -delivery methods, including the Simple Mail Transfer Protocol (SMTP) used for email transport over the Internet.

Sendmail is the most popular mail transfer agent (MTA) on the Internet. Its popularity is due in part to its position as the standard MTA under most variants of the Unix and other Unix-like operating system.

Allman had written the original ARPANET delivermail which shipped in 1979 with 4.0 and 4.1 BSD. He wrote Sendmail as a derivative of delivermail early in the 1980s at UC Berkeley. It shipped with BSD 4.1c in 1983, the first BSD version that included TCP/IP protocols.

Here i am going to explain about configuration of Sendmail for bulk mail sending. There are couple of steps you need to follow to get it work as well as the mail should not go to spam folder of the Recipient.

How to setup a bulk mail send mail server

We can divide this in two as follows.

  • Configuration of Sendmail
  • White-listing of your Sendmail server

First lets discuss about Configuration of Sendmail Server.

The Sendmail get installed by default on linux systems.  Just start the service by typing the following any of the command

service sendmail start
/etc/init.d/sendmail restart

Follow the step by step Now to configure Sendmail server

a) Type the command following command to open the “resolv.conf” file in a text editor

vi /etc/resolv.conf
gedit /etc/resolv.conf

Then add the dns server in the resove.conf file. The dns plays a big role in sending the mails to recipient domain. if name server is not working then your mail server will not deliver any mails to the recipients. You can add the nameserver by adding the following line in the resolv.conf file.


( is Google dns, if you are not having a name server then you can use it.)

b) Type the command “gedit /etc/mail/” to open the “” file in a text editor.
Change the “Addr” variable in the line “dnl DAEMON_OPTIONS(‘Port=smtp,Addr=, Name=MTA’)” to reflect the IP address of your              mail server. Remove the “dnl” characters in front of the line.  You can see the screenshot of the same as below..

c) Open the “/etc/mail/access” file in a text editor. Place the IP address and domain name of the computers and domains that can relay mail          through your server in the file.    Once you have added the same the file will look like shown below…

# Check the /usr/share/doc/sendmail/ file for a description
# of the format of this file. (search for access_db in that file)
# The /usr/share/doc/sendmail/ is part of the sendmail-doc
# package.
# by default we allow relaying from localhost...
Connect:localhost.localdomain RELAY
Connect:localhost RELAY

d) Type the following commands to reconfigure sendmail:

cd /etc/mail
/etc/init.d/sendmail restart

We have done with Sendmail configuration. Now let us discuss with White-listing of your Sendmail server.

Follow the below listed steps to White-listing the Sendmail server

a) The first step is to Nat an live ip address with the Sendmail server. This you can achieve in the firewall  by making a Nat configuration. This will help your Sendmail server to use this ip in the internet to deliver the mails.

b) The second step is to make dns entry for your Sendmail server. suppose your server name is then you have to do an dns entry for this name with the nated ip address. Remember to make reverse entry also. Once the entry is done you have to verify it . see the below shown example.

Non-authoritative answer:
Non-authoritative answer:     name =

first when i did an nslookup with my server name. it got resolved to . Then i did nslookup with ip then it got resolved to name. so your settings should be like this.

c) The last step is to create an SPF record. please see the following article to create an SPF Record.


Post By Editor (2,827 Posts)

Website: →