[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

SMTP relay error, only sending emails to one domain (where smtp server exists / from address is derived from).

We have a webserver, and it is on a workgroup and it forwards smtp traffic to and smtp server on testdom.com (e.g.). The problem is, it will only send mail to recepients in the testdom.com. It will not send to anything outside, and generates a relay error. The from address that we are using is email.testdom.com

I can get it to work by adding the webserver to the testdom.com domain. But i don't want my webserver to be on the domain, i'd prefer to keep it in a workgroup.

Is this a feature microsoft have introduced? It used to work about 6 weeks ago.
0
rtl_support
Asked:
rtl_support
  • 6
  • 6
1 Solution
 
peakpeakCommented:
Where and what is the mail server? Is it Exchange or do you use the SMTP engine on the web server for this? External mail arriving should only be forwarded to your own domain(s) otherwise it's an open relay. Add the domains in the SMTP / Exchange Virtual Server and it should work.
0
 
rtl_supportAuthor Commented:
the mail server is an exchange 2003 server, and it is just used as a relay server. the web app has its own smtp engine.

The domains are already in.

The funny thing is, i have an email tool (emailtool.exe) on the webserver, and you just give it a from address, recipient address, point it to the right smtp server and it sends emails fine?  So i know the relay settings are ok. It just seems to be the web app email facility only works whilst connected to the domain??
0
 
Luciano PatrãoICT Senior Infraestructure Engineer Commented:
Hi

You only need to add the webserver as a relay SMTP server. This will do the trick. And the webserver don't need to be on the domain. It can be located in a DMZ

Jail
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
peakpeakCommented:
The reason emailtool.exe works is because it's running on the same machine. The webserver does not relay for external machines (which is good). To make it accept mail from the Exchange server:
Add the IP address of the Exchange server in the SMTP Virtual server on the webserver like this:
On the webserver: Default SMTP Virtual server->Properties->Access tab->Relay button. Make sure the Olnly the list below is selected and add the IP of the Exchange server to the list. Restart the SMTP Virtual Server.
0
 
rtl_supportAuthor Commented:
Hi peakpeak,

Thanks for that, the emailtool.exe is running on the same machine, but so is the webapp that sends emails? so i don't understand why the emailtool works? They should both use the same relay rules? And i set the rules up on the exchange server, to allow relaying from the webserver.

I tried to go to the Default smtp virtual server, but its not in IIS?

What is the difference, with me being on the domain, or in a workgroup? And why would this affect if an email sends or not?
0
 
peakpeakCommented:
It's not in IIS but in the folder tree of IIS. Use My Computer->Right click, choose Manage, expand Services and applications, expand Internet Information Services,  There you should see Default SMTP Virtual Server (if you didn't rename it which is possible)
0
 
rtl_supportAuthor Commented:
Hi, yeah that reflects the folders available in IIS, all i have available are:
FTP Sites
Application Pools
Web Sites
Web Service Extension

Strange?
0
 
peakpeakCommented:
Check in Services, do you have any SMTP service running? Otherwise your web server is not sending mail. (unless you have a third-party application)
0
 
rtl_supportAuthor Commented:
there are no smtp services running, and it definitely is able to send emails. I thought the emails were handled by a config file, that just told the web app to send smtp traffic to a certain addess?
0
 
peakpeakCommented:
Never heard of that. I would certainly double check your mail route
0
 
peakpeakCommented:
I think it is emailtool.exe that's doing the actual sending. Are you able to config it?
0
 
rtl_supportAuthor Commented:
THere's nothing wrong with the mail route, i know it can forward smtp traffic. as i said the emailtool.exe just forwards emails to the smtp server (exchange server), i didn't think this was an unusual setup.

I believe its just a microsoft type security issue. as it only allows the traffic through when its on the same domain as the smtp/exchange server.
0
 
rtl_supportAuthor Commented:
THe emailtool.exe is completely separate to the web app, i just put it on there to test the network, yes you can configure it, you just tell it where the smtp server is (the exchange server).

The web application has a webconfig file, and in there you tell it where the smtp server is.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

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