As suggested by another member, I have split the original post into two. To see the original post, go to http://serverfault.com/questions/134595/howto-catch-redirect-all-outgoing-e-mails-on-win2k-and-redhat-enterprise.

For this question, please keep your answers specific to Windows Server 2003 only. Thanks for the help in advance.

Background: I am integrating two separate web application that are developed in ASP .NET and JSP/Struts. As such, they are hosted on two different server technologies, namely Win2K3 and Redhat Enterprise Server 5.5.

Problem: There is a copy of production data in my test environment with real e-mail addresses. I need to test the e-mail functionality of these applications, but I do not want them to send out actual e-mails. Is there a way to catch and redirect all outgoing e-mails?

Ideally, I would like to send all outgoing e-mails to another e-mail (i.e., test@test.com) so my testers can look at them.

link|improve this question

71% accept rate
you didn't specify the mail server: are you using Exchange? – gravyface Apr 22 '10 at 20:51
What version of exchange are you using? – Jim B Apr 22 '10 at 23:50
feedback

1 Answer

You can setup fakemail or Dumbster, both fake SMTP servers: basically they just act like an SMTP server but instead of actually delivering the mail, they dump it in their respective folders (I think Dumbster actually creates an object/data structure you can iterate through in code, not sure though).

Haven't used Dumbster, but fakemail is great: it carries on a standard SMTP conversation, but drops your@test.email into a folder that you can then inspect the headers, message body, etc.

For your project, I'd setup either on one of your servers -- if you do it on your RedHat box, make sure iptables has an exception for port 25 so your 2003 box can use it.

link|improve this answer
Why was this down-voted? This absolutely works, is simple to implement, and is 99% of what he's asking except that instead of a test@test.com email account, all the test emails would be dropped in a folder; that's hardly worth a down vote (especially one without a comment to back it up). – gravyface Apr 22 '10 at 23:56
Thanks for the info Gravyface. I'll take a look into these two today. I don't know why you were voted down -- it wasn't me -- but if this all works out, I'll vote you back up! – John Apr 23 '10 at 13:49
Is there a way to configure fakemail to dump all the e-mail header information as well? The most important of which is the TO and FROM fields. – John Apr 23 '10 at 14:51
Fakemail should dump the entire message, including all headers, into a folder of your choice. – gravyface Apr 23 '10 at 17:18
Upvoted, but as an aside, fakemail doesn't seem to support HTML emails. – HTTP500 Feb 8 at 18:05
show 1 more comment
feedback

Your Answer

 
or
required, but never shown

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