procmail
[Top] [All Lists]

Re: Need assistance with mail forwding mail

1997-05-08 13:15:00
When David Savitt wanted help with a recipe to be active only at certain
hours of the day, Era Eriksson wrote,

| : The From_ line contains a time stamp, match on that.

Hans Georg Schaathun responded,

| You may use GNU date(1) to get the hour of the day, e.g.:

That would be an extra program and an extra process, and then /bin/test (or
worse, a shell to run its built-in test) to compare the information to the
parameters would be yet another: the timestamp of the letter's arrival is
already in the From_ line and procmail itself can work with that information,
as Era said.

That method works very well for me when recipes need to turn themselves on
and off at particular times on particular dates.  I run date(1) from my
.procmailrc only when (a) I need timezone information, which is not in the
From_ line, and (b) it is between 1:00:00 AM and 1:59:59 AM on the last
Sunday in October [when we switch back to standard time], so the timezone
is not implicit from other information in the From_ line.

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