Re: [exim] Limit ingress outdated mails

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Dave Evans
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Limit ingress outdated mails
On Fri, May 26, 2006 at 08:46:21AM +0200, Balzi Andrea wrote:
> I am trying to create a filter for the mail with older or greater date
> than 7 days.
> I am trying in the documentation of version 4.6 something that can help
> me. Someone can gives a suggestion to me?


Is it taboo on this list to point out that it can be done by using the ${perl}
or ${run} expansions? e.g. Using Perl, the Mail::Field module might come in
handy, or maybe the underlying Date::Parse module. It should be possible to
construct a function such that

date_age($date_header, $default)

returns the age (in days, or seconds, or whatever you prefer) of $date_header
compared to now, or $default if $date_header could not be parsed. You could
then use a simple arithmetic comparison in the "data" ACL.

--
Dave Evans
Power Internet

PGP key: http://powernet.co.uk/~davide/pgpkey