Subject: Re: running a script after a certain delay

From: Thoralf Will <[email-masked]>
Date: Fri, 19 Nov 2004 14:58:50 +0100

On Wed, Nov 05, 2003 at 03:45:22PM +0000, Alexey Melnikov wrote:
> Thoralf Will wrote:
> >is there any implementation/idea/suggestion available already to run a
> >script after a certain time has passed?
> >
> >Example:
> >Mail from [email-masked] arrives and gets delivered, the usual scripts are
> >running and put it into a special folder.
> >A 2nd script starts 1h later, looks for a mail in this special folder
> >and does something (redirect again, autoreply ...) if there is still a
> >mail.
> >
> >Is this possible
> >
> The way you describe it, the 2nd script is just being executed by a 
> special type Mail User Agent.
> 
> >and when how or are there any intentions to implement
> >something like this?
> > 
> >
> Can you be more specific. For the task you describe, I don't see any 
> need to modify/extend Sieve.
> 
> If you are looking for a product that can do that, you should at least 
> tell us what is your OS requirement.

Sorry for the extremely late reply but I thought to have found a solution
(a perl script named reply-o-matic). Sadly it looks like that this tool
is rather buggy and I don't dare to try to fix that.

To give a more detailed example:

The idea behind this is a support mail box that gets more or less spammed
and to prevent answering every single message with faq an autoreply
containing exactly those faq should be send with a 2nd mail address ad the
end telling the user to re-post the problem to that address if the problem
still persists. For cosmetic reasons the autoreply should have an initial
delay (simply because most ppl do not read autoreplies when they get the
message right away) and for technical reasons (to prevent ppl from
spamming others with spoofed addresses) we need a restriction that not
more than 1 reply will be send to the same address within 1 day.

Currently we are using a combination of cron and reply-o-matic but it's
really far from being perfect.

Thoralf

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Fri, 19 Nov 2004 15:26:37 +0100

Thoralf Will writes:
> Currently we are using a combination of cron and reply-o-matic but 
> it's really far from being perfect.

I suggest using procmail to weed away FROM_DAEMON mail etc, then 
formail|at to do the reply. Something like this should construct a nice 
autoreply and delay sending the result:

( echo '/usr/sbin/sendmail -t' ; formail -rt ; cat boilerplate ) | at +12hours

Now, in sieve, assuming this sort of thing were to be done in sieve at 
all, wouldn't it be natural to do it with an RFC2852 argument for the 
vacation extension?

Arnt