[exim] Rejecting MX Internal IP Addresses

トップ ページ
このメッセージを削除
このメッセージに返信
著者: d.hill
日付:  
To: exim-users
題目: [exim] Rejecting MX Internal IP Addresses
On a test server I have set up, I'm attempting to reject senders where
the sender domain has an MX record pointing to an internal (or
reserved) IP address. Reading the Exim documentation, this is what
I've come up with:

deny  message     = Sender domain ($sender_address_domain) has an MX record \
                     within reserved IP space.
       condition   = ${if \
                       forany \
                         {${lookup dnsdb{>: mxh=$sender_address_domain}}} \
                         {match_ip \
                           {${lookup dnsdb{a=$item}}} \
                           {iplsearch;/usr/local/etc/exim/reserved_ip_space} \
                         } \
                     {yes}{no}}
       log_message = Sender domain ($sender_address_domain) has an MX record \
                     within reserved IP space.


/usr/local/etc/exim/reserved_ip_space has a list of IP address ranges
in CIDR format of all the internal (or reserved) IP space.

It is working as expected. I am just curious if there is an alternate
or reduced way of performing the same results.