LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 11-21-2013, 07:36 AM   #1
Mycado
Member
 
Registered: Jun 2006
Location: Paris, France
Distribution: Debian, CentOS
Posts: 66

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


Hello,

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:

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

Code:
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: from=PDMS_REC@company.com, size=15, class=0, nrcpts=1, msgid=<201311211218.rALCIPpV015413@server2.dc.infra.com>, relay=root@localhost
Nov 21 13:18:25 server2 sendmail[15414]: rALCIPKO015414: from=<PDMS_REC@company.com>, size=326, class=0, nrcpts=1, msgid=<201311211218.rALCIPpV015413@server2.dc.infra.com>, proto=ESMTP,daemon=MTA, relay=server2 [127.0.0.1]
Nov 21 13:18:25 server2 sendmail[15413]: rALCIPpV015413: to=test@ext.company.com, ctladdr=PDMS_REC@company.com (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30015, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (rALCIPKO015414 Message accepted for delivery)
Nov 21 13:18:25 server2 sendmail[15416]: rALCIPKO015414: to=<test@ext.company.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120326, relay=server1. [10.89.129.77], 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=<PDMS_REC@company.com>, 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 sendmail.mc:
Code:
LOCAL_DOMAIN(`localhost.localdomain')dnl
define(`SMART_HOST', `server1')dnl
DAEMON_OPTIONS(`Port=smtp,Addr=localhost, Name=MTA')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MASQUERADE_AS(`company.com')dnl
and the access file:
Quote:
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY

Any clue ?

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

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

Does this command return server1's IP address when run on server2:
Code:
host server1
 
Old 11-21-2013, 09:07 PM   #3
descendant_command
Member
 
Registered: Mar 2012
Posts: 861

Rep: Reputation: 193Reputation: 193
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.
 
  


Reply

Tags
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 05:26 PM
from where the message " Service Unavailable - Zero size object " is comming ratotopi Linux - Software 0 06-21-2012 06:29 PM
Logs filling up with "smbd/service.c:make_connection" - "couldn't find service" DumbTerminal Linux - Networking 14 07-16-2007 07:33 AM
qmail "smtp service not running" saini_mw Linux - Software 3 08-21-2006 02:43 PM
What is a good "pop before smtp relaying," Program? gsmonk Linux - Networking 2 04-09-2003 06:38 AM


All times are GMT -5. The time now is 01:56 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