Ive been listed in list.dsbl.org - how do I configure so as to get unlisted

James McDonald james
Mon May 17 11:53:22 PDT 2004


James McDonald wrote:

> Folks I have the following setup for my home email 
> http://www.jamesmcdonald.id.au/faqs/technical_documentation/linux/net/home-net.png 
>
>
> I am using NAT and portforwarding to point my external port to my 
> internal postfix mail server.
>
> I got in part an email with my ip address listed as banned via this 
> dsbl list.
>
>     Rejected: 144.137.68.107 listed at list.dsbl.org
>
> In order to be removed from this list my internal mail server needs to 
> accept mail in the format
>
>     postmaster@[my_external_ip] #(including the brackets, to make it 
> rfc822 compliant)
>
> currently I am getting a "relaying denied" reply if I try to send to 
> this address....
>
> Any ideas, suggestions, ruminations or contemplations?
>
Well I seem to have touched a nerve regarding this but this is how I got 
around the problem.

As noted above my MTA needs to accept mail as postmaster@[external_ip] 
in order to be accepted as non open relay. Because I am behind a NAT 
firewall my true interface is in the 192.168.x.x range and so postfix 
wouldn't accept postmaster@[external_ip] because even with 
$myinterfaces  = all the external interface isn't on the box. So I 
created the following script to check for my external ip and then create 
a eth0:1 interface the same address as the external interface postfix 
now considers postmaster@[external_ip] local and will accept mail from 
that format. It doesn't seem to have broken my external connection or 
access.


#!/bin/sh

echo last run `date` > /tmp/checkextip
external_domain="jamesmcdonald.id.au"

# resolve the external ip via dns
external_ip=`dig -t A $external_domain | grep -A1 ANSWER\ SECTION | grep 
$external_domain | awk '{print $5}'`

ifconfig_bin="/sbin/ifconfig"

interface="eth0:1"

# get current local interface
current_ip_address=`$ifconfig_bin $interface | grep "inet addr" | cut 
-f2 -d: | awk {'print $1'}`

stored_ip_file="/tmp/stored_ip"


# check to make sure it's an ip address

if echo $external_ip |  grep -E 
'^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$' ; then
   
    echo "in if 0"
           
    if [ "$external_ip" != "$current_ip_address" ] ; then
       
        echo "The external ip resolves to $external_ip"
        echo "Changing current IP of $current_ip_address to $external_ip"
       
            $ifconfig_bin eth0:1 $external_ip
    else
        echo "The external and current interface $interface IP Address 
Match"
        echo "No change needed"   
    fi
   
else
   
    echo "Could not resolve external IP address"
   
fi


-- 
James McDonald
(Would you like fries with that MCSE?)

Singleton Australia

61+ (0)2 65712401
61+ 0428 320 219

13:25:00 up 12:09, 1 user, load average: 0.12, 0.06, 0.02
Linux 2.4.22 #1 Mon Sep 1 20:03:11 EST 2003 athlon i386 GNU/Linux




More information about the Linux-users mailing list