On Thursday, October 24, 2002, at 05:31  PM, Bill Shupp wrote:

On Thursday, October 24, 2002, at 03:27  PM, Rick Macdougall wrote:

Hi Bill,

Original response below, but one question... Why does it work when using
tcpserver ???? (but I'll still take a look a preauthvchkpw.c)

ie
tcpserver -R -t 2 -g 89 -u 89 0 110 /usr/lib/courier-imap/sbin/pop3login \
/usr/lib/courier-imap/libexec/authlib/authvchkpw
/usr/lib/courier-imap/bin/pop3d Maildir

Thanks for the response. It feels so good when I stop banging my head.

Not much of a C programmer anymore, but I'll whip out my old books and see
what I can do in the next couple of hours.

Thanks again for the response, that helps greatly.

Regards,

Rick
Are you using authdaemon? I know for sure that this will not work. If so, try again without it (--without-authdaemon). I'm rebuilding courier-imap to run some tests, and see if there's a problem with the IP formatting (IPV6) of TCPLOCALIP that couriertcpd sets (as suggested offlist by Vladimir Kabanov).
Ok, Vladimir was right, TCPLOCALIP is in IPv6 from couriertcpd. So, I just converted it in host_in_locals(), and now authvchkpw works. However, authdaemon still will NOT work, since TCPLOCALIP does not get passed to authvchkpw. The patch below applies to 5.3.11 (available at http://shupp.org only right now), but you may be able to apply it to your version with little effort. Let me know if this works for you.

Regards,

Bill Shupp

--- ../vpopmail-5.3.11/vpopmail.c Wed Oct 23 13:01:40 2002
+++ vpopmail.c Thu Oct 24 17:38:40 2002
@@ -1668,6 +1668,14 @@

#ifdef IP_ALIAS_DOMAINS
tmpstr = getenv("TCPLOCALIP");
+
+ /* courier-imap uses IPv6 */
+ if ( tmpstr != NULL && tmpstr[0] == ':') {
+ tmpstr +=2;
+ while(*tmpstr!=':') ++tmpstr;
+ ++tmpstr;
+ }
+
memset(host,0,156);
if ( vget_ip_map(tmpstr,host,156)==0 && !host_in_locals(host)){
if ( strlen(host) > 0 ) {


Reply via email to