Hi,
I have setup a VMWare network of servers locally. I have installed DNS and AD services on one of the server. I have also added smtp services using smartermail server on the same server. I am able to telnet to port 25 of that server successfully. But I am not able to send email using the powershell scripts as shown below
$smtp = New-Object Net.Mail.SmtpClient("dc.contoso.com")
$smtp.Send("user1@contoso.com","user2@contoso.com","Test Email","This is a test") but i get this error
"Exception calling "Send" with "4" argument(s): "The operation has timed out."
At line:1 char:11
+ $smtp.Send <<<< ("user1@contoso.com","user2@contoso.com","Test Email","This is a test")
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException"
Also I am unable to do a nslookup on that server itself for the local address and it is getting timed out.
C:\Users\Administrator>nslookup dc.contoso.com
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.1.1
Name: dc.contoso.com
Address: 192.168.1.1
But I am able to ping and telnet successfully
C:\Users\Administrator>ping dc.contoso.com
Pinging dc.contoso.com [::1] with 32 bytes of data:
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Reply from ::1: time<1ms
Ping statistics for ::1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
telnet dc.contoso.com 25
220 dc.contoso.com
=============================================
Please help me as I have broken my head on this from long but not able to fix it.
Update
==============
I was able to fix this temporarily by changing the Network of the AD from NAT to VMNet8 (which is also a NAT). Using the Virtual Network editor, I was able to change the DNS timeout value which fixed this issue but then I did a lot of other changes and this again seems to have broken and I am not at all able to fix it again. I have manually hardcoded the IP for all servers and not used DHCP. I also used the method here to clear the IP tables but no use (It did fixed ny issue of me unable to ping). http://www.corenetworkz.com/2011/08/ping-transmit-failed-general-failure.html
Now all myy servers are connected in VMNet8 configuration. I am using smartermail version 10.
If I can just now how to change the DNS timeout value from the default 2 seconds to my own custom value, I think then this issue will be solved. Please note it is just a test environment for my own learning of setting up a sharepoint farm. I just want to connect my sql, and sharepoint servers with the AD (which also has DNS and SMTP services) and I have done that. All servers can contact each other but it is not able to send mail using powershell or using HELO commands.
Only issue is that I am not able to send the email using the smtp services because of the DNS timeout value and I am sure of it. I do not know how to configure a reverse DNS as well so I have not done it.