[delurk]
err. I just saw a complex answer that made my head spin. Mine's a bit
easier. I'm assuming you've got procmail already setup (or can figure
it out).
#################################################################
### Wherever you normal re-direct non-spool mail.
MAILDIR=Mail
XXX=`date +%s`.$$.`hostname`
# Set up a maildir for mutt
MUTT=IN.mutt/new/$XXX
:0:
* ^TO_.*mutt
$MUTT
# Repeat ad-nauseum for things like spam.
# Set up a maildir for your inbox
INBOX=IN.inbox/new/$XXX
:0:
$INBOX
# Leave DEFAULT alone so that if you reallly screw things up like I
# did earlier today, procmail can still dump your mail into your
# normal spool. (Or does it do that anyways?)
#################################################################
The only problem occurs when you're filing a message multiple times.
Ben
[lurk]
On Thu, Mar 02, 2000 at 09:53:32AM -0800, Phil Staub wrote:
> On Wed, Mar 01, 2000 at 03:34:48PM -0500, Bennett Todd wrote:
> >
> > Here's a pretty safe maildir writer. Djb has some more rules for
> > further paranoia; but the real world is not likely to bite you if
> > you deliver messages like this. Written in Bourne Shell, but of
> > course it codes into very lean, tight code in most any language.
> >
> > f=`date +%s`.$$.`hostname`
> > cd $maildir
> > cat >tmp/$f
> > mv tmp/$f new/
> >
> > -Bennett
>
> Sorry for the bonehead question, but, assuming you were going to use
> this written as is (i.e., in Bourne shell) how would this be
> incorporated into a procmail recipe? Would you literally put this in
> the .procmailrc file, or write a shell script and invoke it from
> .procmailrc?
>
> Thanks,
> Phil
>
>
> --
> Phil Staub Dragonfly Software Consulting Company.
> [EMAIL PROTECTED] 8196 SW Hall Blvd, Suite 104
> 503-641-3440 x33 Beaverton, OR 97008
> "Unix: because reboots are for hardware upgrades!"
>
>
--
Benjamin Korvemaker
[EMAIL PROTECTED]
AI: Trying to get computers to behave like computers in the movies.