a prefix other than /usr/local, or you can choose completely different
directories for each item.
-Note: if you intended to use RPOP (which we don't recommend, you
-should set up APOP), you'll have to make fetchmail suid root. This
-is so it can call rresvport and bind to a privileged port, so the
-server's TCP/IP will see that and know it's OK to let it bind to
-a privileged port at the other end.
-
4. SET UP A RUN CONTROL FILE
See the man page or the file sample.rcfile for a description of how to
single server host). It will probably undergo substantial change only
if and when support for a new retrieval protocol is added.
-Test RPOP feature against a Unix server that has it. The protocol
-transactions are certainly OK, the question is whether the rresvport()
-authentication stuff does what's needed.
-
Support IMAP4 extensions for secure challenge-response, once they're actually
standardized.
Here are fetchmail's main features. Those unique to fetchmail are marked
with **.
- * **POP2, POP3, **APOP, **RPOP and **IMAP support.
+ * **POP2, POP3, **APOP, **IMAP support.
** Host is auto-probed for a working server if no protocol is
specified for the connection. Thus you don't need to know
#include <varargs.h>
#include <sys/time.h>
#include <signal.h>
-#ifdef HAVE_RRESVPORT_H
-#include <netinet/in.h>
-#endif /* HAVE_RRESVPORT_H */
#include "socket.h"
#include "fetchmail.h"
tagnum = 0;
protocol = proto;
-#ifdef HAVE_RRESVPORT_H
- /*
- * If we're trying to bind to a reserved port on the remote system,
- * do likewise on the local one so the remote will know we're privileged.
- * (This is most likely to happen in connection with RPOP.)
- */
- if (queryctl->port < IPPORT_RESERVED)
- {
- ok = IPPORT_RESERVED - 1;
- if ((privport = rresvport(&ok)) == -1 || alarmed)
- {
- perror("fetchmail, binding to reserved port");
- alarm(0);
- signal(SIGALRM, sigsave);
- return(PS_SOCKET);
- }
- }
-#endif /* HAVE_RRESVPORT_H */
-
/* open a socket to the mail server */
if ((socket = Socket(queryctl->servername,
queryctl->port ? queryctl->port : protocol->port))<0
hostp->servername);
exit(PS_SYNTAX);
}
- if (hostp->protocol == P_RPOP && hostp->port >= 1024)
- {
- (void) fprintf(stderr,
- "%s configuration invalid, can't do RPOP to an unprivileged port\n",
- hostp->servername);
- exit(PS_SYNTAX);
- }
/* expand MDA commands */
if (hostp->mda[0])
case P_POP3: return("POP3"); break;
case P_IMAP: return("IMAP"); break;
case P_APOP: return("APOP"); break;
- case P_RPOP: return("RPOP"); break;
default: return("unknown?!?"); break;
}
}
break;
case P_POP3:
case P_APOP:
- case P_RPOP:
return(doPOP3(queryctl));
break;
case P_IMAP:
else if (outlevel == O_VERBOSE)
if (queryctl->protocol == P_APOP)
printf(" APOP secret = '%s'\n", queryctl->password);
- else if (queryctl->protocol == P_RPOP)
- printf(" RPOP secret = '%s'\n", queryctl->password);
else
printf(" Password = '%s'\n", queryctl->password);
printf(" Protocol is %s", showproto(queryctl->protocol));
#define P_POP3 3
#define P_IMAP 4
#define P_APOP 5
-#define P_RPOP 6
/* definitions for buffer sizes -- somewhat arbitrary */
#define POPBUFSIZE 512 /* per RFC 937 */
mail-retrieval protocols: POP2 (as specified in RFC 937), POP3 (RFC
1725), IMAP2bis (as implemented by the 4.4BSD imapd program), and
IMAP4 (as specified by RFC1730). It can use (but does not require)
-the RPOP and LAST facilities removed from later POP3 versions.
+LAST facility removed from later POP3 versions.
.PP
As each message is retrieved \fIfetchmail\fR normally delivers it via SMTP to
port 25 on the machine it is running on (localhost), just as though it
Post Office Protocol 3
.IP APOP
Use POP3 with MD5 authentication.
-.IP RPOP
-POP3 with \fI.rhosts\fR processing (not recommended).
.RE
.TP
.B \-P, --port
-The option permits you to specify a TCP/IP port to connect on. You
-will need to specify this in order to use RPOP authentication. Otherwise
-this option will seldom be necessary as all the supported protocols have
+The option permits you to specify a TCP/IP port to connect on.
+This option will seldom be necessary as all the supported protocols have
well-established default port numbers.
.TP
.B \-r folder, --remote folder
a mailbox on the server. Contact your server administrator if you don't know
the correct user-id and password for your mailbox account.
.PP
-POP3 versions up to the RFC1225 version supported an alternate
-authentication mechanism called RPOP intended to address the security
-risk inherent in sending unencrypted account passwords across the net
-(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 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
-has to bind to a privileged port locally in order for the mail
-server to believe it's allowed to bind to a privileged remote port.)
-.PP
RFC1460 introduced APOP authentication. In this variant of POP3,
you register an APOP password on your server host (the program
to do this with on the server is probably called \fIpopauth\fR(8)). You
pop3 (or POP3)
imap (or IMAP)
apop (or APOP)
- rpop (or RPOP)
.PP
You can use the `noise' keywords \fBand\fR, \fBwith\fR,
\fBhas\fR, \fBwants\fR, and \fBoptions\fR anywhere in an entry to make
just treat this as an 'unrecoverable error'.
.IP 3
The user authentication step failed. This usually means that a bad
-user-id, password, or RPOP id was specified.
+user-id, password, or APOP id was specified.
.IP 4
Some sort of fatal protocol error was detected.
.IP 5
be snaffled with a packet sniffer or more sophisticated monitoring
software.
.PP
-The RPOP support is not yet well tested.
-.PP
Send comments, bug reports, gripes, and the like to Eric S. Raymond
<esr@thyrsus.com>.
.SH NOTES
queryctl->protocol = P_IMAP;
else if (strcasecmp(optarg,"apop") == 0)
queryctl->protocol = P_APOP;
- else if (strcasecmp(optarg,"rpop") == 0)
- queryctl->protocol = P_RPOP;
else {
fprintf(stderr,"Invalid protocol '%s'\n specified.\n", optarg);
errflag++;
goto badAuth;
break;
- case P_RPOP:
- gen_send(socket,"USER %s", queryctl->remotename);
- if (pop3_ok(socket, buf) != 0)
- goto badAuth;
-
- gen_send(socket, "RPOP %s", queryctl->password);
- if (pop3_ok(socket, buf) != 0)
- goto badAuth;
- break;
-
case P_APOP:
gen_send(socket,"APOP %s %s", queryctl->remotename, queryctl->digest);
if (pop3_ok(socket, buf) != 0)
(pop3)|(POP3) { yylval.proto = P_POP3; return PROTO; }
(imap)|(IMAP) { yylval.proto = P_IMAP; return PROTO; }
(apop)|(APOP) { yylval.proto = P_APOP; return PROTO; }
-(rpop)|(RPOP) { yylval.proto = P_RPOP; return PROTO; }
(#.*)?\\?\n { prc_lineno++; } /* newline is ignored */
# pop3 (or POP3)
# imap (or IMAP)
# apop (or APOP)
-# rpop (or RPOP)
#
# Basic format is
# server SERVERNAME protocol PROTOCOL username NAME password PASSWORD