procmail
[Top] [All Lists]

Re: A Duplicates "Mystery" - The VERBOSE LOG

2004-05-24 08:40:18
When I wrote,

| > I use the From_ line's postmark date to make recipes turn on or off at
| > specific dates and times

Kai asked,

| I'd be interested to see a snippet of that.

My answer is rather different from Ruud's.  Since I invoke procmail with -f-
and a TZ setting for my local time zone (because it is not the same as
Panix's), the From_ line has the date and time of the message's arrival, per
my home time zone.

So in my procmail rcfiles there are conditions like this,

* ^^From [^ ]+ someregexphere

where someregexphere matches the range of strings that represent dates and
times when I want the recipe to operate (or if the condition is negated,
when I want the recipe *not* to operate).  If it's a long way in the future,
I'll comment it out until a few days before I want it to function (or
disable the entire recipe by adding

 * !

above it if I want it that way until the time comes close).

| I want to make a
| vacation/autoreply system which our users can turn on/off in advance just
| for the time they are away.

Then my method is not good, because it requires some familiarity by each
user with procmailrc code, regular expressions, and the format of the From_
line.

| I think one way could be to use an included
| recipe which gets "moved in/out" by cron. I think I saw this method
| mentioned in the FAQ for switching on/off recipes (not by cron, but by
| sending a "robot" email). But this means you have to clean up later in the
| crontab. On the other hand it doesn't take any processing cost if there's
| no recipe there, not even one that checks for date and time.

Use at instead of cron and there won't be any cleanup afterward.  Assign a
dummy empty file as an INCLUDERC; save the vacation routines in another
file; let the first at call mv the file with the routines to the name of the
empty file; let the second at call zap the INCLUDERC'd file back to
emptiness.




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