Re: Time-based filtering in Procmail

"Ruud H.G. van Tol" <[email protected]> Mon, 01 Jun 2015 08:27:02 +0200
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
On 2015-06-01 05:38, @lbutlr wrote:
> On Sat May 30 2015 03:51:46 [email protected] said:

>> procmail mktime
>
> Thanks. I found a lot of posts referring to it, but it took me some time to find the actual file.
>
> <http://rvtol.home.xs4all.nl/procmail/inc/mktime.103.rc.inc>
>
> And while this will prove useful, it is not really what I was looking for. I want to do something different with a message if it arrives, for example, between 3am and 6am, or maybe 500 to 2130.
>
> I’m cheating now by just calling perl.
>
> * ? /usr/bin/perl -e 'use POSIX qw(strftime); $now_hour = strftime "%H", localtime; …
>
> and ignoring the headers. Working well enough for now.

OK, I was assuming that the rest of it is just simple logic.

The hour-value can be tested in several ways, to set the delivery 
target. For example by regex, or a lookup list, or scoring, etc.

-- 
Ruud
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail