-- On Tuesday, August 22, 2006 17:19:14 +0100 Chris Lightfoot wrote:

> On Tue, Aug 22, 2006 at 05:14:26PM +0100, Phil Chambers wrote:
>     [...]
>> However, the messages which are being rejected have non-ASCII in the
>> header  names (the part before the colon - RFC2822 calls them field
>> names), which makes  it more problematic. I really would prefer to
>> reject these messages at the DATA  phase. Any ideas?
>
> see <[EMAIL PROTECTED]> from earlier
> today, which suggests,
>
>      # header field name with 8-bit char
>     deny    message = Your message contains invalid headers
>             log_message = message header 8-bit
>             condition = ${if match{$message_headers}{(?im)^[^:
> ]*[\x80-\xFF]+[^:]*:}{1}{0}}
>

This has problems with wrapped subject lines - maybe

  condition =     ${if match{$message_headers}{(?m)^[^: 
\t]+[\x80-\xFF]+[^:]*:}{1}{0}}

would be safer.

Allways be careful with regexps, as they might math more than you expect. 
For the current anoying spam a

  condition   = ${if 
match{$message_headers}{(?im)^[\x80-\xFF]+Message-ID:}{1}{0}}

is sufficient.

Michael


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

Reply via email to