Subject: Pop3 and saved passwords

From: David Finberg - Sun High Performance Computing <[email-masked]>
Date: Tue, 21 Mar 2000 20:21:32 -0500 (EST)

So, I recently went to use pine on the sparc 20 I have at home with my pop
account, and so compiled in the PASSFILE option. However, I quickly
discovered that this did no good at all. Hmmm.

On tracing through the code, I found in
c-client/pop3.c

~line 400

long pop3_auth (MAILSTREAM *stream,NETMBX *mb,char *tmp,char *usr) 
{ 
...
  if (auths) {                  /* got any authenticators? */ 
    for (t = NIL; LOCAL->netstream && auths && 
         (at = mail_lookup_auth (find_rightmost_bit (&auths)+1)); ) { 
      if (t) {                  /* previous authenticator failed? */ 
        sprintf (tmp,"Retrying using %.80s authentication after %.80s", 
                 at->name,t); 
        mm_log (tmp,NIL); 
        fs_give ((void **) &t); 
      } 
      for (i = 1,tmp[0] = '\0'; /* until run out of trials */ 
           LOCAL->netstream && i && (i <= pop3_maxlogintrials); ) { 

Is there any obvious reason why i is starting at 1? Especially since in
mm_login in pine/imap.c we have

    if(trial == 0L){ 
        strcpy(user, (*mb->user) ? mb->user : ps_global->VAR_USER_ID); 
 
        /* try last working password associated with this host. */ 
        if(imap_get_passwd(mm_login_list, pwd, user, hostlist,
mb->altflag)) 
          return; 
 
#ifdef  PASSFILE 
        /* check to see if there's a password left over from last session
*/ 
        if(get_passfile_passwd(ps_global->pinerc, pwd, 
                               user, &hostlist[0], mb->altflag)){ 
          dprint(0, (debugfile, "FLAG %d\n", mb->altflag)); 
 
            imap_set_passwd(&mm_login_list, pwd, user, 
                            &hostlist[0], mb->altflag); 
            return; 
        } 
#endif 

It seems that if the pop server returns AUTH's you can't use the
PASSFILE code. With no auths you are fine. I can't see any reason
why pine wants to enforce this restriction (some standard? That would be
odd),but it does seem to have been done deliberately. Any answers out
there?

-- Dave

---

From: Scott Leibrand <[email-masked]>
Date: Tue, 21 Mar 2000 17:30:48 -0800 (PST)

I don't know enough about Pine's code to do any debugging, but the usual
cause for PASSFILE not working is that your user name is different on the
two systems.  If that is the case, try adding /user=username after every
instance of your server's name.
(For example, {my.pop.server.com/user=dfinberg}INBOX )

-- 
Scott Leibrand
[email-masked]
http://students.washington.edu/leibrand
* RCW 19.190 notice: This email address is located in Washington State. *
* Unsolicited commercial email may be billed $500 per message.          *