LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > ted_chou12
User Name
Password

Notices

Rate this Entry

sendmail server at port 25

Posted 08-21-2012 at 09:17 AM by ted_chou12
Updated 08-21-2012 at 09:55 AM by ted_chou12

borrowed from: https://n00bsys0p.wordpress.com/2010...r/#comment-366
Quote:
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…
Code:
cd /usr/share/sendmail/cf/cf
sh Build sendmail-slackware.mc
cp sendmail-slackware.cf /etc/mail/sendmail.cf
cp submit.cf /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…
Code:
telnet localhost 25
HELO identifymyself
MAIL FROM: myaddress@mylittleemailserver.com
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 127.0.0.1, 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.
Code:
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):
Code:
telnet localhost 25
(220 myserver.mydomain ESMTP Sendmail 8.14.2/8.14.2)
HELO identifymyself
(250 myserver.mydomain Hello localhost [127.0.0.1], pleased to meet you)
MAIL FROM: randomaddress@randomdomain.com
(250 2.1.0 randomaddress@randomdomain.com... Sender ok)
RCPT TO: my.email.address@my.own.domain.com
(250 2.1.5 my.email.address@my.own.domain.com... Recipient ok)
DATA
(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)
^]
quit
I then checked my email account and found a subject-less email with the sender “randomaddress@randomdomain.com”, and the text “Test Email. Just for testing purposes.”

Fantastic!!

n00b
Posted in Uncategorized
Views 393 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 06:07 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration