x

Unable to send mail through DB mail in clustered environment

Hi Experts,

We have 2 node sql server cluster in our production environment and one stand alone sql server machine in the same network.We are able to configure and send mail successfully from DB mail on stand alone server but the same configuration is not working on clustered sql instance.I also tried with creating an alias to virutal IP address being used in clustering but still I am getting the same error.

The error I receive is as follows -

Message

The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 7 (2010-10-28T17:38:25). Exception Message: Cannot send mails to mail server. (Transaction failed. The server response was: 5.7.1 appsupport@arshiyainternational.com: Relay access denied).
more ▼

asked Nov 04, 2010 at 01:50 AM in Default

Hemant gravatar image

Hemant
277 12 12 14

what version of SQL Server? What OS?
Nov 04, 2010 at 01:55 AM Fatherjack ♦♦
We are using sql server 2005 standard edition SP2 and windows server 2003 enterprise edition SP2.
Nov 04, 2010 at 02:12 AM Hemant
(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first
This is a setup issue on the mail server side, most likely. Take the IP addresses for the SQL Server, virtual IP for the instance, and the IP addresses for the physical nodes. Ensure they set up where you can mail to that domain (if it's internal) or relay (if it's not) from those IP addresses.
more ▼

answered Nov 04, 2010 at 01:59 AM

K. Brian Kelley gravatar image

K. Brian Kelley
933 2

(comments are locked)
10|1200 characters needed characters left

The error message 'Relay access denied' suggests that the mail server is rejecting your SQL server ip address as a valid source of email traffic (SMTP). It is good practice not to have your email server allowing relaying from any sources, as they can be compromised in spam attacks.

I would check to see if the stand alone server is allowed, but the cluster isn't.
more ▼

answered Nov 04, 2010 at 02:03 AM

Kev Riley gravatar image

Kev Riley ♦♦
53k 47 49 76

I checked with stand alone server in the same network,where I am able to send mail successfully.I've few more stand alone servers from where I send mail successfully on daily basis.I am getting this error only from clustered instance.I suppose,had the problem been with SMTP server,I would not have been able to send mail from any stand alone server.
Nov 04, 2010 at 02:25 AM Hemant
not neccesarily...the issue could still be with allowing relaying on the SMTP server. Also is the cluster behind any kind of firewall (between it and the SMTP server)?
Nov 04, 2010 at 02:45 AM Kev Riley ♦♦
Hemant, this isn't correct. Usually the permission to relay is configured based on IP. So it's entirely possible that the stand-alone server has been approved while none of the IPs from the cluster are.
Nov 04, 2010 at 01:24 PM K. Brian Kelley
(comments are locked)
10|1200 characters needed characters left
the problem isn't in clustering but most mail servers denies smtp from dbmail the only solution to ask your smtp provider do relay dbmail
more ▼

answered Nov 04, 2010 at 02:00 AM

Baligh gravatar image

Baligh
21

It's not dbmail that's being blocked from relaying. You block or allow by IP address or IP address block. And according to best practices, by default you block relay by everybody and whitelist the IPs you want to allow to relay. Preferably you also set up authentication as well.
Nov 04, 2010 at 02:08 AM K. Brian Kelley
i thing relaying is depending on both IP and application because i faced a situation that i could send mails from outlook but couldn't from dbmail from the same pc another issue is that most mail servers allow finite number of messages per an hour but if you ask the support team they raise the limit for you
Nov 04, 2010 at 02:18 AM Baligh
Outlook doesn't use SMTP. It uses MAPI. And there you have an authenticated connection. DBMail uses SMTP. The relay prevention is on the SMTP side. When you connect via SMTP, there are no SMTP commands to specify app. It's irrelevant. Look at the SMTP transport example here and you'll see: http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
Nov 04, 2010 at 01:22 PM K. Brian Kelley
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x1947
x92
x29

asked: Nov 04, 2010 at 01:50 AM

Seen: 2633 times

Last Updated: Nov 04, 2010 at 03:08 AM