Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Exchange Server / Applications / October 2006

Tip: Looking for answers? Try searching our database.

Allowing System.Net.Mail.SmtpClient to send external (relay) mail

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alec MacLean - 06 Oct 2006 15:34 GMT
Hi,

I'm writing a VB.NET 2.0 WinForms app for our company that needs to send
email externally from ourselves (to customers).  We are using Exchange 2003.
My VB code is using the System.Net.Mail.SmtpClient namespace library.

I have come against a problem getting Exchange to allow externally addressed
messages to be sent (relayed from internal to external).

I can happily send messages to any internal recipient (e.g. myself for
testing), but as soon as I try to send to an external address (e.g. my home
email address) I get a 5.7.1 error response; full text = "Mailbox
unavailable. The server response was: 5.7.1 Unable to relay for alec@<...>"
(where <...> is my home email domain).

Looking at the Exchange relay settings, I have the following settings:
Select which computer may relay through this virtual server: Only the list
below.
Allow all computers which successfully authenticate to relay, regardless of
list above (checked).

I have one IP in my allowed computers list, which is my internal LAN IP of
my webserver, which enables it to send mail from various applications.

I _could_ add my client PC to this list (and indeed this works) but I don't
want to be continually changing IP's when users change machines or the DHCP
provided address changes.

I have tried the alternative of not checking the "Allow all computers which
successfully authenticate...", creating an Active Directory security group
which will be granted Relay rights into which I add another security group
which is the application users, then adding this to the specifed Users list
and checking the Submit and Relay boxes, applying all changes, and
restarting the virtual SMTP server.

This gets the same 5.7.1 error.

Other than using the specific IP address approach (which as mentioned, I'd
rather not), what else can I do?
Have I missed something (not) obvious?

Thanks for any help.

Al
Alec MacLean - 06 Oct 2006 15:54 GMT
Just as a follow up, I found a suitable workaround by using the IP list and
adding my subnet group.

I had tried this earlier, but had not tried the critical step of stopping
and restarting the Virtual Server - this makes a big difference!

So now if IP's change (through DHCP or different PC being used), so long as
they are within the defined subnet the client PC can use the app.

Al

> Hi,
>
[quoted text clipped - 41 lines]
>
> Al
Henning Krause - 06 Oct 2006 16:42 GMT
Hello,

you could probably use authentication - that would make you independent to
the IP address..

Best regards,
Henning Krause

> Just as a follow up, I found a suitable workaround by using the IP list
> and adding my subnet group.
[quoted text clipped - 52 lines]
>>
>> Al
Alec MacLean - 12 Oct 2006 11:55 GMT
I was trying to use authentication (via Active Directory groups) in the
first place, but this seems not to work - at least on my server.

> Hello,
>
[quoted text clipped - 12 lines]
>>>
>>> This gets the same 5.7.1 error.
Henning Krause - 13 Oct 2006 16:15 GMT
Hello Alec,

do you have enabled authentication on the mail server?

Please post the code you are using to send the mail. We may be able to find
an error in there.

Best regards,
Henning Krause

>I was trying to use authentication (via Active Directory groups) in the
>first place, but this seems not to work - at least on my server.
[quoted text clipped - 15 lines]
>>>>
>>>> This gets the same 5.7.1 error.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.