You are missing something. Email has a specific port associated with various functions. For instance, SMTP is port 25. This port is the one that the *server listens* on. Meaning if you want to send some mail to that server (A), your server(B) chooses a random port on it's side(X), and connects to A:25 saying to respond to B:X. So the conversation has four parameters: Sending port and IP, and receiving port and IP. It is the sending one that is randomized.
Michael -----Original Message----- From: John Horne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 22, 2002 10:28 PM To: [EMAIL PROTECTED] Subject: non-privileged port selection - how is it done? Hello, Perhaps a newbie question, but I'm a bit stumped with this one. Given a service such as e-mail which uses a non-privileged port to send mail out, are there are any specific mechanisms as to which port is selected? This will no doubt be dependant on the O/S, but is it really a random numbered port, the first non-privileged port it knows is not in use, or does the O/S have any other mechanism for selecting the port? My problem is that given that a site has a firewall blocking specific non-privileged ports (e.g. 2222) against all IP traffic (both as a source port or a destination port), if a genuine site tries to e-mail them a message and the sending host selects that port (2222) then the mail message will not be sent. The MTA will probably queue the message and try later with a different port number, but it seems possible that the message may never be delivered simply because the port numbers selected are all blocked by the recipient site. The sending MTA may well just ditch the message and/or mail the sender that it had a problem. Either i am missing something obvious about all this, or does this seem like a possible scenario? Many thanks, John. ------------------------------------------------------------------------ John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: [EMAIL PROTECTED] PGP key available from public key servers
