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 am trying to set up a development environment for our web server. I would like all emails that are relayed by the server go to a specific mailbox, regardless of who they were sent to. For example, some application on the server sends an email to shopper@yahoo.com. I want that email to go to devbox@mysite.com. Is that possible to do with IIS/Virtual SMTP? Is there some other way of doing this? I don't have exchange server running, if that makes a difference.

Any help would be greatly appreciated. Thanks a lot!

share|improve this question

3 Answers 3

up vote 0 down vote accepted

IIS' SMTP server isn't particularly bright. I'd recommend using a more intelligent mail server that you control perform the address munging and/or forwarding to a specific address, and having IIS' SMTP server "smart host" to it.

The "more intelligent" mail server need not be a normal mail MTA application; a simple script that opens a network socket, implements just enough SMTP to catch the mail from IIS and write it out to a log file would work just fine.

share|improve this answer
    
Thanks Greg. Is there an open source / free solution for this? –  Greg R Aug 12 '09 at 19:23
    
Found this: antix.co.uk/Projects/SMTPServerForDevelopers There is also this: donovanbrown.com/post/2008/10/20/Neptune.aspx This is exactly what I need –  Greg R Aug 12 '09 at 19:35

I normally setup the SMTP server to use a drop directory and avoid the destination mailbox completely. Then give read access to that folder to everyone who needs it.

This also avoids the problem of no SMTP server as part of IIS 7 (on Vista).

If your app is written in .NET you can configure that directly via the configuration/system.net/mailSettings/smtp section of web.config or app.config -- set the deliveryMethod attribute to SpecifiedPickupDirectory.

share|improve this answer
    
Thanks, that's a good idea. I like a server option better, just because if something goes wrong with the config files, real customers might get dev emails. –  Greg R Aug 12 '09 at 19:35

If you want a custom server option you might look at hMailServer as well (free and easy to use)

share|improve this answer

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.