Re: Help: automated email forwarding similar to .forward

"Because it's up-side down.
Why is that?
It makes replies harder to read.
Why not?
Please don't top-post." - Sherm Pendley, Mac OS X list

Rich Fernandez wrote:
> Thanks for the reply, but what I need to do is hang onto the messages for an
> indefinite period of time, maybe days, during which time the box might get
> rebooted, crash, etc. I can't rely on a process sleeping.
> richf

I would take a two step approach to this. Using the pipe method
mentioned earlier I would have the message pass to a script through the
pipe and have that script be incredibly simple and fast, all it should
do is write the message to your storage area in whatever manner is best.
The keys to this are that the message is received on STDIN, and you need
to be able to generate a unique name to prevent collisions. This allows
the SMTP server to not get bogged down doing a bunch of processing if
you get hit by a large number of messages rapidly.

Then your second stage can be slow and handle everything else, as it
seems like this fits your requirements anyways. You could setup some
kind of long running daemon to watch a directory and handle the files as
they come in, or I assume you could launch the script via a scheduler if
it is more of a periodic thing. As far as reading the message in,
parsing it, and then forwarding it, I guarantee the Mail::Box suite can
handle what you want, but it does have a learning curve. And since it is
intended to read various mail box formats it is a little trickier to get
it to read a single raw message (though it is possible, and not that
difficult once you understand Mail::Box's foundation). I have done
similar. I can't speak from experience on the other modules you listed.

Sorry I can't provide source what I wrote was under license,