Setting up ✉️ Sendmail quick method

Setting up ✉️ Sendmail quick method

Here is how to set up Sendmail the quick method, but also you may want to also check out the better method for setting up Sendmail.

Allowing SMTP (open Port 25) using sendmail

On an initial installation of Linux, sendmail blocks smtp and only allows the localhost to access it. Within Linux there is a config file called it will be either located in /etc or /etc/mail

The easiest way to locate the config file is to from the root type:

find –name 

Once you have located the config file open it with your preferred method and find the line below

# SMTP daemon options

Once you have found this line, you will see the command below:

O DaemonPortOptions=Port=smtp,Addr=, Name=MTA

To disable it put a # in front of it as seen below

#O DaemonPortOptions=Port=smtp,Addr=, Name=MTA

restart the service with:

/etc/rc.d/init.d/sendmail restart

You should now be able to see SMTP/Port 25

Allowing relay of your domain mail

In the same location you need to go to /etc/mail and alter the config file “access” then add your domains into it.

Next you need to edit the relay-domains if it does not exist create it. In this file you should also put the following:

save the files and restart sendmail and all should work.

Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.