What platform are you intending to run the server on? If it's some kind of *nix box then you could use something like procmail to do the job (you'd have to write the scripts yourself though, shouldn't be too hard).
Edit: ooops sorry, I see you said you're running win98, ignore everything I said