procmail
[Top] [All Lists]

Re[2]: filter duplicate mail

2002-06-21 15:49:31
Hi all!

DWT> 1. Procmail doesn't grok tildes, so you need to use the $HOME variable.  
(If a
DWT> command requires a shell and $SHELL is one that understands tildes, it may
DWT> look as if procmail expanded a tilde, but in reality, the shell did it.
DWT> Procmail can't.)
DWT> 2. Since most users won't care to see the cache file in an ordinary ls, I'd
DWT> recommend a name with a leading period, and the name for the local lockfile
DWT> preferably should be whatever the cache's name is plus $LOCKEXT.
DWT> 3. If procmail still has root privileges at that point, I'm not sure what 
will
DWT> happen (maybe that won't be a problem if the cache file already exists and 
is
DWT> owned by the user, but what if the user deletes it and procmail creates a 
new
DWT> one while it has root privileges?), so maybe that should be done only after
DWT> setting DROPPRIVS=yes.
DWT> 4. Some users may want to get all copies of their messages, so maybe you 
can
DWT> provide a way to opt out.  For example, such a user could touch a file 
named
DWT> ~/.keepdupes, and the recipe in /etc/procmailrc could read,

DWT>  :0Wh:$HOME/.msgid.cache$LOCKEXT
DWT>  * ! ? test -f $HOME/.keepdupes
DWT>  | formail -D 8192 $HOME/.msgid.cache

I just found a weekend-night to implement the above (without the
keepdupes - thanks for the proposal but (at least at the time) not
needed at our mailserver due to company-rules) at our
production-system.
Works great! Or at least, running for app. 2 hours (but with severe
testing), works great for the moment ;-). I hope this keeps up :-),
but I think it's been figuered out very well!

So, again, thanks to you all who entered this thread and provided so
many good ideas!

Really good feeling that if you need help you get it!

Have a nice weekend,
Kai


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>