Simple Slackware Sendmail Server

5 10 2010

Hi folks!!

I almost can’t believe how long it’s been since I last posted anything on here! I’ve learnt loads, so undoubtedly I’ll be making a few new posts in the near future! Anyway, on with the post…

Setting up Sendmail in a full install of Slackware 12+ (I’ve not tried it in any previous versions) is as easy as 123… Just su to root, and enter the following…
cd /usr/share/sendmail/cf/cf
sh Build
cp /etc/mail/
cp /etc/mail/
chmod +x /etc/rc.d/rc.sendmail
/etc/rc.d/rc.sendmail start

That’s it configured (in a very simple manner) and started. That wasn’t what caused me all the trouble. The pain in my neck was caused when I tried to use telnet to test the server. I typed the following…
telnet localhost 25
HELO identifymyself

For the first two commands, I got the correct response. 220 on login, then 250 after the HELO.

After the MAIL FROM command, however, I got the response “550 5.0.0. Access Denied”. After much delving into the guts of the system, and making sure that my firewall wasn’t blocking anything from, I discovered the root of the problem. I had used the hosts.allow file fairly extensively to block external and internal access to services, and I had not included sendmail into this. The simple fix to the problem was to add the following to the /etc/hosts.allow and restart the sendmail server.
sendmail : ALL@127.0.0. ALL@10.0.0. ALL@192.168.1.

Now the use of telnet to send a test email goes smoothly, as follows (server responses are in parentheses):
telnet localhost 25
(220 myserver.mydomain ESMTP Sendmail 8.14.2/8.14.2)
HELO identifymyself
(250 myserver.mydomain Hello localhost [], pleased to meet you)
(250 2.1.0 Sender ok)
(250 2.1.5 Recipient ok)
(354 Enter mail, end with "." on a line by itself)
Test Email. Just for testing purposes.
(250 2.0.0 0094t89gfdgd09 Message accepted for delivery)

I then checked my email account and found a subject-less email with the sender “”, and the text “Test Email. Just for testing purposes.”





3 responses

21 08 2012
postfix: error: open database /etc/aliases.db: No such file or directory

[…] NEvermind! ive got it to work. The script lies in: /etc/rc.d/rc.sendmail start thanks to this blogger:…ndmail-server/ […]

21 08 2012

Thank you so much! You helped me big!
Can I borrow some of your info?

22 08 2012

Hi Ted,

Glad my information was of use to you; of course you can borrow it. If you use anything from my blog, please link it to the original content, although could you link it to my new blog at I’ve discontinued this one.

Thanks for your kind words!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: