In article <[EMAIL PROTECTED]> 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().
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang