[exim] Reject servers that use my ip address as EHLO

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Udera Udera
Dátum:  
Címzett: exim-users
Tárgy: [exim] Reject servers that use my ip address as EHLO
Dear list,

I tried to implement a ACL-helo-check from the exim-wiki on github:
https://github.com/Exim/exim/wiki/AclHeloTricks#helo-is-faked-interface-address

drop    message     = Bad helo name
        condition   = ${if  \
                         and{    \
                             {isip {$sender_helo_name}}  \
                             {match_ip{$sender_helo_name}{@[]}}  \
                         }{yes}{no}  \
                     }


But it doesn't work. Just suppose my server ip is 10.0.0.1.

I want to reject servers that use my ip address as their EHLO, that would
be:
EHLO [10.0.0.1]

Unfortunately, that does not work because

isip {$sender_helo_name}


isn't true. If the plain ip address is used, this would work but plain ip
addresses are not allowed (and already covered by:
https://github.com/Exim/exim/wiki/AclHeloTricks#helo-is-an-ip-address).

I tried to get rid of the brackets but I didn't get the syntax right and
I'm not sure if this is the way to go:
drop condition = ${if
match{${substr{1}{${length{$sender_helo_name}-2}}{$sender_helo_name}}}{@
[]}{yes}{no}}

I hope someone can help me out here.

Thanks a lot,
Udera