$(INSTALL_DATA) $(srcdir)/fetchmail.man $@
fetchmail.spec: Makefile.in
- specgen.sh $(VERS) >fetchmail.spec
+ $(srcdir)/specgen.sh $(VERS) >fetchmail.spec
.PHONY: clean realclean distclean mostlyclean
clean:
------------------------------------------------------------------------------
- * * * WARNING * * *
-
-This release contains untested features! It includes new code for Kerberos
-authentication and POP3 UID support, but my integration of these features
-required changes which have not yet been tested by the people who sent the
-enhancements.
-
-I'm issuing it to put paid to two minor but annoying bugs, in option
-processing and IMAP queries of multiple sites. For other changes, see
-below.
-
------------------------------------------------------------------------------
-
Release Notes:
fetchmail-1.8 (Fri Oct 11 15:08:10 EDT 1996):
fetchmail README
------------------------------------------------------------------------------
- * * * WARNING * * *
-
-This release contains untested features! It includes new code for Kerberos
-authentication and POP3 UID support, but my integration of these features
-required changes which have not yet been tested by the people who sent the
-enhancements.
-
-I'm issuing it to put paid to two minor but annoying bugs, in option
-processing and IMAP queries of multiple sites. For other changes, see
-the release notes in the NEWS file.
-
------------------------------------------------------------------------------
-
fetchmail is a full-featured, robust, well-documented POP2, POP3,
APOP, and IMAP batch mail retrieval/forwarding utility intended to be
used over on-demand TCP/IP links (such as SLIP or PPP connections).
You could use fetchmail to test and debug server implementatations.
* Carefully written, comprehensive and up-to-date man page describing
- not only modes of operation but also (**) how to interpret the most
+ not only modes of operation but also (**) how to diagnose the most
common kinds of problems and what to do about deficient servers
* Rugged, simple, and well-tested code -- the author relies on it
user base from Carl Harris's popclient community. This means
feedback is rapid, bugs get found and fixed rapidly.
-You can easily find the latest version of fetchmail from Eric's home page:
+You can easily fetch the latest version of fetchmail via FTP from:
+
+ ftp://ftp.ccil.org/pub/esr/fetchmail-1.9.tar.gz
+
+Or you can get it from Eric's home page:
http://www.ccil.org/~esr
}
#ifdef KERBEROS_V4
- if (queryctl->authentication == A_KERBEROS)
+ if (queryctl->authenticate == A_KERBEROS)
{
ok = (kerberos_auth (socket, queryctl->servername));
if (ok != 0)
void free_uid_list(struct idlist **);
int delete_uid(struct idlist **, int);
int uid_in_list(struct idlist **, char *);
+char *uid_find(struct idlist **, int);
void update_uid_lists(struct hostrec *);
void write_saved_lists(struct hostrec *, char *);
int ok;
char buf [POPBUFSIZE+1];
+ /* Ensure that the new list is properly empty */
+ queryctl->newsaved = (struct idlist *)NULL;
+
/* get the total message count */
gen_send(socket, "STAT");
ok = pop3_ok(socket, buf);
/* grab the mailbox's UID list */
gen_send(socket, "UIDL");
- if ((ok = pop3_ok(buf, socket)) == 0) {
+ if ((ok = pop3_ok(socket, buf)) == 0) {
while (SockGets(socket, buf, sizeof(buf)) >= 0) {
if (outlevel == O_VERBOSE)
fprintf(stderr,"%s\n",buf);
- if (strcmp(buf, ".\n") == 0) {
+ if (strcmp(buf, ".") == 0) {
break;
}
- if (sscanf(buf, "%d %s\n", &num, id) == 2)
+ if (sscanf(buf, "%d %s", &num, id) == 2)
save_uid(&queryctl->newsaved, num, id);
}
}
if (!queryctl->oldsaved)
return (num <= last);
else
- {
- char buf [POPBUFSIZE+1];
- int ok;
-
- gen_send(socket, "UIDL %d", num);
- if ((ok = pop3_ok(socket, buf)) != 0)
- return(ok);
- else
- {
- char id[IDLEN+1];
-
- if (sscanf(buf, "%*d %s", id) == 2)
- return(uid_in_list(&queryctl->oldsaved, id));
- else
- return(0);
- }
- }
+ return (uid_in_list(&queryctl->oldsaved,
+ uid_find (&queryctl->newsaved, num)));
}
static int pop3_fetch(socket, number, lenp)
prc_setauth(A_KERBEROS);
prc_setport(KPOP_PORT);
}
- | PORT STRING {prc_setport($2);}
+ | PORT STRING {prc_setport(atoi($2));}
| SKIP {prc_setskip($1==FLAG_TRUE);}
| AUTHENTICATE PASSWORD {prc_setauth(A_PASSWORD);}
| AUTHENTICATE KERBEROS {prc_setauth(A_KERBEROS);}
# is
# remotefolder (or remote)
# password (or pass)
-# mailbox
# smtphost (or smtp)
# mda
# keep
struct idlist **idl;
char *str;
{
- if (*idl == (struct idlist *)NULL)
+ if (*idl == (struct idlist *)NULL || str == (char *) NULL)
return(0);
else if (strcmp(str, (*idl)->id) == 0)
return(1);
return(uid_in_list(&(*idl)->next, str));
}
+char *uid_find(idl, number)
+/* return the id of the given number in the given list. */
+struct idlist **idl;
+int number;
+{
+ if (*idl == (struct idlist *) 0)
+ return((char *) 0);
+ else if (number == (*idl)->num)
+ return((*idl)->id);
+ else
+ return(uid_find(&(*idl)->next, number));
+}
+
int delete_uid(idl, num)
/* delete given message from given list */
struct idlist **idl;
{
free_uid_list(&hostp->oldsaved);
hostp->oldsaved = hostp->newsaved;
+ hostp->newsaved = (struct idlist *) NULL;
}
void write_saved_lists(hostlist, idfile)