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


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


Viewed 1000+ times

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?


  (1 rating)


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"
Resolving host . . . done.
Connecting to . . . connected.
220 ESMTP Postfix
>>> EHLO poc-opc
250-SIZE 133120000
250 DSN
334 VXNlcm5hbWU6
>>> bGlsaWFuYS5yaXZlcmFAc3lzdGVtc3AycC5jb20=
334 UGFzc3dvcmQ6
>>> S2EzeTc3biE=
235 2.7.0 Authentication successful
>>> MAIL FROM:<root@poc-opc>
250 2.1.0 Ok
>>> RCPT TO:<>
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