views:

5566

answers:

4

I am trying to setup windows server 2008 smtp server to relay emails to gmail smtp. Everything appears to be setup but it is not sending emails. Could you please help me figure out whats wrong.

Below is the setup:

  • Windows server 2008 with SMTP server feature installed. Need SMTP server to forward all messages to gmail smtp server to send.
  • I have google apps setup for my domain, also I can send emails throught my test app using
    gmail smtp.
  • SMTP Server Configuration: By default has default smtp server virtual directory.
  • In Properties of that virtual smtp server changed following.

  • Fully qualified domain name = mydomain.com

  • smart host = smtp.gmail.com
  • TCP Port = 587
  • Out Bound Security = Basic Authentication(my username password for google apps email account)
  • In domains list under virtual smtp server. I have one default domain that's server dns. I added another one for my domain name.

With above setup i am trying to redirect all email to gmail smtp. I tested connection to smtp.gmail.com from server on port 587 through telnet and it works.

I am trying to use above server from my web application also by just dropping emails in pickup directory. It get's picked up and also accepts request form web application but never sends an email.

I can see that it adds those emails in queue folder but it stays there forever.

When i try to send emails from web app to above server it rejects if To address is other than my domain.(Am i missing something in list of domains)

+1  A: 

Hi, This souds like a DNS issue. Check your /badmail directory. It will have .bad and .bdp files in there. You can open these in notepad (there will be some binary in there).

However, it may point to the possible problem.

You may also want to try and enable logging on the SMTP service. There may be something in there.

Cheers!

Dave

www.advancedintellect.com

dave wanta
I checked bad mail folder there is nothing in there. All emails are in queue folder, nothing is being picked up.
mamu
Ok, let's verify something. If you move one of those emails to the /pickup directory, does it immediately get moved back to the queue directory? If so, then we know that part of your IIS SMTP service is working correctly.
dave wanta
Yes it instantly get moved to queue from pickup
mamu
Ok, that means that the SMTP service is working. Something else is blocking outgoing SMTP connections. Possible scenario might be blocking firewall, virus scanner, or DNS failures. Check the event log for some ideas. Sometimes it will say something like "failed xxxx domain" or something like that.
dave wanta
Try opening the firewall on that machine to allow all traffic, and see if that resolves it. Then you can narrow down which port is the problem.
Bravax
+1  A: 

Possible reasons are that some SMTP servers block the outgoing messages if there domain name mismatch, possible to prevent spam mails from being sent. So for example, I will not be able to send my email with an address [email protected] from my domain yourdomain.com.

Hope that helps.

Ram
+1  A: 

Ensure your sending domain is the same as the google apps domain

Ensure your sending address is a real address and not just an alias

IIRC you need to use STARTTLS (SSL) not basic authentication

TFD
+1  A: 

Thanks for all answers, finally found solution there is a property for maximum sessions which value was 0 by default. Changed it to 100 and it send all pending emails immediately.

mamu

related questions