From 5ad95abd711a7a0a619246fd2bb4a7cfe60acc1b Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 26 Sep 1996 15:57:33 +0000 Subject: No more rpopid field. svn path=/trunk/; revision=162 --- fetchmail.c | 10 +++++----- fetchmail.h | 1 - fetchmail.man | 8 +++----- pop3.c | 15 +++++++++++---- rcfile_l.l | 1 - rcfile_y.y | 3 +-- sample.rcfile | 1 - 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/fetchmail.c b/fetchmail.c index d749283a..4fb4d07d 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -225,8 +225,7 @@ char **argv; /* pick up interactively any passwords we need but don't have */ for (hostp = hostlist; hostp; hostp = hostp->next) - if (!(implicitmode && hostp->skip) - && !hostp->password[0] && !hostp->rpopid[0]) + if (!(implicitmode && hostp->skip) && !hostp->password[0]) { (void) sprintf(tmpbuf, "Enter password for %s@%s: ", hostp->remotename, hostp->servername); @@ -411,9 +410,10 @@ struct hostrec *queryctl; if (queryctl->password[0] == '\0') printf(" Password will be prompted for.\n"); else if (outlevel == O_VERBOSE) - printf(" Password = '%s'\n", queryctl->password); - if (queryctl->rpopid[0]) - printf(" RPOP id = '%s'\n", queryctl->rpopid); + if (queryctl->protocol == P_RPOP) + printf(" RPOP id = '%s'\n", queryctl->password); + else + printf(" Password = '%s'\n", queryctl->password); printf(" Protocol is %s", showproto(queryctl->protocol)); if (queryctl->port) printf(" (using port %d)", queryctl->port); diff --git a/fetchmail.h b/fetchmail.h index 8f2cc579..8bb1c970 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -62,7 +62,6 @@ struct hostrec char localname [USERNAMELEN+1]; char remotename [USERNAMELEN+1]; char password [PASSWORDLEN+1]; - char rpopid [PASSWORDLEN+1]; char userfolder [FOLDERLEN+1]; char remotefolder [FOLDERLEN]; char smtphost[HOSTLEN+1]; diff --git a/fetchmail.man b/fetchmail.man index 14a41526..ffc95d43 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -244,11 +244,10 @@ the correct user-id and password for your mailbox account. POP3 versions up to the RFC1225 version supported an alternate authentication mechanism called RPOP intended to remove the security risk inherent in sending unencrypted account passwords across the net -(in RFC1460 this facility was replaced with APOP). If your .fetchmailrc -file specifies an RPOP id and a connection port in the privileged -range (1..1024), +(in RFC1460 this facility was replaced with APOP). If you specify the +RPOP protocol and a connection port in the privileged range (1..1024), .I fetchmail will -ship the id with an RPOP command rather than sending a password. +ship your password entry to the mail server as an RPOP id. (Note: you'll need to be running fetchmail setuid root for RPOP to work -- .I fetchmail @@ -395,7 +394,6 @@ Legal keywords are: protocol (or proto) username (or user) password (or pass) - rpopid remotefolder (or remote) localfolder (or local) mda diff --git a/pop3.c b/pop3.c index 2c5ad87e..7a9c3ccc 100644 --- a/pop3.c +++ b/pop3.c @@ -104,10 +104,17 @@ char *greeting; if (pop3_ok(buf,socket) != 0) goto badAuth; - if (queryctl->rpopid[0]) - gen_send(socket, "RPOP %s", queryctl->rpopid); - else - gen_send(socket, "PASS %s", queryctl->password); + gen_send(socket, "PASS %s", queryctl->password); + if (pop3_ok(buf,socket) != 0) + goto badAuth; + break; + + case P_RPOP: + gen_send(socket,"USER %s", queryctl->remotename); + if (pop3_ok(buf,socket) != 0) + goto badAuth; + + gen_send(socket, "RPOP %s", queryctl->password); if (pop3_ok(buf,socket) != 0) goto badAuth; break; diff --git a/rcfile_l.l b/rcfile_l.l index 32aa6a30..e4dca826 100644 --- a/rcfile_l.l +++ b/rcfile_l.l @@ -29,7 +29,6 @@ server { return KW_SERVER; } proto(col)? { return KW_PROTOCOL; } user(name)? { return KW_USERNAME; } pass(word)? { return KW_PASSWORD; } -rpopid { return KW_RPOPID; } remote(folder)? { return KW_REMOTEFOLDER; } local(folder)? { return KW_LOCALFOLDER; } smtp(host)? { return KW_SMTPHOST; } diff --git a/rcfile_y.y b/rcfile_y.y index 52af1f0d..31517b8f 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -29,7 +29,7 @@ int yydebug; /* in case we didn't generate with -- debug */ char *sval; } -%token KW_SERVER KW_PROTOCOL KW_USERNAME KW_PASSWORD KW_RPOPID +%token KW_SERVER KW_PROTOCOL KW_USERNAME KW_PASSWORD %token KW_REMOTEFOLDER KW_LOCALFOLDER KW_SMTPHOST KW_MDA KW_EOL KW_DEFAULTS %token PROTO_AUTO PROTO_POP2 PROTO_POP3 PROTO_IMAP PROTO_APOP PROTO_RPOP %token PARAM_STRING @@ -66,7 +66,6 @@ serv_option_clause: KW_PROTOCOL proto {prc_setproto($2);} | KW_USERNAME PARAM_STRING {prc_remotename($2);} | KW_PASSWORD PARAM_STRING {prc_setpassword($2);} - | KW_RPOPID PARAM_STRING {prc_setrpopid($2);} | KW_REMOTEFOLDER PARAM_STRING {prc_setremote($2);} | KW_LOCALFOLDER PARAM_STRING {prc_setlocal($2);} | KW_SMTPHOST PARAM_STRING {prc_setsmtphost($2);} diff --git a/sample.rcfile b/sample.rcfile index a7b32fed..950b4822 100644 --- a/sample.rcfile +++ b/sample.rcfile @@ -23,7 +23,6 @@ # protocol (or proto) # username (or user) # password (or pass) -# rpopid # remotefolder (or remote) # localfolder (or local) # mda -- cgit v1.2.3