I am having a difficult time getting SMTP on Windows 2008 Server to work properly. Need help?

I need someones help to insure that I am setting up SMTP on a Windows 2008 Server correctly.

I have a few applications trying to send emails through a specific SMTP IP address.

I have my websites on one Windows 2008 server (with a unique IP) and I have another Windows 2008 server (with a unique IP) set up just for SMTP purposes.

I also have a very simply PHP script that allows me to set the SMTP IP and the username and password for validation.

When I fill the form out, it seems to work fine .. EXCEPT .. if the FROM field in the form is from a few of my domains (that are on a different server and IP).  But when I don't send it from the domains that seem to be giving me a problem .. it appears to work fine.

NOTE:  Previously I was sending emails through a different SMTP IP (that my web host has set up and uses for the sending of all regular email).  When I used this SMTP I didn't have any problems at all.

So, since I am now having these issues, I am figuring that something with my set up on the Windows 2008 server and the SMTP on the server is most likely the issue, but I don't know how to figure out what's wrong and how to fix it.

I need someone's help.

Please let me know if you can assist.

Thanks
Gary

Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Asked:
Who is Participating?
 
PugglewuggleConnect With a Mentor Commented:
Gary, it sounds like you've got some sort of SPF setup on your domains... I know I mentioned that earlier, but if it works for other domains and doesn't work when sending to yours, that's probably what's going on.
SPF will not allow an SMTP server to send mails if that SMTP server doesn't have an exception rule added to the SPF record OR if it isn't an MX for that domain.

Also, there could be a routing issue or some sort of restriction between the two servers in the datacenter...
Cheers!
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
Further testing and comments:

When I send an email (through my PHP form) .. using an email addres as the FROM FIELD .. (from a couple specific domains) the emails always go in the queue.  And, when I send an email (through the same PHP form) .. using an email address as the FROM FIELD .. (from a different domain) .. the emails always go through and don't get held up in the queue folder.

I am hoping this info helps.  Because it's not my "applications or scripts" that are sending the emails that appear to be a problem.  The problem seems to be related directly to the email address that is set to the FROM field.  So, some domains when used in the FROM field are causing a problem and other domains are not.

Let me know what other questions you might have to help me resolve this.
0
 
placebo69aCommented:
Hi there!
In order to eliminate scripting issues as the source of the problem, can you use telnet to try and send the test emails instead of your php form?
To send an email using telnet enter each of these lines in turn:
telnet smtp_ip_address 25
helo world
send from:sender_email_address
rcpt to:target_email_address
data
.
The last line is simply a dot. Type quit to exit the telnet session.
Once we've made certain the PHP script is not at fault we can check why certain domains aren't being forwarded by your smtp server and how we can persuade it to forward them.
Let me know how it goes. :)


0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
PugglewuggleCommented:
Hi garymgordon,
If you have your DNS for these websites hosted elsewhere, it's possible that the DNS host automatically added something called an SPF (sender policy framework) property to your DNS to prevent SPAM. I've seen this done a few times and it has cause problems, so if it is offsite, please contact your DNS host and see if they did this.
SPF is a technology that lets mail servers verify the identity of the IP address the mail came from. If the source IP address and the domain name in the SPF policy for the domain you're sending mail from don't match then the mail will get rejected.
Here's an article on SPF:
http://en.wikipedia.org/wiki/Sender_Policy_Framework

Please try this first to make sure this isn't the issue and we can work forward from there!
Cheers!
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
Pubblewuggle,

I set up Telnet.

I then entered ..

telnet smtp_ip_address 25

helo world

send from:sender_email_address

but after the last line of "send from:ggordon@garymgordon.com"  (without the quotes) it said 500 5.3.3 Unrecognized command.

Gary
0
 
PugglewuggleCommented:
The actual command to send is MAIL FROM: email@domain.tld
and the command for the recipient is RCPT TO: email@domain.tld
after entering the RCPT TO command if you get something like this:
550 Recipient refused. The sender's domain requires authentication or is not a valid user.

Then you've got an SMTP authentication error on hand.
I guess placebo just made a mistake.
Cheers! Try that!
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
Ok.

Here's what happened so far.

helo world
250 127.0.0.1 Hello {208.73.48.43]
MAIL FROM:ggordon@garymgordon.com
250 2.1.0 ggordon@garymgordon.com .... Sender OK
RCPT TO:ggordon@gordondesigns.com
550 5.7.1 Unable to relay for ggordon@gordondesigns.com

So I stopped there and figured I would show this to you.

Gary
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
NOTE: I tried sending to ggordon@garymgordon.com and got the same "Unable to relay to ggordon@garymgordon.com" message.

I also tried sending to (RCPT TO) garymgordon@gmail.com, but got the same "Unable .." message.
0
 
PugglewuggleCommented:
If you got unable to relay that means that you have relay turned off for either a) the domain gordondesigns.com, or b) for the whole mail server.
The trick is to allow AUTHENTICATED relay instead of open relay. With open relay spammers will bounce tens of thousands of SPAM messages from your server in a month and get you blacklisted.
You need to set this up and then make your PHP script authenticate to SMTP.
There's also a neat tool that will build scripts - if nothing else you can use a script built with it as an example of how to authenticate SMTP in PHP:
http://www.bebosoft.com/products/formstogo/
This tool does ASP, PHP, and PERL.
Cheers!
0
 
PugglewuggleCommented:
Whatever you do... NEVER set your server to open relay. Just thought I should reiterate that to be sure.
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
Can you please explain what my settings should be in IIS6 when configuring SMTP?

Thanks .. this way I won't make any mistakes.

Gary
0
 
PugglewuggleCommented:
You shouldn't have to configure anything in IIS 6.0 to run SMTP - the script will handle everything and hand it off the mail server if you specify the server's host name (DNS name) or IP address.
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
NOTE:  Under the Access tab in SMTP .. I have "Only the list below" selected and the IP addresses from my server (with the php script) is included in this list.

When you say "If you got unable to relay that means that you have relay turned off for either a) the domain gordondesigns.com, or b) for the whole mail server."  

How can I make sure that I have relay turned ON properly for all of my domains.

Again, I have two servers.  One where I have my websites ... and the other .. which is basically just the SMTP server.

?
Gary
0
 
PugglewuggleCommented:
I suppose that would work then as far as access restriction... is that SMTP server on the same network as the web server or is it out over the internet? If it's inside just use the private IP of the web server. If it's outside, make sure you use the web server's public IP.
All the Windows Server SMTP is is a relay server... it just forwards it, providing a local SMTP gateway for local servers and the sends it off to a real mail server.
The relaying you'd be checking in this case would be on your main email server (especially if it's offsite).
When you say "One where I have my websites", do you mean a local SMTP server in IIS, or a full featured mail server? Same with the other one. Is that onsite or offsite, and is it just an SMTP forwarder or is it a full mail server?
Cheers!
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
Both servers are on the same network with the same hosting provider.

Would you mind IMing with me about this?

If so, my IM is garymgordon on both Yahoo and AIM.   And garymgordon@gmail.com on GoogleTalk.  And garymgordon@hotmail.com on MSN.

Thanks,
Gary
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
I'll send this info to my hosting people and let you know what they say.

Thanks for your input.
:-)
Gary
0
 
PugglewuggleCommented:
No problem! Keep me informed on what happens.
Cheers!
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
Hi.

The hosting company replied back and said this:

"All of your domains are on the .25 server and the .25 mail server is set to allow mail from your .43 server so I doubt it has anything to do with SPF records since we are not checking for them on our servers."

NOTE:  The .25 server is their MAIN Email Server that I was connecting to before when everything was fine.  Due to spam reports (even though I don't send out spam), they set up a different server with the ending IP of .43 for me to use as my SMTP server.

When I change the php.ini file (on the server where my websites and web pages are on) back to using the .25 server for SMTP, everything works fine.  But when the php.ini file is set to using .43 .. this is when my issues with emails from and to certain domains of mine .. appears to pop up.

They asked me to ask you .. if you had any further thoughts as to what could be causing this?  What they might need to do?  What changes might need to be made?

Thanks,
Gary
0
 
PugglewuggleCommented:
Very interesting... If they are managing the email server something is clearly wrong with their setup as it was working before and nothing had changed in your code.
Unfortunately, I don't have any other ideas as to what's going on without being able to get my hands on the servers... the only thing I can suggest is to ask them to verify their configuration of the .43 server.
As far as the changes that need to be made, it really depends on what's going on... that will be up to them to determine.
Cheers!
0
 
Gary GordonWebsite Developer, Designer, SEO and Online Marketing specialist.Author Commented:
The problem never got resolved, but I appreciated your help with the matter.  I ended up moving my SMTP to another outside service. hahaha  So, again .. Thank you for your help.  I guess I'll never really know what the exact issue was.  Thanks again.
0
 
PugglewuggleCommented:
No problem!
Cheers!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.