Re: [exim] Reject connects from hostnames containing special…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Edgar Lovecraft
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Reject connects from hostnames containing special words
Giuliano Gavazzi wrote:
>
> At 11:14 am +0200 2004/09/16, C.Kuesters@??? wrote:
> >Hi!
> >
> >Is it possible to reject a connection if the senders hostname
> >contains a special word/part in it? I would like to reject
> >a connection if the looked up hostname contains a "adsl" part
> >in it.
> >
>
> in addition to the advice on the correct syntax you already had, may I
> suggest that you use an expression where at least you check for a series
> of digits after the adsl (with optional other characters) or you will
> reject mail from adsl.com adsl.co.uk adsl2go.co.uk etc. (and perhaps you
> will also not be able to send mail to them). Unless of course your needs
> are very particular.


Here is a much more complicated check for DUL style PTR records, please
note that I NEVER used this one single check to reject any connection,
it does a pretty good job of finding any PTR records that look like the
DUL style (1-2-3-4.dialup.....) etc, it is rather nieve and I do not use
it anymore as I moved to some RBL's that catch DUL netblocks, however, it
does give one example of things that you can do :)

Last note, as I do not use it anymore I keep it around as a commented out
macro, but it is a complete condition statement.

##########################################################################
# ONLY KEPT FOR HISTORICAL REASONS, PERHAPS IT MAY BE USED AGAIN SOMETIME
#
#    #
#    #Define the DUL Hosts lookup
#    #
#CONN_DUL_HOSTS                   = \
#    ${if or\
#        {\
#        {match\
#            {$sender_host_name}\
#            {${sg{$sender_host_address}{\\.}{\\\\.}}|\
#            ${sg{$sender_host_address}{\\.}{-}}}\
#        }\
#        {match\
#            {${lc:$sender_host_name}}\
#            {[-\.]\?\
#            (\
#            dsl|pool|cust|host|dyn|node|pc|dhcp|client|user|cable\
#            )\
#            (\
#               [-\.]|\
#               (\
#                (\
#                ${extract{1}{\\.}{$sender_host_address}}|\
#                ${extract{2}{\\.}{$sender_host_address}}|\
#                ${extract{3}{\\.}{$sender_host_address}}|\
#                ${extract{4}{\\.}{$sender_host_address}}\
#                )|\
#                (\
#                ${extract{1}{\\.}{$sender_host_address}}[-\.]?\
#                ${extract{2}{\\.}{$sender_host_address}}[-\.]?\
#                )|\
#                (\
#                ${extract{2}{\\.}{$sender_host_address}}[-\.]?\
#                ${extract{3}{\\.}{$sender_host_address}}[-\.]?\
#                )|\
#                (\
#                ${extract{3}{\\.}{$sender_host_address}}[-\.]?\
#                ${extract{4}{\\.}{$sender_host_address}}\
#                )\
#               )\
#            )}\
#        }\
#        }\
#    {1}{0}}
##########################################################################


--

--EAL--

--