Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-03-22
5
Medium Priority
?
386 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 2000 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

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

Know the reasons and solutions to move/import EDB to New Exchange Server. Also, find out how to recover an Exchange .edb file and to restore the file back.
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
how to add IIS SMTP to handle application/Scanner relays into office 365.
This video discusses moving either the default database or any database to a new volume.

670 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