Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Windows 2008 Web Edition server hosting multiple websites using IIS 7.5. At the moment, all the emails are sent via the IIS6 SMTP service. The FQDN of the SMTP service is set to the computer name at the moment which isn't correct as it doesn't resolve to a valid DNS entry and is not RFC compliant.

Some questions:

  1. Is there any way I can change the FQDN of the SMTP service based on the site sending the email?
  2. Would it be Ok to just setup mailserver.mydomain.com and use that as the FQDN for all the sites on multiple domains.
  3. Should I be using some other mail server software to handle this better?

The reason I am asking is lots of emails are hitting spam folders because the settings are incorrect.

I have access to the code that is running the websites so if something needs to be done there then that shouldn't be a problem. The sites are written using ASP.NET 2.0.

EDIT: I have just found an option to create an SMTP virtual service. Would this be the way forward? Create a virtual server for each site?

Thanks.

share|improve this question
    
Also make sure you configure your DNS correctly. –  Techie Joe Oct 23 '12 at 22:53
add comment

1 Answer

up vote 0 down vote accepted

I have managed to sort this out. Info for anyone else who needs to do the same.

  1. Create a new SMTP Virtual Server for each site.
  2. Add a relay for the IP address of the domain name.

In your web app, make sure your set your SMTP delivery information accordingly, either via the Web.Config or programmatically like so:

Smtp.Host := 'www.example.com'
Smtp.Port := 25;
Smtp.EnableSsl := False;
Smtp.DeliveryMethod := SmtpDeliveryMethod.Network;
Smtp.Send(Mail);

Hope this helps.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.