[Mimedefang] Adding support for learning our addresses

David Nelson dave at itsdave.tv
Sat Jan 28 12:17:26 EST 2006


Another thing to check out are bogons.  Bogons are networks that have
not been allocated by IANA, which means you should never see them as
they "technically" constitute a non-routable address space.

http://www.cymru.com/Bogons

-- Dave

-----Original Message-----
From: mimedefang-bounces at lists.roaringpenguin.com
[mailto:mimedefang-bounces at lists.roaringpenguin.com] On Behalf Of Philip
Prindeville
Sent: Saturday, January 28, 2006 12:40 AM
To: mimedefang at lists.roaringpenguin.com
Subject: Re: [Mimedefang] Adding support for learning our addresses

This is what I came up with.  It's been tested on both 32-bit and 64-bit
Linux (amd64).

If you call IfAddrs::get() and you only get a single interface
name/address
pair, test it via isunroutable().  If the address ISN'T unroutable, then
you
shouldn't be seeing anyone connecting to you with this address as the
helo (i.e. it's yours and unique).

On the other hand, if, like me, your local address *is* unroutable, then
it
means that you're behind a firewall, and need to do a gethostbyname() on
your own name to figure out what your outside address is (i.e. what the
address of your firewall is that proxies for you).

-Philip





More information about the MIMEDefang mailing list