Peter wrote:

> On my system most spam/scams that escapes filter comes from freemail 
> addresses, and i would like to filter harder on mail that comes from 
> countrys like Nigeria, China etc. Hotmail and others have 
> X-Originating-Ip: header that i can use, but yahoo puts ip in received: 
> header, is it possible to grep the ip from the last received line within 
> a acl?, like this
> Received: from [81.91.232.194] by web37004.mail.mud.yahoo.com via HTTP; 
> Sat, 12 Sep 2009 21:15:38 PDT

Probably something like this?

set acl_m_ip = ${if match{$h_Received:}{\N.+ from \[([0-9\.]+)\] by 
web[0-9]+\.mail\.mud\.yahoo\.com via HTTP\N}{$1}{}}

-- 
Mike Cardwell - IT Consultant and LAMP developer
Cardwell IT Ltd. (UK Reg'd Company #06920226) http://cardwellit.com/

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to