diff options
-rw-r--r-- | fetchmail.c | 10 | ||||
-rw-r--r-- | fetchmail.h | 1 | ||||
-rw-r--r-- | fetchmail.man | 8 | ||||
-rw-r--r-- | pop3.c | 15 | ||||
-rw-r--r-- | rcfile_l.l | 1 | ||||
-rw-r--r-- | rcfile_y.y | 3 | ||||
-rw-r--r-- | 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 @@ -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; @@ -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; } @@ -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> PROTO_AUTO PROTO_POP2 PROTO_POP3 PROTO_IMAP PROTO_APOP PROTO_RPOP %token <sval> 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 |