Enterprise Software Thread, Exchange 2010 relay error in Technical; I'm having problems configuring relaying on Exchange 2010.
Right, I've got an intranet page written in asp .net that sends ...
22nd March 2011, 03:11 PM #1
Exchange 2010 relay error
I'm having problems configuring relaying on Exchange 2010.
Right, I've got an intranet page written in asp .net that sends an email to a group of addresses stored in an access database. The problems start when the page tries to send emails outside of the domain, sending emails internally work fine.
The error message is:
In EMC I've made a receive connector and set the network tab to receive mail from the local machine IP as per instructions here Allow a Server to Relay Email in Exchange 2007 and 2010 | Techieshelp.com |IT Problems (funny enough this page is now blocked when it was working fine this morning). Using telnet I can send an email using SMTP commands so I can't see what the problem is
Server Error in '/' Application
Mailbox unavailable. The server response was: 5.7.1 Unable to relay
IDG Tech News
22nd March 2011, 03:41 PM #2
- Rep Power
I saw this , which is scarily my website so registered so I could help, if you are relaying externally then try adding anonymous aswell as exchanger servers to the connector
22nd March 2011, 03:42 PM #3
Have you checked on that Recieve Connector the Authentication and Permission Groups tab?
What do you have there?
Have you tried only selecting Externally Secured under Authentication (or possibly Intergrated Windows Authentication) and under Permission Groups, try ticking Anonymous as a test:
EDIT: Beat me to it by one minute Techieshelp :P
22nd March 2011, 03:46 PM #4
- Rep Power
lol, only becasue your forum notified my website. I agree though, anonymous settings will resolve this.
Originally Posted by tarquel
22nd March 2011, 04:33 PM #5
I don't know what's wrong with this, it seems like I've tried every combination of setting. So on Authentication tab I only have Externally Secured checked and the Permission tab has Anonymous Users checked and Exchange Servers checked.
22nd March 2011, 05:24 PM #6
I suppose it also depends on what the site itself is doing....
How about ticking Exchange Users on the last tab.
22nd March 2011, 06:27 PM #7
Can you configure the custom connector that you have created to so that under "Permissions Groups" Tab you have "Exchange Servers" selected only and on the "Authntication" Tab you have "Externally Secured" and "Transport Layer Security (TLS)".
Then can you restart the MS Exchange Transport service and test.
23rd March 2011, 08:35 AM #8
Wait a minute... do you mean I have to restart the Exchange Transport service after each change of the connector? I've not been doing that!
Originally Posted by sukh
23rd March 2011, 08:45 AM #9
Not after every change. If you configure as above and then restart the Exchange Transport Service and test, if it fails, we can look into further.
23rd March 2011, 10:57 AM #10
Ok, I think the additional connector is a red herring as I've removed it and restarted the Exchange Transport connector and I still get the same error.
So now I have a client connector listening on port 587 with permission group Exchange Users and the ISP connector listening on port 25 with permission groups set to anonymous users.
The access database contains 2 email addresses, my school address and my home address.
Here's the code and to recap I only get the error when sending to an external address:
Protected Sub SendButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SendButton.Click
'Create a connection string
Dim connString As String
connString = "PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=C:\Inetpub\Newsletter\Newsletter-test.mdb;"
'Open a connection
Dim objConnection As OleDbConnection
objConnection = New OleDbConnection(connString)
'Specify the SQL string
Dim strSQL As String = "SELECT Name, Email_Address FROM tblMembers"
'Create a command object
Dim objCommand As OleDbCommand
objCommand = New OleDbCommand(strSQL, objConnection)
'Get a datareader
Dim objDataReader As OleDbDataReader
objDataReader = objCommand.ExecuteReader(CommandBehavior.CloseConnection)
Dim i As Integer
Dim sName As String
Dim mailServerName As String = "gc"
Dim too As String
Dim from As String = "firstname.lastname@example.org"
Dim subj As String = "Latest newsletter"
Dim body As String
Dim sendcount As Integer = 0
For i = 0 To (objDataReader.FieldCount - 1) Step 2
sName = objDataReader.GetValue(i)
too = objDataReader.GetValue(i + 1)
body = "Insert message here"
Dim message As MailMessage = New MailMessage(from, too, subj, body)
Dim mailClient As SmtpClient = New SmtpClient
mailClient.DeliveryMethod = SmtpDeliveryMethod.Network
message.IsBodyHtml = False
mailClient.Host = mailServerName
sendcount += 1
'Close the datareader/db connection
ProgressLabel.Text = "Finished sending. Sent to " & Convert.ToString(sendcount) & " recipients"
23rd March 2011, 02:31 PM #11
On your client connector can you set the "Permission Group" tab to "Anonymous users" and "Exchange servers".
And the "Authentication" tab to "TLS" & "Basic Authentication" & "Offer Basic AUthentication only after starting TLS" & "Exchange Server authentication"
The ISP connector, I assume this is your send connector?
Last edited by sukh; 23rd March 2011 at 02:34 PM.
23rd March 2011, 02:57 PM #12
No, it's the receive connector.
Originally Posted by sukh
The point I was trying to make above is that I don't need to change the connector settings because the intranet page can send email to internal users so that proves it's talking to Exchange ok.
23rd March 2011, 05:07 PM #13
Can you run and post/pm the following.
Get-ReceiveConnector |fl >c:\Receive.txt and Get-ReceiveConnector | Get-ADPermission |fl >c:\permisson.txt.
23rd March 2011, 08:56 PM #14
OK but I'm not back there till next week so I'll do it then.
Originally Posted by sukh
By faza in forum How do you do....it?
Last Post: 5th November 2010, 08:00 AM
By craigg in forum Windows Server 2000/2003
Last Post: 20th October 2010, 02:10 PM
By Ric_ in forum General Chat
Last Post: 20th August 2010, 09:36 AM
By mb2k01 in forum Windows Server 2008 R2
Last Post: 15th January 2010, 09:43 AM
By CyberNerd in forum *nix
Last Post: 14th September 2006, 10:37 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)