RE: [exim] check_helo_slow?

Top Page
Delete this message
Reply to this message
Author: Rick Cooper
Date:  
To: David Woodhouse
CC: David, exim-users
Subject: RE: [exim] check_helo_slow?


> -----Original Message-----
> From: David Woodhouse [mailto:dwmw2@infradead.org]
> Sent: Monday, January 10, 2005 10:48 AM
> To: Rick Cooper
> Cc: David; exim-users@???
> Subject: RE: [exim] check_helo_slow?
>
>
> On Mon, 2005-01-10 at 10:38 -0500, Rick Cooper wrote:
> > Try:
> >
> > deny message = IPv4 literal in HELO not permitted
> > condition = ${if and {\
> >                 {match
> {$sender_helo_name}{\N^\[(.*)\]$\N}} \
> >                 {isip{$1}}\
> >                 }\
> >                 {yes}{no}}

>
> IIRC the '$1' in isip{} won't contain the IP address extracted by the
> match if you do it that way; it'll always end up empty. I put the
> isip{$1} inside the result of the ${if} on purpose.
>
> --


I actually tested this with the -d+expand -bv with an address and helo of
10.10.10.10
and got the following (before I posted):

processing "deny"
expanding: $sender_helo_name
   result: [10.10.10.10]
expanding: \N^\[(.*)\]$\N
   result: ^\[(.*)\]$
expanding: $1
   result: 10.10.10.10
condition: and {{match {$sender_helo_name}{\N^\[(.*)\]$\N}} {isip{$1}}}
   result: true
expanding: yes
   result: yes
expanding: no
   result: no
skipping: result is not used
expanding: ${if and {{match {$sender_helo_name}{\N^\[(.*)\]$\N}}
{isip{$1}}}{yes}{no}}
   result: yes
check condition = ${if and {{match {$sender_helo_name}{\N^\[(.*)\]$\N}}
{isip{$1}}}{yes}{no}}
                = yes
deny: condition test succeeded

SMTP>> 550 IPv4 literal in HELO not permitted

550 IPv4 literal in HELO not permitted
LOG: MAIN REJECT
H=([10.10.10.10]) [10.10.10.10] rejected EHLO or HELO [10.10.10.10]: IPv4
literal in HELO not permitted
sender_fullhost = [10.10.10.10]
sender_rcvhost = [10.10.10.10]



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.