[Mimedefang] Simple feature request

Michael Faurot mfaurot at atww.org
Tue Sep 14 10:21:29 EDT 2004


In article <Pine.LNX.4.58.0409140904490.4396 at shishi.roaringpenguin.com> you wrote:
> How about if I change the function not to accept another argument, but
> to explicitly look for a hostname/port combination, and pull out the
> port part and use it?  I would rather use "hostname/port" than
> "hostname:port" to prepare for the miraculous day when IPv6 is widely
> used. :-)

Given the other comments already made about a separator character, why
not leave 'PeerPort' in the call to IO::Socket::INET->new?  This would
get around all issues of what the best/least-problematic character would
be to separate host and port number.  Then leave the specification of
port number as an optional argument to md_check_against_smtp_server().
Now all that's needed is a little logic, like the following, before
calling IO::Socket::INET->new:

	if (!defined($port)) {
		$port=25;
	}

If I'm not mistaken, this behavior would also be portable to all
existing code using md_check_against_smtp_server().  For those that
don't need this behavior, they don't have to adjust their code.  For
that do need it, they just add one more argument when calling
md_check_against_smtp_server().



More information about the MIMEDefang mailing list