Skip to Main Content
  • Questions
  • ORA-29278: error transitorio de SMTP: 421 Service not available

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, LILIANA.

Asked: December 15, 2021 - 6:30 pm UTC

Last updated: January 11, 2022 - 3:34 am UTC

Version: 12.1.0.2.0

Viewed 10K+ times! This question is

You Asked

I am trying to create an SP that sends mail about the status of the% of the Tablespaces of an Oracle DB.
However it sends me the following error, (ORA-29278: transient SMTP error: 421 Service not available).
The ACLs were created, the permissions, the communication to the mail server was validated.
But I keep presenting the error.

and Connor said...

"421 Service not available" means your mail request successfully "exited" the database but could not get to the mail server.

Likely causes are

1- incorrect mail server address
2- incorrect port
3- firewall is stopping you from contacting it

In my experience, 3 is the most common because admins don't want "anybody" contacting the mail server to avoid denial of service, spam flood etc.

Things to check - Can you send an email from the command line as oracle on the database server?

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

ORA-29278: error transitorio de SMTP: 421 Service not available

Liliana Rivera Trejo, December 16, 2021 - 6:56 pm UTC

Thanks for your prompt response.

Sending output of the query execution at the OS level.

[root@poc-opc ~]# echo "Tablespaces OPB BD " | mail -v -s "Prueba Test" liliana.rivera@systems.com
Resolving host don1n1004.servwin.mx . . . done.
Connecting to 206.189.200.217:smtps . . . connected.
220 don1n1004.servwingu.mx ESMTP Postfix
>>> EHLO poc-opc
250-don1n1004.servwin.mx
250-PIPELINING
250-SIZE 133120000
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
>>> AUTH LOGIN
334 VXNlcm5hbWU6
>>> bGlsaWFuYS5yaXZlcmFAc3lzdGVtc3AycC5jb20=
334 UGFzc3dvcmQ6
>>> S2EzeTc3biE=
235 2.7.0 Authentication successful
>>> MAIL FROM:<root@poc-opc>
250 2.1.0 Ok
>>> RCPT TO:<liliana.rivera@systems.com>
250 2.1.5 Ok
>>> DATA
354 End data with <CR><LF>.<CR><LF>
>>> .
250 2.0.0 Ok: queued as 260D28A021F
>>> QUIT
221 2.0.0 Bye
Connor McDonald
January 11, 2022 - 3:34 am UTC

That was done as root - can you also do it as the account that owns/runs the database?

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library