bindir = $(exec_prefix)/bin
# Directory to install the Info files in.
infodir = $(prefix)/info
-# Directory to install the man page in.
-mandir = $(prefix)/man/man$(manext)
# Number to put on the man page filename.
manext = 1
+# Directory to install the man page in.
+mandir = $(prefix)/man/man$(manext)
# Program to install `make'.
INSTALL_PROGRAM = @INSTALL_PROGRAM@
Option to enable EMACS-like user folder versioning on each run.
-S/key for secure challenge-response.
+IMAP extensions for secure challenge-response.
Recode POP2 to use the same driver/method strategy as POP3/IMAP, so
all three protocols will be able to forward messages through the generic
* Sendmail delivery from background seems to work now.
-* We have IMAP2bis/IMAP4 suppport.
+* We have IMAP2bis/IMAP4 support.
* Code now autoprobes for a POP3, IMAP, or POP2 server if no protocol is
specified.
* SMTP forwarding support. Thanks to Harry Hochheiser <harry@tigger.jvnc.net>
- for this simple but very clever idea.
-
+ for this simple but clever idea.
+
+* If no UNIX From line is found, popclient will now synthesize a correct
+ line from the RFC822 From line.
+
+* It is now possible to specify the host TCP/IP port number to connect to.
+
3.05:
* Experimental support for RFC1725-compliant POP servers with the UIDL
- README for popclient 3.0
+ README for popclient
popclient is a full-featured, robust, well-documented POP2, POP3, APOP,
and IMAP client originally developed by Carl Harris <ceharris@mal.com> and
if ((mboxfd = openuserfolder(queryctl)) < 0)
return(PS_IOERR);
} else if (queryctl->output == TO_SMTP) {
- if ((mboxfd = Socket(queryctl->smtphost,SMTP_PORT)) < 0)
+ if ((mboxfd = Socket(queryctl->smtphost, SMTP_PORT)) < 0)
return(PS_SOCKET);
/* eat the greeting message */
}
/* open a socket to the mail server */
- if ((socket = Socket(queryctl->servername,protocol->port)) < 0) {
+ if ((socket = Socket(queryctl->servername,
+ queryctl->port ? queryctl->port : protocol->port))<0)
+ {
perror("do_protocol: socket");
ok = PS_SOCKET;
goto closeUp;
printf(" Username = '%s'\n", queryctl->remotename);
printf(" Password = '%s'\n", queryctl->password);
- printf(" Protocol is %s\n", showproto(queryctl->protocol));
+ printf(" Protocol is %s", showproto(queryctl->protocol));
+ if (queryctl->port)
+ printf(" (using port %d)", queryctl->port);
+ else if (outlevel == O_VERBOSE)
+ printf(" (using default port)");
+ putchar('\n');
printf(" Fetched messages will%s be kept on the server (--keep %s).\n",
queryctl->keep ? "" : " not",
int fetchall;
int flush;
int norewrite;
+ int port;
/* state used for tracking UIDL ids */
char lastid [IDLEN];
Use POP3 with trusted-host-based authentication (like rlogin/rsh).
.I popclient
must be installed as a setuid root program to use RPOP.
-.B \--proto.
.RE
.TP
+.B \-P, --port
+The option permits you to specify a TCP/IP port to connect on.
+This will seldom be necessary as all the supported protocols have
+well-established default port numbers.
+.TP
.B \-o folder, --local folder
Causes retrieved messages to be appended to file named by the folder
argument. When neither
.I popclient.
were connecting to that server is displayed.
.TP
-.PP
-.SH PROTOCOL SELECTION
-The selection of the correct Post Office Protocol (POP2 or POP3) depends upon
-the configuration of the mailserver from which you retrieve your mail. The
-system adminstrator who installed
-.I popclient
-on your system should have chosen an appropriate default protocol for your
-mailserver. If you get the message 'Connection refused' when using the
-default protocol, try specifying
-.B \-2
-or
-.B \-3
-to select a different protocol. If the 'Connection refused' message persists
-regardless of the protocol selected, it is likely that your mailserver is not
-running a POP compliant mail service.
-.PP
.SH USER AUTHENTICATION
User authentication in
.I popclient
noflush
nofetchall
norewrite
+ port
.PP
Legal protocol identifiers are
.nf
server pop.provider.net \e
proto pop3 \e
+ port 3111 \e
user jsmith \e
pass secret1 \e
localfolder ~/mbox
(used only with newer RFC1725-compliant servers supporting the UIDL command).
.SH BUGS
.PP
-The --smtphost option doesn't work with POP2. This isn't a protocol problem,
-it's because the developers couldn't find a POP2 server to test the
-necessary code reorganization with.
+When using POP2, the --smtphost option doesn't work, and mail headers
+are not rewritten to enable replies as described under --norewrite.
+This isn't a protocol problem, it's because the developer couldn't
+find a POP2 server to test the necessary code reorganization with.
.PP
The --remotefolder option doesn't work with POP3.
.PP
Send comments, bug reports, gripes, and the like to Eric S. Raymond
<esr@thyrsus.com>.
.SH NOTE
-The -p (--password) option of previous versions has been removed -- it
+The --password option of previous versions has been removed -- it
encouraged people to expose passwords in scripts. Passwords
-must now be specified either manually or in your
+must now be specified either interactively or in your
.I ~/.poprc
-file.
+file. The short-form -p option now specifies the protocol to use.
.SH SEE ALSO
mail(1), binmail(1), sendmail(8), popd(8),
RFC 937, RFC 1081, RFC 1082, RFC 1225, RFC 1460, RFC 1725.
#define LA_REMOTEFILE 15
#define LA_LOCALFILE 16
#define LA_MDA 17
-#define LA_SMTPHOST 18
-#define LA_LOGFILE 19
-#define LA_QUIT 20
-#define LA_NOREWRITE 21
-#define LA_YYDEBUG 22
+#define LA_PORT 18
+#define LA_SMTPHOST 19
+#define LA_LOGFILE 20
+#define LA_QUIT 21
+#define LA_NOREWRITE 22
+#define LA_YYDEBUG 23
static char *shortoptions = "23PVaKkvS:scl:Fd:f:u:r:o:m:L:qN";
static struct option longoptions[] = {
{"remote", required_argument, (int *) 0, LA_REMOTEFILE },
{"local", required_argument, (int *) 0, LA_LOCALFILE },
{"mda", required_argument, (int *) 0, LA_MDA },
+ {"port", required_argument, (int *) 0, LA_PORT },
{"smtphost", required_argument, (int *) 0, LA_SMTPHOST },
{"logfile", required_argument, (int *) 0, LA_LOGFILE },
{"idfile", required_argument, (int *) 0, LA_IDFILE },
case LA_MDA:
strncpy(queryctl->mda,optarg,sizeof(queryctl->mda)-1);
break;
+ case 'P':
+ case LA_PORT:
+ queryctl->port = strtol(optarg,0,0L);
+ break;
case 'S':
case LA_SMTPHOST:
if (fflag)
fprintf(stderr,"Option --all is not supported with POP2\n");
return(PS_SYNTAX);
}
-#ifdef FOO
else if (queryctl->smtphost[0]) {
fprintf(stderr,"Option --smtphost is not supported with POP2\n");
return(PS_SYNTAX);
}
-#endif /* FOO */
else
;
/* open the socket to the POP server */
- if ((socket = Socket(queryctl->servername,POP2_PORT)) < 0) {
+ if ((socket = Socket(queryctl->servername,
+ queryctl->port ? queryctl->port : POP2_PORT)) < 0)
+ {
perror("doPOP2: socket");
return(PS_SOCKET);
}
noflush { yylval.flag = FALSE; return KW_FLUSH; }
nofetchall { yylval.flag = FALSE; return KW_FETCHALL; }
norewrite { yylval.flag = FALSE; return KW_REWRITE; }
+port { return KW_PORT; }
(auto)|(AUTO) { yylval.proto = P_AUTO; return PROTO_AUTO; }
(pop2)|(POP2) { yylval.proto = P_POP2; return PROTO_POP2; }
%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
-%token <flag> KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE
+%token <flag> KW_KEEP KW_FLUSH KW_FETCHALL KW_REWRITE KW_PORT
%type <proto> proto;
/* these are actually used by the lexer */
| KW_FLUSH {prc_setflush($1);}
| KW_FETCHALL {prc_setfetchall($1);}
| KW_REWRITE {prc_setrewrite($1);}
+ | KW_PORT PARAM_STRING {prc_setport($2);}
;
proto: PROTO_POP2