Home » SQL & PL/SQL » SQL & PL/SQL » ORA-29279: SMTP permanent error: Unable to relay (Oracle 10g)
ORA-29279: SMTP permanent error: Unable to relay [message #519697] Tue, 16 August 2011 06:32 Go to next message
sarfarazahmedv
Messages: 6
Registered: August 2011
Location: India
Junior Member
Hi,
I have a requirement wherein I need to send mail to external servers (customers). I am currently using the below UTL_MAIL standard package. This works fine when sending across internally within our organization; while I am unable to send to external server. Though I have seen others had a similar issue in forum but could'nt find useful. Could anybody advise if there is any configuration missout from database or mail server needs to be done. Any quick help will be highly appreciate.

BEGIN
--
UTL_TCP.CLOSE_ALL_CONNECTIONS;
--
EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server =''mail server ip address''';
--
sys.UTL_MAIL.send(sender => 'mymailid@xyz.com',
recipients => 'recepient@gmail.com',
subject => 'Test Mail',
message => 'Hello Mail,
mime_type => 'text; charset=us-ascii'
);
--
dbms_output.put_line('Mail Sent Successfully ');
END;

Following is the error:

ORA-29279: SMTP permanent error: 550 5.7.1 Unable to relay
ORA-06512: at "SYS.UTL_SMTP", line 20
ORA-06512: at "SYS.UTL_SMTP", line 98
ORA-06512: at "SYS.UTL_SMTP", line 240
ORA-06512: at "SYS.UTL_MAIL", line 405
ORA-06512: at "SYS.UTL_MAIL", line 599

P.S: We are using (Microsoft Exchange Server 2007) as mail server.

Thanks
Re: ORA-29279: SMTP permanent error: Unable to relay [message #519699 is a reply to message #519697] Tue, 16 August 2011 06:49 Go to previous messageGo to next message
Michel Cadot
Messages: 65169
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Here Oracle is the victim not the culprit and the root cause is external to Oracle.
Investigate with your sysadmin.
First are you able to send an email to external customers from the database server sendmail?

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version, with 4 decimals.


Regards
Michel
Re: ORA-29279: SMTP permanent error: Unable to relay [message #579791 is a reply to message #519697] Fri, 15 March 2013 07:18 Go to previous messageGo to next message
niranjanbabu Dama
Messages: 2
Registered: March 2013
Location: Hyderabad
Junior Member
THIS IS SUCH A SIMPLE PROBELEM , FIRST YOU SHOULD CROSS CHECK THE MAIL idS AND ENSURE THAT THE MAIL IDS YOU HAVE GIVEN ARE CORRECT INCLUDING DOMAIN NAME.I COULD ABLE TO SOLVE THIS ISSUE IN THIS WAY ONLY ..SOME TIMES THE DOMAIN WE MAY GIVE WRONGLY..FOR INSTANCE WE NEED TO GIVE MAIL SENDER ID AS NIRANJANDAMA@GMAIL.COM AND RECIEPENT AS NIRANJANDAMA@YAHOO.COM
BUT BY MISTAKE IF YOU GIVE SENDER ID AS NIRANJANDAMA@YAHOO.COM AND RECIEPENT AS NIRANJANDAMA@GMAIL.COM ,IT WILL GIVE AN ERROR LIKE THIS FOR SURE,...PLEASE DOUBLE CHECK THE MAIL IDS.
Regards
Niranjanbabu Dama.

[Updated on: Fri, 15 March 2013 07:32]

Report message to a moderator

Re: ORA-29279: SMTP permanent error: Unable to relay [message #579796 is a reply to message #579791] Fri, 15 March 2013 07:56 Go to previous messageGo to next message
joy_division
Messages: 4777
Registered: February 2005
Location: East Coast USA
Senior Member
This response is of no help.

1. It is all in caps, and difficult to read.
2. Do you really think the OP is so inept that they didn't realize if they put in a bad email address?
3. Michel already gave the correct response by asking the sysadmin to look into the problem as it is not an Oracle problem. The server needs to have external emailing enabled.
Re: ORA-29279: SMTP permanent error: Unable to relay [message #579800 is a reply to message #579796] Fri, 15 March 2013 08:31 Go to previous messageGo to next message
niranjanbabu Dama
Messages: 2
Registered: March 2013
Location: Hyderabad
Junior Member
i am very much sure that my suggestion will help u out...if it is not helpful ..please dont follow it..thanks and regards

Niranjanbabu Dama.
Re: ORA-29279: SMTP permanent error: Unable to relay [message #579805 is a reply to message #579800] Fri, 15 March 2013 08:58 Go to previous messageGo to next message
sarfarazahmedv
Messages: 6
Registered: August 2011
Location: India
Junior Member
Thanks for response. As Michel said that was the issue setup with Exchange Server.

Thanks
Re: ORA-29279: SMTP permanent error: Unable to relay [message #623113 is a reply to message #579800] Thu, 04 September 2014 13:12 Go to previous messageGo to next message
callcybercop
Messages: 1
Registered: July 2005
Junior Member
Nothing to do with the mail ids, it's probably a blip with the Exchange Server external connections.
Re: ORA-29279: SMTP permanent error: Unable to relay [message #623115 is a reply to message #623113] Thu, 04 September 2014 14:07 Go to previous messageGo to next message
Bill B
Messages: 1687
Registered: December 2004
Senior Member
Most companies will not allow an external user to relay through there systems. Send any email using your own companies smtp gateway. But even relay for internal users must be turned on in exchange.
Re: ORA-29279: SMTP permanent error: Unable to relay [message #623116 is a reply to message #623115] Thu, 04 September 2014 14:10 Go to previous messageGo to next message
BlackSwan
Messages: 25639
Registered: January 2009
Location: SoCal
Senior Member
This is a THREE year old thread which gets repeatedly resurrected & hijacked by newbies
Re: ORA-29279: SMTP permanent error: Unable to relay [message #623117 is a reply to message #623116] Thu, 04 September 2014 14:10 Go to previous messageGo to next message
Bill B
Messages: 1687
Registered: December 2004
Senior Member
sorry, only checked the last message. lol

[Updated on: Thu, 04 September 2014 14:10]

Report message to a moderator

Re: ORA-29279: SMTP permanent error: Unable to relay [message #623118 is a reply to message #519697] Thu, 04 September 2014 14:33 Go to previous messageGo to next message
Solomon Yakobson
Messages: 2657
Registered: January 2010
Location: Connecticut, USA
Senior Member
Error says it all. You are trying to send email from mymailid@xyz.com to recipient@gmail.com. So there can be two scenarios: mail server is servicing @xyz.com or something else, e.g. @abc.com. In both cases email either comes from outside, is going outside or both. This is called relaying. If you have first scenario, you should find out not just any mail server, but one that is configured to allow relaying emails outside. If you have second scenario, I doubted you can find an email server - who would allow outside users using their email server?

SY.
Re: ORA-29279: SMTP permanent error: Unable to relay [message #664795 is a reply to message #519697] Fri, 04 August 2017 15:11 Go to previous messageGo to next message
Rhian
Messages: 1
Registered: August 2017
Junior Member
Hi!
I just want to confirm that I had a site report this issue with me and found the solution on this thread.
The reason their error was presented was simply because there was a typo in the domain
After they amended it, the error went away and their email sent successfully.
Re: ORA-29279: SMTP permanent error: Unable to relay [message #664796 is a reply to message #664795] Fri, 04 August 2017 19:16 Go to previous message
BlackSwan
Messages: 25639
Registered: January 2009
Location: SoCal
Senior Member
This is now a SIX year old thread which gets repeatedly resurrected & hijacked by newbies on an issue that has ZERO to do with Oracle DB
Previous Topic: Need SQL query
Next Topic: UPDATE query
Goto Forum:
  


Current Time: Mon Sep 25 21:09:36 CDT 2017

Total time taken to generate the page: 0.01829 seconds