> > I would also like to know if there is a way for the recipe to check to
> > see if the file already exists, so it can remove that file before it
> > creates the new one.
>
> There is a simple method for checking for duplicates of mail as it is
> received. I don't know the method myself, so I'll have to refer you to
> the manpage for procmailex for examples. The recipe to catch
> duplicates should be placed before any delivering recipes.
It is in the man pages, but it is so short, that it's easier to just
include it here. I keep this in a separate file called "dupcheck.rc",
in my procmail library.
# Turn off comsat -- so it won't get called
# notifing the user about mail "delivered" via
# the formail check.
OLDCOMSAT=${COMSAT:-off}
COMSAT=off
# Remove duplicate messages
:0 Wh: .msgid.lock
| formail -D 16384 .msgid.cache
COMSAT=$OLDCOMSAT
OLDCOMSAT
___________________________________________________________
Alan Stebbens <aks(_at_)sgi(_dot_)com> http://reality.sgi.com/aks