Re: [exim] One Word Message Body

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Carlo Wood
Dátum:  
Címzett: Marc Perkel
CC: exim-users
Tárgy: Re: [exim] One Word Message Body
On Wed, Apr 25, 2007 at 05:22:29PM -0700, Marc Perkel wrote:
> Ignore the last message - this one should work.
>
> Here's what's working for me. You have to have 2 working MX records to
> do this. The idea is that it does DEFER on the lowest one and the higher
> one accepts it. Gets rid of 90% of them. Probably someone else could
> write something better.
>
> defer message = DEFER - One word message - LC=$body_linecount
>
>    domains = @mx_primary
>    !regex = \N\x20\w\N
>    condition = ${if < {$body_linecount}{3}{yes}{no}}


This doesn't seem to work for me :(

The regex always matches. As a test, I used:

deny
  !regex = \N\x20\w\N
  message = Mail is temporarily denied (1). Try again later - MS=$message_body_size - LC=$body_linecount - RE = "$regex_match_string"
  condition = ${if and {\
                         {<={$body_linecount}{1}}\
                         {<{$message_body_size}{20}}\
                       }{yes}{no}}


deny
  regex = \N\x20\w\N
  message = Mail is temporarily denied (2). Try again later - MS=$message_body_size - LC=$body_linecount - RE = "$regex_match_string"
  condition = ${if and {\
                         {<={$body_linecount}{1}}\
                         {<{$message_body_size}{20}}\
                       }{yes}{no}}



If then I sent myself a message with:

MAIL FROM: me@???
250 OK
RCPT TO: carlo@???
250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
Subject: This is the header.
From: me@???

oneword
.
550-Mail is temporarily denied (2). Try again later - MS=8 - LC=1 - RE =
550 "\x20\w"

As you see, the $message_body_size and the $body_linecount
are correct (assuming the message body is one character larger
than the number of characters in the word).

The regular expression DID match however.

--
Carlo Wood <carlo@???>