[exim] Greylist -Hosts sending from Multiple MX's.

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Grant Peel
Data:  
Para: exim-users
Asunto: [exim] Greylist -Hosts sending from Multiple MX's.
Hi all,

A few months back, with alot of help from this list, I implimented
GREYLISTING (which is working well), with one exception:

Some ISPs (mail hosting farms, Spam scanning services etc, sometimes resend
from a different MX each retry period, which, obviously, causes some serious
email delays - todays for example, was delayed about 8 hours.

Question: Is there an expression we can add that will only look at the FQDN
or change the FQDN (as opposed to the full MX name?

i.e. mx129.emailservice.com to emailservice.com (or *emailservice.com)

Thanks in advance,

-Grant

Here is the GREYLISTING setup (from 'configure'):

...

GREYLIST_TEST = SELECT IF(NOW() > block_expires, 2, 1) \
                FROM exim_greylist \
                WHERE relay_ip = '${quote_mysql:$sender_host_address}' \
                AND from_domain = '${quote_mysql:$sender_address_domain}' \
                AND record_expires > NOW()


GREYLIST_ADD  = INSERT INTO exim_greylist \
                SET relay_ip = '${quote_mysql:$sender_host_address}', \
                from_domain = '${quote_mysql:$sender_address_domain}', \
                block_expires = DATE_ADD(NOW(), INTERVAL 1 MINUTE), \
                record_expires = DATE_ADD(NOW(), INTERVAL 14 DAY), \
                origin_type = 'AUTO', \
                create_time = NOW()


GREYLIST_UPDATE = UPDATE exim_greylist \
                SET record_expires = DATE_ADD(now(), INTERVAL 14 DAY) \
                WHERE relay_ip = '${quote_mysql:$sender_host_address}' \
                AND from_domain = '${quote_mysql:$sender_address_domain}' \
                AND record_expires > NOW()


...

       warn set acl_m2         = ${lookup mysql{GREYLIST_TEST}{$value}{0}}
        defer   ! hosts         = +whitelist
                ! hosts         = +relay_from_hosts
                ! authenticated = *
                condition       = ${if eq{$acl_m2}{0}{yes}}
                condition       = ${lookup mysql{GREYLIST_ADD}{yes}{no}}
                message         = Now greylisted - please try again in 1 
minute.
                log_message     = ADDING TO GREYLIST
        defer   ! hosts         = +whitelist
                ! hosts         = +relay_from_hosts
                ! authenticated = *
                condition       = ${if eq{$acl_m2}{1}{yes}}
                message         = Still greylisted - please try again in 1 
minute.
                log_message     = STILL GREYLISTED
        defer
                ! hosts         = +whitelist
                ! hosts         = +relay_from_hosts
                ! authenticated = *
                condition       = ${lookup mysql{GREYLIST_UPDATE}{no}{no}}
                message         = Greylist update failed
                log_message     = GREYLIST UPDATE FAILED


...