Solved

Troubleshooting database mail (SMTP relay issue?)

Posted on 2007-11-14
9
4,548 Views
Last Modified: 2013-12-25
When trying to use database mail, I get an error whenever I send test mail outside the domain of the originating address. The error is: The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-11-14T08:57:20). Exception Message: Cannot send mails to mail server. (Transaction failed. The server response was: 5.7.1 <xxx@yyy.net>: Relay access denied).

The database server is outside the ISP. The mail is configured with a sender address from a domain hosted by the ISP, and a reply-to outside the domain.

When I send a test e-mail, it succeeds for destinations with the same domain as the sender; it fails for e-mail in all other domains tested.

My ISP has specifically white-listed the database server IP for SMTP relaying.

Any suggestions as to how to resolve this issue?
0
Comment
Question by:Jeff Certain
  • 5
  • 4
9 Comments
 
LVL 31

Expert Comment

by:rid
ID: 20281025
Might be the receiving end server that has objections. Do you have a reverse DNS lookup that works for this mail server? Does it say HELO properly?
/RID
0
 
LVL 24

Author Comment

by:Jeff Certain
ID: 20281288
Reverse DNS for the receiving mail server or the sender? And how would I check if it says HELO?
0
 
LVL 31

Expert Comment

by:rid
ID: 20281364
Reverse DNS for your server, the sending. Most servers check this for incoming mail, some reject out of hand if not correct.

The SMTP dialogue begins with a HELO command. The initiator should say something like: "helo mail.domain.com" and the name should correspond to DNS entries. If not correct in syntax or content, the session may be terminated by some servers.
/RID
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 24

Author Comment

by:Jeff Certain
ID: 20281404
I know the IP for the sender. This is the IP address that the ISP owning the mail server has explicitly white-listed for SMTP relay.

To clarify, are you saying that the receiving mail server may also check this, and bounce mail if the originating IP is not the same as the SMTP mail server domain DNS entry?
0
 
LVL 31

Expert Comment

by:rid
ID: 20284480
Yes. Receiving end server may check that the IP has a domain name associated with it and that it is the correct one. A failure in this check will often cause a server to reject incoming message. (for good reasons, I may add... It's a SPAM prevention method).
/RID
0
 
LVL 24

Author Comment

by:Jeff Certain
ID: 20284506
So, it sounds like it's really in my best interest to ensure that the SQL database appears to have the same IP as the mail server... ?

Would this failure appear as "relay access denied" in Database Mail for SQL2005? It seems like that kind of error would occur before delivery... somewhere at the relaying server.
0
 
LVL 31

Expert Comment

by:rid
ID: 20287612
Hmm, I may not have been understanding the problem properly.

Is the origin of the mail this database server? Is it sitting outside your domain?
Does the DB server try to send mail via your mail server to an outside address and that operation fails?

If "Yes" on these, the problem may be that your mail server is properly configured NOT to send from an external sender to another external address; that would constitute an open relay. Does your mail server act as it should for ordinary mail?

The solution to this (if my assumptions are correct) may be to make the DB server a trusted sender, by means of some kind of authentication (e.g. SMTP-AUTH). No need for tricks with the IP.
/RID
0
 
LVL 24

Author Comment

by:Jeff Certain
ID: 20288546
The database server originates the mail. It is co-located with one ISP.

The mail server belongs to a second ISP.

The database server sends the e-mail via the mail server. This fails for outside addresses.

The mail server has the database server IP specifically white-listed to permit relaying. In addition, I am using SMTP authentication, which succeeds for mail within the mail server's domain.

The mail server works normally for all normal e-mail.
0
 
LVL 24

Accepted Solution

by:
Jeff Certain earned 500 total points
ID: 21702747
Still baffled. Nothing I tried worked. I ended up writing a monitor process to resend e-mail as required.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Stuck in INIT/DROTHER 2 49
Sharing same loopback address on different switches 1 47
Fiber optic multimode cable issue 6 53
BGP recommended setup with failover 2 44
Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question