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.

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.

share|improve this question
    
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

1 Answer 1

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.

share|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 '12 at 18:05

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.