Tip of the week: When trying to send email using UTL_SMTP in RedHat Linux Server getting following error
ORA-29278: SMTP transient error: 421 Service not available
The
"ORA-29278: SMTP transient error: 421 Service not available" error
indicates that the problem is due to database server's network
configuration not allowing it to contact an external server.
Solution:
We found sendmail
to use a smart host was not setup caused the error. Below steps should
give you the needed details to setup and as well as check the
configuration.
In your /etc/mail/sendmail.mc file there should be a line as follows:
dnl define(`SMART_HOST',`smtp.your.provider')
Remove
the "dnl" section and replace "smtp.your.provider" with the fully
qualified domain name of the smart host you wish to use so that the line
reads:
dnl define(`SMART_HOST',`smtp.your.provider')
Generate a new sendmail.cf file by running
# cd /etc/mail
# m4 sendmail.mc > sendmail.cf
This will generate the .cf upon restarting the sendmail by
# service sendmail restart
However you can manually do this with the following command: make -C /etc/mail
If you still experience the error, perform the following diagnostics steps.
1. The first step is to send a message from the server you made the changes on.
[root@rhbox mail]# echo test1|mail -s test1 sunthar@oracletechnologistblog.com
2. The next step can be done on the server.
Once the message is sent you will want to tail or grep /var/log/maillog for the relevant email that was just sent.
Nov
11 09:51:14 aloha sendmail[31900]: pABEpEiF031898:
to=<sunthar@oracletechnologistblog.com>,
ctladdr=<root@dsunthar@oracletechnologistblog.com> (0/0),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=120370,
relay=smtp.host.com. [10.180.1.103], dsn=4.0.0, stat=Deferred: Connection refused by smtp.host.com.
3. From the error message, its imperative that you need to open up the firewall to allow smtp.
Once thats resolved, you should be good to go.
Useful MOS note.
ORA-29278: SMTP transient error: 421 Service not available" When Using UTL_SMTP to Send Email [ID 604763.1]
No comments:
Post a Comment