Solved

Sending email from IIS to local email server - messages stuck in IIS queue folder.

Posted on 2007-03-22
5
382 Views
Last Modified: 2007-04-17
Windows server 2003 domain, server 2003 IIS 6 and Exchange 2003 SP2

I am using IIS to send out messages to website users. The script formats an email message and puts it in the "Pickup" directory in inetpub\mailroot of the IIS server.

Sometimes we need a message sent from the web server to one of our IT staff internally so in that case the message is addresesd to ITuser@ourdomain.com.

Any message sent to an outside  user from the web server sends without incident. IIS on the web server will NOT send sucessfully to anything addressed to our local domain.

An mx record lookup on the IIS server shows our email server address which is correct. Our email server allows the IP of the web server to relay through it. Further, a manual smtp session from the IIS server to the mail server will allow a message through OK. i.e. telnet mailserver.domain.local 25 mail from: etc..

The messages attempted on the IIS server to the local recipients will always get stuck in the queue folder of IIS and no SMTP errors are logged in the log files.

I have tried testing with the antivirus shut off on the mail server as well and it made no difference.

Both servers are on the same domain if that is important. Stil trying to figure this one out. Any help is appreciated. Thanks!

-P

0
Comment
Question by:Ponthecomputer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 104

Expert Comment

by:Sembee
ID: 18783689
You have two options here.

If the web server is using your AD for DNS then setup a split DNS system with MX records for your domain, where the MX records point to the internal IP address of your Exchange server.

Another option would be to put a domain in to the IIS SMTP server, set it with your own domain. Then set a smart host and point it directly at your Exchange server.

Simon.
0
 
LVL 1

Author Comment

by:Ponthecomputer
ID: 18784488
Thanks Simon. I already have the first item done and an nslookup on the web server resolves the domain's mail server correctly. I tried adding a domain as well with mail server as smarthost - same result.

I've been testing by creating a text file:

from: test@domain.com
to: user@ourdomain.com
subject: test

this is a test

And then dropping it in the pickup directory. Today I found that this works for just about any domain but on suspicion, I tried sending to another domain I set up running exchange 2k3 and it too will not accept the message so I think it must be the way the test message is formatted - Exchange 2k3 does not like it.

For whatever reason yahoo, and all other outside domains have always accepted it OK.

Do you know of a format that would work with Exchange? I ususally use this without problems.

http://www.petri.co.il/test_smtp_service.htm

0
 
LVL 104

Expert Comment

by:Sembee
ID: 18785584
Can you telnet to the Exchange server from the web server? You need to confirm whether it is a connectivity or a formatting issue. I would be surprised if it was a formatting issue if the same format works for other servers.

Simon.
0
 
LVL 1

Author Comment

by:Ponthecomputer
ID: 18787284
Yes I can telnet just fine and can sucessfully send a message manually ie:
From the web server:

telnet mailserver 25
ehlo
mail from:x@x.com
rcpt to: user@ourdomain.com
data
test
.

This works just fine. This morning I set up a lab in vmware and tested and all is ok on the lab. I believe that there is something wrong with the instance of IIS on this server. It is doing something odd with the formatting of the message that exchange does not like.

I can set up 2 other IIS servers and they will send just fine. Sending only out of this one gives me problems.

Do you know if I can safeley remove SMTP from IIS and re install it without affecting the other portions of IIS or is this even worth trying?
Thanks!
0
 
LVL 104

Accepted Solution

by:
Sembee earned 500 total points
ID: 18788076
If the box is just IIS (ie not Exchange) then you can remove components easily. Remove, reboot and then reinstall. If you have service packed the machine then you may want to use a slipstreamed installation for the reinstall when it prompts for components. You will have a period of downtime, as the IIS services will be stopped.

The other thing it could be is AV or Antispam software on that machine. That can mung email messages.

Simon.
0

Featured Post

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question