My Oracle Support Banner

Sendmail fails with error "Deferred: Connection refused by []" (Doc ID 2670038.1)

Last updated on JULY 09, 2020

Applies to:

Oracle Compute Cloud Service - Version N/A to N/A
Linux OS - Version Oracle Linux 6.0 to Oracle Linux 7.7 [Release OL6 to OL7U7]
Linux x86-64


Sendmail fails while mail sent through localhost instead of DNS

echo "Test" | mailx -v -s "Test Mail" Connecting to [] via relay... Deferred: Connection refused by []           <------ Fails 

echo "Test" | mailx -v -s "Test Mail" -S smtp=""
Resolving host . . . done.
Connecting to . . . connected.
220 <ID> ESMTP
>>> HELO <hostname>
250 <ID>
>>> MAIL FROM:<hostname>
250 sender <hostname> ok
>>> RCPT TO:<>
250 recipient <> ok
>>> DATA
354 go ahead
>>> .
250 ok: Message xxxxxxx accepted
>>> QUIT
221 <ID> 


 Server was upgraded from Oracle Linux 5 to Oracle Linux 6


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.