Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 11-21-2013, 06:36 AM   #1
Registered: Jun 2006
Location: Paris, France
Distribution: RHEL
Posts: 73

Rep: Reputation: 15
Question SMTP Relaying "Service Unavailable"


I have 2 servers:
server1: First which is dedicated to send mail
server2: which is dedicated to an application, and this application is using sendmail to make some automatic reports

server1 is perfectly working (it's the company smtp server).
Problem is on server2, I try to send a mail with:

[root@server2 mail]echo "Subject: test" | /usr/lib/sendmail -vf Connecting to [] via relay...
220 ESMTP Sendmail 8.13.8/8.13.8; Thu, 21 Nov 2013 13:27:21 +0100
>>> EHLO Hello server2 [], pleased to meet you
250 HELP
>>> MAIL From:<> SIZE=15
250 2.1.0 <>... Sender ok
>>> RCPT To:<>
>>> DATA
250 2.1.5 <>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 rALCRLxE015615 Message accepted for delivery Sent (rALCRLxE015615 Message accepted for delivery)
Closing connection to []
>>> QUIT
221 2.0.0 closing connection
then got this in my /var/log/maillog:

Nov 21 13:18:20 server2 sendmail[15391]: alias database /etc/aliases rebuilt by partadm
Nov 21 13:18:20 server2 sendmail[15391]: /etc/aliases: 76 aliases, longest 10 bytes, 765 bytes total
Nov 21 13:18:20 server2 sendmail[15396]: starting daemon (8.13.8): SMTP+queueing@01:00:00
Nov 21 13:18:20 server2 sm-msp-queue[15405]: starting daemon (8.13.8): queueing@01:00:00
Nov 21 13:18:25 server2 sendmail[15413]: rALCIPpV015413:, size=15, class=0, nrcpts=1, msgid=<>, relay=root@localhost
Nov 21 13:18:25 server2 sendmail[15414]: rALCIPKO015414: from=<>, size=326, class=0, nrcpts=1, msgid=<>, proto=ESMTP,daemon=MTA, relay=server2 []
Nov 21 13:18:25 server2 sendmail[15413]: rALCIPpV015413:, (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[] [], dsn=2.0.0, stat=Sent (rALCIPKO015414 Message accepted for delivery)
Nov 21 13:18:25 server2 sendmail[15416]: rALCIPKO015414: to=<>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120326, relay=server1. [], dsn=5.0.0, stat=Service unavailable
Nov 21 13:18:25 server2 sendmail[15416]: rALCIPKO015414: rALCIPKO015416: DSN: Service unavailable
Nov 21 13:18:25 server2 sendmail[15416]: rALCIPKO015416: to=<>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31575, relay=server1., dsn=5.0.0, stat=Service unavailable
Nov 21 13:18:25 server2 sendmail[15416]: rALCIPKO015416: rALCIPKP015416: return to sender: Service unavailable
Nov 21 13:18:25 server2 sendmail[15416]: rALCIPKP015416: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32599, dsn=2.0.0, stat=Sent
This is a part of the
define(`SMART_HOST', `server1')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=localhost, Name=MTA')dnl
and the access file:
localhost.localdomain RELAY
localhost RELAY RELAY

Any clue ?

Thanks in advance..
Old 11-21-2013, 06:09 PM   #2
Ser Olmy
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 2,463

Rep: Reputation: Disabled
Could be related to name resolution.

Does this command return server1's IP address when run on server2:
host server1
Old 11-21-2013, 08:07 PM   #3
Senior Member
Registered: Mar 2012
Posts: 1,490

Rep: Reputation: 390Reputation: 390Reputation: 390Reputation: 390
Presumably you need to add an exemption for server2 to be able to relay without auth in "the access file". (maybe? - sendmail is not my bag).
It currently seems, to me, to only allow RELAYing from itself.


mail, sendmail

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
"nmcli con" failed "Can't obtain connections: settings service is not running." parcox Slackware 2 08-14-2012 04:26 PM
from where the message " Service Unavailable - Zero size object " is comming ratotopi Linux - Software 0 06-21-2012 05:29 PM
Logs filling up with "smbd/service.c:make_connection" - "couldn't find service" DumbTerminal Linux - Networking 14 07-16-2007 06:33 AM
qmail "smtp service not running" saini_mw Linux - Software 3 08-21-2006 01:43 PM
What is a good "pop before smtp relaying," Program? gsmonk Linux - Networking 2 04-09-2003 05:38 AM > Forums > Linux Forums > Linux - Server

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

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