Phil Vandry: > On Mon, Jan 16, 2012 at 10:20:48AM -0500, Wietse Venema wrote: > > > It isn't difficult to add the local TCP port number to the Dovecot > > > SASL request. May I suggest that this be added? > > > > You may suggest, but you may not know what you're asking for. Adding > > server (local) port support to Postfix was discussed a few weeks > > ago here. > > I'm sorry, I hope I'm not duplicating anything... but I didn't see > this topic in the list archive. > > > For consistency server port support needs to work in the exact same > > way as the existing code for client (remote) port support. According > > It sounds like you're saying that support for testing the server port > shouldn't be added at all unless it is added consistently throughout > Postfix.
Indeed. There are few things as frustrating as a feature that works only in some setttings and that lets users down in other settings. > I disagree that just applying my patch to the Dovecot SASL code > without adding support for the server port in many other places in > Postfix would cause user surprises. The fact that you would be able Postfix allows a client to connect to the server through a proxy. Naively doing a getsockname() call on the SMTP server's file descriptor would produce an incorrect result (the port of the proxy-to-Postfix connection). The correct result uses the port (and IP address) of the client-to-proxy connection. And that is just one scenario that uses ports and that you weren't aware of. This is what I mean that a feature works only in some settings and lets users down in others, causing surprises and frustration. Wietse