Re: [exim] Outofdate email

Top Pagina
Delete this message
Reply to this message
Auteur: Ted Cooper
Datum:  
Aan: Exim Users List
Onderwerp: Re: [exim] Outofdate email
Michael L Griffin wrote:
> Greetings
>
> Me again (c:}
>
> I often receive email that is a few days / months / years "old"
> according to the email date 99.99% of which is SPAM.
>
> Now a thought, what would the benefit/negative be in denying
> incoming email "older" than say 7 days? I was thinking that denying
> at connection time would alleviate load on SpamAssasin (my resources
> are limited on a VPS).
>
> Any ideas on how best to do this? Pointers / examples greatly
> appreciated as always.


Many otherwise perfectly legitimate emails from poorly configured mail
servers do turn up with the Date: header missing or otherwise mangled
beyond regular parsing. SpamAssassin does pick this up and assign a
relatively hefty score for it, but as you said that consumes resources.

At a guess, you would have to check to see if $h_date: was defined (${if
def:header_date: })and then somehow come up with a method of parsing
this into useful information to compare to the current time.

Exim does not contain a native date parser so you would have to pass
this off to some more suited program (GNU data perhaps) to convert it
into a value you could compare to $received_time perhaps. Either ${run
or ${readsocket would serve to talk to some outside program.

As I said before, SpamAssassin does already do this for you.

--
The Exim Manual
http://www.exim.org/docs.html
http://www.exim.org/exim-html-current/doc/html/spec_html/index.html