Jobos Posted March 22, 2011 Posted March 22, 2011 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: Server Error in '/' Application Mailbox unavailable. The server response was: 5.7.1 Unable to relay 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
techieshelp Posted March 22, 2011 Posted March 22, 2011 Hi Jobos, 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 thanks Allen
tarquel Posted March 22, 2011 Posted March 22, 2011 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
techieshelp Posted March 22, 2011 Posted March 22, 2011 lol, only becasue your forum notified my website. I agree though, anonymous settings will resolve this. 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
Jobos Posted March 22, 2011 Author Posted March 22, 2011 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.
tarquel Posted March 22, 2011 Posted March 22, 2011 I suppose it also depends on what the site itself is doing.... How about ticking Exchange Users on the last tab.
sukh Posted March 22, 2011 Posted March 22, 2011 Hi 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. Sukh
Jobos Posted March 23, 2011 Author Posted March 23, 2011 Hi Then can you restart the MS Exchange Transport service and test. Sukh 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!
sukh Posted March 23, 2011 Posted March 23, 2011 Hi 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. Sukh
Jobos Posted March 23, 2011 Author Posted March 23, 2011 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) objConnection.Open() '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 = "[email protected]" Dim subj As String = "Latest newsletter" Dim body As String Dim sendcount As Integer = 0 While objDataReader.Read 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 mailClient.Send(message) message.Dispose() sendcount += 1 Next End While 'Close the datareader/db connection objDataReader.Close() ProgressLabel.Text = "Finished sending. Sent to " & Convert.ToString(sendcount) & " recipients" End Sub
sukh Posted March 23, 2011 Posted March 23, 2011 (edited) Hi 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? Sukh Edited March 23, 2011 by sukh
Jobos Posted March 23, 2011 Author Posted March 23, 2011 The ISP connector, I assume this is your send connector? Sukh No, it's the receive connector. 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.
sukh Posted March 23, 2011 Posted March 23, 2011 Hi Can you run and post/pm the following. Get-ReceiveConnector |fl >c:\Receive.txt and Get-ReceiveConnector | Get-ADPermission |fl >c:\permisson.txt. Sukh
Jobos Posted March 23, 2011 Author Posted March 23, 2011 Hi Can you run and post/pm the following. Get-ReceiveConnector |fl >c:\Receive.txt and Get-ReceiveConnector | Get-ADPermission |fl >c:\permisson.txt. Sukh OK but I'm not back there till next week so I'll do it then. Thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now