Question

I'm developing a website on an XP virtual machine and have an SMTP virtual server set up in IIS -- it delivers mail just fine. What I would like is to confirm that any emails the site sends are only going to a specific domain.

The XP firewall seems to only involve incoming connections, I can't block outgoing TCP on port 25. And I haven't been able to configure the SMTP server to filter by delivery address.

With this setup, is there any easy way to filter outgoing email by destination address?

Was it helpful?

Solution

Here's one idea:

Under Advanced Delivery options (SMTP Virtual Server Properties > Delivery tab > Advanced). There you can set a "Smart Host" which is the SMTP server that will be used to actually send the mail, so you could possibly have it deliver directly to the specific domain's incoming SMTP server.

OTHER TIPS

I think the easiest way would be to add a check to your mail sending code on the website (there's got to be some class which is in charge of sending the mails out).

You could include a check which is only active when the code is compiled in debug mode (using compiler directives). Thus, when you are developing and building the site in debug mode, this code checks if the outgoing messages are valid (specific domain) or not. If they are it lets them go, else it doesn't send the mail.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top