On Sun, 2008-06-15 at 11:41, Leonardo Rodrigues Magalhães wrote:
>     Hello Guys,
> 
>     Is it possible to write a rule that matches based on the current 
> time of the host running spamassassin ?? I would like to simply add, 
> let's say, 1 point for EVERY message received during night, for example, 
> 9PM until 6AM.
> 
>     is that possible to write that rule ?

Something like:
 
header Received =~ /hostname.* (2[1-3],0[0-8]):/

may do it. "hostname" is the name of the final MTA host in the received
chain and " (2[1-3],0[0-8]):" is intended to match the hour when it was
received, but is probably wrong. 

IOW, match the hour in the last Received: header in the mail delivery
chain. If you're running Postfix this Received: header would be matched
by "Received =~ by" while the rest would match "Received =~ from" but I
don't know if that would work with other MTAs.


Martin Gregorie




Reply via email to