"Harald" == Harald Hanche-Olsen <[EMAIL PROTECTED]> writes:
Harald> A simple shell script should do the job:
#!/bin/sh
find Maildir/new -type f -mtime +1 -print | while read m; do
/var/qmail/bin/qmail-inject -a bill && mv $m Forwarded/new
done
There is a race condition here. Move the file before you run qmail
inject on it. If the qmail inject fails, move it back.
Harald> The forwarded message should inherit the original's
Harald> envelope sender (picked up from the Return-Path field).
Harald> Override with -f if you prefer. You should also be aware
Harald> that qmail-inject does some error checking and header
Harald> processing that is not totally appropriate for mail
Harald> forwarding. In particular, if the incoming mail has
Harald> syntax errors in the headers (not an unheard of situation)
Harald> the above script will fail. A better solution might be to
Harald> use forward, but then you have to set up the environment
Harald> variables that forward expects, so this is harder to do.
j.
--
Jay Soffian <[EMAIL PROTECTED]> UNIX Systems Administrator
404.572.1941 Cox Interactive Media