Re: bug: Partial results from DB lookup causing parsing problems
Simon Horman <[email protected]>
| Newsgroups | gmane.mail.perdition.user |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Oct 23, 2008 at 01:33:09PM +0100, Simon Fraser wrote: > > Hi folks, > > I'm newly subscribed to this list, and while I've searched for a mention > of this before and come up with nothing, I apologise if I'm duplicating > a report. > > I'm using perdition-1.17.1 with perditiondb_ldap. Due to the nature of > our site, some users will have a mailhost configured in here, and some > will not. I am hoping to use the outgoing_server configuration option > as a default should the server return a partial response, since one of > our existing systems will break if we started adding this to all the > currently empty fields. > > This works if the user had a mailhost set, but was refusing to use the > outgoing_server option if they did not, instead attempting to connect to > the person's username, treating it as a hostname. Omitting the port > works whether the server is set or not. > > I have tracked down this problem to user_server_port_strn_assign in > getserver.c. This function appears to be dual-purpose, used for both > parsing the outgoing_server option in the configuration file, and also > for parsing the string returned by dbserver_get. Since these have a > slightly different format (hostname[:port] vs > username[<delimiter>hostname[:port]]), it gets confused when the string > returned from the DB doesn't contain a server. It falls through into > its configuration parsing option at the end, setting (*usp)->server to > (*usp)->user (the start of the string), and so the connection attempts > gethostbyname(username). Hi Simon, thanks for tracking that down. I'll try and get a fix for it shortly. -- Simon Horman VA Linux Systems Japan K.K., Sydney, Australia Satellite Office H: www.vergenet.net/~horms/ W: www.valinux.co.jp/en ______________________________________________ Perdition-users mailing list [email protected] http://lists.vergenet.net/listinfo/perdition-users