views:

452

answers:

2

Hi guys!

I'm thinking about building a transparent SMTP proxy on my own to process outgoing mails. I found Apache James already that looks like it is pretty much what I want.

Could I use Apache James to build a transparent SMTP proxy to add some headers and modify the content? Or should I go for pure Javamail?

A: 

James is a good fit for a scenario like this. The nice thing about this setup is that James will take care of all the retries and other glitches during mail processing. Adding headers is trivial with the right mailet.

I've used James in the past to send out personalised e-mails in bulk. By processing returned mail (bounces, out-of-office notices) you can tune the behaviour of your e-mail application further.

Jeroen van Bergen
Am I right that I have to write my own Matcher for this? Something (maybe deciding on a special string in the subject) that has to edit the incoming mail and then connects to the outgoing SMTP to relay it?
cringe
Maybe, it's been a while since I have used James. The list of matchers can be found here: http://james.apache.org/mailet/standard/mailet-report.html. The SubjectStartsWith matcher might do the trick for you, the SetMimeHeader mailet can add a custom header.
Jeroen van Bergen
A: 

Yes you can, subscribe to the server-user at james dot apache dot org mailing list and I'm sure there will be plenty of folks willing to help you. Not that you'll need it, this kind of thing is what James is really good at.

danny