Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Intermittent 421 errors using UTL_SMTP

Re: Intermittent 421 errors using UTL_SMTP

From: Roman Podshivalov <>
Date: Mon, 22 Oct 2007 13:59:18 -0400
Message-ID: <>


The error in question comes from your Exchange server. So you have to dig this in Exchange side.

See snippet below regarding SMTP return codes:

SMTP Reply Codes

See rfc2821 <> for the basic specification of SMTP; see also
rfc1123<>for important additional information.

See rfc1893 <> and rfc2034<>for information about enhanced status codes.
*SMTP Reply Codes List* *Code* *Description* 200 success response 211 System status, or system help reply 214 Help message 220 <domain> Service ready 221 <domain>
Service closing transmission channel 250 Requested mail action okay, completed 251 User not local; will forward to <forward-path> 354 Start mail input; end with <CRLF>.<CRLF> 421 <domain> Service not available, closing transmission channel 450 Requested mail action not taken: mailbox unavailable 451 Requested action aborted: local error in processing 452 Requested
action not taken: insufficient system storage 500 Syntax error, command unrecognized 501 Syntax error in parameters or arguments 502 Command not implemented 503 Bad sequence of commands 504 Command parameter not implemented 521 <domain> does not accept mail (see rfc1846) 530 Access denied () 550 Requested action not taken: mailbox unavailable 551 User not local; please try <forward-path> 552 Requested mail action aborted: exceeded storage allocation 553 Requested action not taken: mailbox name not allowed 554 Transaction failed


On 10/22/07, Rich Jesse <> wrote:
> Hey all,
> I have a few PL/SQL procedures in on AIX 5.3 that indirectly
> use
> UTL_SMTP to send out email (duh) through our Exchange server. The package
> that my procedures use to call UTL_SMTP is a slightly improved version of
> "maildemo.sql" (Google it).
> While this works fine most of the time, I have one weekly DBMS_SCHEDULER
> job
> that now consistently fails, while the other ten jobs work flawlessly.
> However, when I manually run the weekly job after a fail, it usually works
> (this morning I needed to run it twice). Since only this job fails, all
> other jobs work, and all jobs use the same entry point to UTL_SMTP, I
> believe that the mail server and related variables are correctly set.
> Here's the important part of the error stack:
> ORA-29278: SMTP transient error: ORA-29278: SMTP transient error: 421
> Service not available
> ORA-06512: at "SYS.UTL_SMTP", line 21
> ORA-06512: at "SYS.UTL_SMTP", line 97
> ORA-06512: at "SYS.UTL_SMTP", line 342
> ORA-06512: at "RICH.MAILDEMO", line 332
> UTL_SMTP is wrapped, so I can't say what those lines are, but the line my
> package fails on (called "RICH.MAILDEMO" here) is calling
> This seems to happen when the instance has a lot of activity, but IMHO
> nowhere near peak. As I don't have visibility to the Exchange server
> performance, I can't speak to that. Also, I see that the parameter
> "tx_timeout" in the call to UTL_SMTP.OPEN_CONNECTION is not present, which
> should default to a NULL, or "wait indefinitely", according to the docs.
> There is also mention in the package comments that this parameter may not
> affect writes as documented, but it doesn't say what the implemented
> handling is. Finally, since this is from a DBMS_SCHEDULER job, I don't
> believe it would qualify for BUG 4083461.
> Anyone have some ideas on how to troubleshoot this? While it's not a
> priority, the intent of the job is to automate the report, which it's now
> not doing...
> TIA!
> Rich
> --

Received on Mon Oct 22 2007 - 12:59:18 CDT

Original text of this message