procmail
[Top] [All Lists]

RE: (special) autoreply problem

2004-11-19 09:53:07
From: Dallman Ross [mailto:dman(_at_)nomotek(_dot_)com] 

On Fri, Nov 19, 2004 at 02:47:57PM +0100, Thoralf Will wrote:

[Asking about an auto-responder with a 30-minute delay and
24-hour wipe-out.]


I would do this by saving the names to be acked (acknowledged)
individual filenames.  Thus your timestamp is right there, no extra
work.  Once the ack is sent, change fileperms as a flag.  
Once 24 hours have passed, delete the file.

[. . . .]

[Y]ou could even just use the very same "vacation" recipe 
mentioned in "man procmailex", but instead of piping it to 
sendmail at the end, redirect the output -- full message, 
ready for sendmail -- to the file.


  :0
   * condition ascertaining member of list to ack
   { MYACKGUY = `formail -rtzf -xTo:`}

   :0 A  other flags : $MYACKGUY$LOCKEXT
   * vacation stuff from "man procmailex"
   | vacation action from "man procmailex" > /var/tmp/acks/$MYACKGUY

[later stuff for acking and deleting expired files snipped here]

I realize on re-reading that we don't want to save that file if
one exists already in our "hash database."  So we need another
condition in the second recipe.

   :0 A  other flags : $MYACKGUY$LOCKEXT
   * ! ? test -e /var/tmp/acks/$MYACKGUY
   * vacation stuff from "man procmailex"
   | vacation action from "man procmailex" > /var/tmp/acks/$MYACKGUY

Dallman


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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