• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Email not being relayed to destination

I'm using the SMTP functionality in ASP.NET to send an email.  I just set up POP3/SMTP on a Windows Server 2003.
The email messages are making it to the POP Service but they are not reaching the ultimate destination.  I have no restrictions on the relay properties of the default smtp virtual server at this time.  

All machines involved are on the same network.

What am I missing?
0
bozworthy
Asked:
bozworthy
  • 5
  • 3
2 Solutions
 
TheCleanerCommented:
Is your machine running A/V?  Some like Mcafee will prevent "mass mailings" on port 25.  You can disable these options usually.
0
 
feptiasCommented:
I think the answer is in "The email messages are making it to the POP Service".

It sounds like you have set up your Windows Server 2003 to look like the mail server for the intended target domain. For example, if you are sending a message to fred@mycompany.com, then you certainly don't want to have a POP3 domain set up on your server for mycompany.com. If you do, the mail will go no further than that server where it will wait for your Outlook client (or whatever) to download it.

I suggest you set up one domain on your SMTP virtual server either based on the sending address or just a random name if the senders domain is the same as the intended recipient. Your ASP application can presumably send to the SMTP server using its IP address. The SMTP server can then relay the message to the actual mail server of the recipient by looking up the MX record in DNS. Make sure your mail server is behind a firewall for port 25 or you'll get spam being relayed through it within a few days (or even hours).
0
 
feptiasCommented:
Hi bosworthy

At the moment what you are missing is some feedback on this question. Please.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
bozworthyAuthor Commented:
Yeah sorry I forgot about this question for a while.  

Yes I have set up a random name on the server.  So my address (for now the intended final target) is myname@mycompany.com.  The random name on the server is myapplication@mycompany.com.    

What is the MX record in the DNS?  This sounds like a key point I'm missing.
0
 
feptiasCommented:
Hi bosworthy

You almost certainly don't need to worry about MX records. They are out there on the Internet stored in the public DNS servers. They point to the mail servers for all the millions of internet domains that exist like say microsoft.com or  mycompany.com. Most SMTP servers have a built-in intelligence to go and look up MX records and use them to forward mail to the required destination.

The domain name is simply the bit after the @ in an e-mail address. The simplest way of thinking about it is to assume that all the e-mails for one domain are always sent to one e-mail server (not actually true for big organisations, but that's another story) e.g. its as if the mail for anyname@microsoft.com is always sent to one giant e-mail server run and maintained by Mr Gates.

MX records allow other e-mail servers that are wanting to send a bit of mail to be able to find the IP address of the mail server that it should be sent to. The problem you are having, I think, is because you have set up your POP3/SMTP server to look like it *is* the final destination for delivery - so the MX records on the public Internet are not even being looked at.

So you don't want your POP3/SMTP server to have a domain called mycompany.com if that is the domain of the address that you want the mail to eventually go to. It doesn't help just because the mailbox/users name is random - its the name after the "@" that matters. If you've really disabled all the security for relaying as you said, then your SMTP server should just pass the mail on to its final destination automatically - provided the final destination does not have the same domain name as one of its own domains.

By the way, its bad practice to disable all the security for relaying. You should set the SMTP security to only allow relaying from the IP address of your web server running the ASP application.
0
 
bozworthyAuthor Commented:
I will remove mycompany.com as a domain.  Also, there are delivery failure notices on the server saying that the mail could not be delivered to myname@mycompany.com (final dest for now).  They have (Failure) Unicode (UTF-7) at the top.  Does that mean anything to you?
0
 
feptiasCommented:
I don't know what the UTF-7 failure is all about - perhaps it concerns the formatting of the e-mail - Unicode and UTF is to do with character sets and that sort of thing. Can you make sure the contents of e-mails that you send from the ASP code are formatted in the simplest possible plain text format for now? There may also be settings to do with MIME and that sort of thing which would make a difference.

Just to confirm, you are trying to send to a mail address that already exists and is working - an address that, for example, I could send to right now and you would have no trouble receiving that message and reading it on your client (Outlook or whatever you are using). You want to use the Win Server 2003 to relay messages from your ASP app to that existing e-mail account. Yes?
0
 
bozworthyAuthor Commented:
The message is simply "hello".  

Yes, the email address is my work one.  It's working.  Yes, I want the ASP message to be routed through the Win 2003 server to my work address.  It seems to be getting stuck at the server.  There are currently no restrictions on the relay, but I will add them once I get this working.
0
 
feptiasCommented:
Hi Bosworthy

I helped resolve very similar problems for two other EE users who asked questions about failure to relay through an SMTP server running on Win 2003 server. I think you should read through those threads to see if any of it is relevant to you:
http://www.experts-exchange.com/Web/Web_Servers/IIS/Q_21850392.html
http://www.experts-exchange.com/Web/Web_Servers/IIS/Q_21851046.html

I can't really help you on the UTF-7 problem. If that is what's stopping it working then you'll have to ask about it as a separate question, but you'd be better trying in a different EE Topic Area such as Web Dev>Web Servers>IIS or perhaps Web Dev>Web Languages>ASP or just Web Dev.

Good luck
John
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now