mail kept on a POP3 server. Where the 6.3.X code was of O(n^2) complexity,
we're down to O(n log n).
Contributed by Rainer Weikusat, MAD Partners Ltd./MSS GmbH.
+* The POP3 code now always uses UIDL, except if "fetchall" is in effect.
+ Fixes BerliOS Bug #16172.
# FEATURES ADDED
* Fetchmail can now retrieve credentials from PWMD. This needs to be enabled at
fail to be retrieved due to server errors. Both the continue and markseen
options will skip the message with errors and allow the session to
continue so that subsequent messages can be retrieved. The markseen
- option will also mark the message with errors as seen. The default policy
- is to abort the session whenever a server error occurs.
+ option will also mark the message with errors as seen.
+ The default policy is to abort the session whenever a server error occurs.
Contributed by Craig Brown.
# REMOVED FEATURES
-* POP2 and RPOP were long obsolete and removed
-* Trio was removed
-* Support for systems that do not conform to C89 and POSIX 2001 was removed, this includes
- BeOS, EMX, NeXTSTEP.
+* POP2 was removed
+* RPOP (not actually a protocol, but a variant of POP3) was removed
+* POP3: the uidl option has been removed. It is no longer configurable.
+* POP3: LAST is no longer used. It was removed from POP3 in 1994, and it could
+ cause mail loss.
+* Trio was removed, fetchmail expects reasonable stdio.h support levels.
+* Support for systems that do not conform to C89 and POSIX 2001 was removed,
+ this means that BeOS, EMX, NeXTSTEP quirks are no longer worked around.
* The MX and host alias DNS lookups that fetchmail performs in multidrop mode
have been removed. They were based on the mistaken assumption that the
IMAP/POP3 server was also the MX server, which is rarely the case. They have
#ifdef HAVE_RES_SEARCH
booldump("dns", ctl->server.dns);
#endif /* HAVE_RES_SEARCH */
- booldump("uidl", ctl->server.uidl);
-
listdump("aka", ctl->server.akalist);
listdump("localdomains", ctl->server.localdomains);
FLAG_MERGE(server.skip);
FLAG_MERGE(server.dns);
FLAG_MERGE(server.checkalias);
- FLAG_MERGE(server.uidl);
FLAG_MERGE(server.principal);
#ifdef CAN_MONITOR
DEFAULT(ctl->mimedecode, FALSE);
DEFAULT(ctl->idle, FALSE);
DEFAULT(ctl->server.dns, TRUE);
- DEFAULT(ctl->server.uidl, FALSE);
DEFAULT(ctl->use_ssl, FALSE);
DEFAULT(ctl->sslcertck, FALSE);
DEFAULT(ctl->server.checkalias, FALSE);
printf(GT_(" (using service %s)"), ctl->server.service);
else if (outlevel >= O_VERBOSE)
printf(GT_(" (using default port)"));
- if (ctl->server.uidl && MAILBOX_PROTOCOL(ctl))
- printf(GT_(" (forcing UIDL use)"));
putchar('.');
putchar('\n');
switch (ctl->server.authenticate)
char *qvirtual; /* prefix removed from local user id */
flag skip; /* suppress poll in implicit mode? */
flag dns; /* do DNS lookup on multidrop? */
- flag uidl; /* use RFC1725 UIDLs? */
#ifdef SDPS_ENABLE
flag sdps; /* use Demon Internet SDPS *ENV */
#endif /* SDPS_ENABLE */
are deleted from the folder on the mailserver after they have been retrieved.
Specifying the \fBkeep\fP option causes retrieved messages to remain in
your folder on the mailserver. This option does not work with ETRN or
-ODMR. If used with POP3, it is recommended to also specify the \-\-uidl
-option or uidl keyword.
+ODMR.
.TP
.B \-K | \-\-nokeep
(Keyword: nokeep)
fetchmail to delete a message it had never fetched before. It can also
cause mail loss if the mail server marks the message seen after
retrieval (IMAP2 servers). You should probably not use this option in your
-configuration file. If you use it with POP3, you must use the 'uidl'
-option. What you probably want is the default setting: if you don't
+configuration file. What you probably want is the default setting: if you don't
specify '\-k', then fetchmail will automatically delete messages after
successful delivery.
.TP
ETRN, except that it does not require the client machine to have
a static DNS.
.TP
-.B \-U | \-\-uidl
-(Keyword: uidl)
-.br
-Force UIDL use (effective only with POP3). Force client-side tracking
-of 'newness' of messages (UIDL stands for "unique ID listing" and is
-described in RFC1939). Use with 'keep' to use a mailbox as a baby
-news drop for a group of users. The fact that seen messages are skipped
-is logged, unless error logging is done through syslog while running in
-daemon mode. Note that fetchmail may automatically enable this option
-depending on upstream server capabilities. Note also that this option
-may be removed and forced enabled in a future fetchmail version. See
-also: \-\-idfile.
-.TP
.B \-\-idle (since 6.3.3)
(Keyword: idle, since before 6.0.0)
.br
that.
.PP
\fBfetchmail\fP will always use the RETR command if "fetchall" is set.
-\fBfetchmail\fP will also use the RETR command if "keep" is set and
-"uidl" is unset. Finally, \fBfetchmail\fP will use the RETR command on
+As a workaround, \fBfetchmail\fP will use the RETR command on
Maillennium POP3/PROXY servers (used by Comcast) to avoid a deliberate
TOP misinterpretation in this server that causes message corruption.
.PP
-In all other cases, \fBfetchmail\fP will use the TOP command. This
-implies that in "keep" setups, "uidl" must be set if "TOP" is desired.
-.PP
\fBNote\fP that this description is true for the current version of
fetchmail, but the behavior may change in future versions. In
particular, fetchmail may prefer the RETR command because the TOP
no checkalias \& m T{
Do comparison by name for multidrop (default)
T}
-uidl \-U \& T{
-Force POP3 to use client-side UIDLs (recommended)
-T}
-no uidl \& \& T{
-Turn off POP3 use of client-side UIDLs (default)
-T}
interval \& \& T{
Only check this site every N poll cycles; N is a numeric argument.
T}
Command to be executed after each connection
T}
keep \-k \& T{
-Don't delete seen messages from server (for POP3, uidl is recommended)
+Don't delete seen messages from server
T}
flush \-F \& T{
Flush all seen messages before querying (DANGEROUS)
self.interval = 0 # Skip interval
self.protocol = 'auto' # Default to auto protocol
self.service = None # Service name to use
- self.uidl = FALSE # Don't use RFC1725 UIDLs by default
self.auth = 'any' # Default to password authentication
self.timeout = 300 # 5-minute timeout
self.envelope = 'Received' # Envelope-address header
('interval', 'Int'),
('protocol', 'String'),
('service', 'String'),
- ('uidl', 'Boolean'),
('auth', 'String'),
('timeout', 'Int'),
('envelope', 'String'),
res = res + (" qvirtual " + str(self.qvirtual) + "\n");
if self.auth != ServerDefaults.auth:
res = res + " auth " + self.auth
- if self.dns != ServerDefaults.dns or self.uidl != ServerDefaults.uidl:
+ if self.dns != ServerDefaults.dns
res = res + " and options"
if self.dns != ServerDefaults.dns:
res = res + flag2str(self.dns, 'dns')
- if self.uidl != ServerDefaults.uidl:
- res = res + flag2str(self.uidl, 'uidl')
if folded: res = res + "\n "
else: res = res + " "
# a custom port number you should be in expert mode and playing
# close enough attention to notice this...
self.service.set(defaultports[proto])
- if not proto in ("POP3", "APOP", "KPOP"): self.uidl.state = DISABLED
def user_edit(self, username, mode):
self.subwidgets[username] = UserEdit(username, self).edit(mode, Toplevel())
LabeledEntry(protwin, 'On server TCP/IP service:',
self.service, leftwidth).pack(side=TOP, fill=X)
self.defaultPort()
- Checkbutton(protwin,
- text="POP3: track `seen' with client-side UIDLs?",
- variable=self.uidl).pack(side=TOP)
Button(protwin, text='Probe for supported protocols', fg='blue',
command=self.autoprobe).pack(side=LEFT)
Button(protwin, text='Help', fg='blue',
}
break;
case 'U':
- ctl->server.uidl = FLAG_TRUE;
+ /* EMPTY - removed in 6.4.0 */
break;
case LA_IDLE:
ctl->idle = FLAG_TRUE;
P(GT_(" -G, --pwmd-file filename to use on the pwmd server\n"));
P(GT_(" -O, --pinentry-timeout seconds until pinentry is canceled\n"));
#endif
-
- P(GT_(" -U, --uidl force the use of UIDLs (pop3 only)\n"));
+
P(GT_(" --port TCP port to connect to (obsolete, use --service)\n"));
P(GT_(" -P, --service TCP service to connect to (can be numeric TCP port)\n"));
P(GT_(" --auth authentication type (password/kerberos/ssh/otp)\n"));
* we have a means of reliably tracking which mail we need to
* refetch should the connection abort in the middle.
* fetchall forces RETR, as does keep without UIDL */
- peek_capable = !ctl->fetchall && (!ctl->keep || ctl->server.uidl);
+ peek_capable = !ctl->fetchall;
}
static int pop3_getauth(int sock, struct query *ctl, char *greeting)
} else
return(ok);
- /*
- * Newer, RFC-1725/1939-conformant POP servers may not have the LAST
- * command. We work as hard as possible to hide this, but it makes
- * counting new messages intrinsically quadratic in the worst case.
- */
+ /* unless fetching all mail, get UID list (UIDL) */
last = 0;
*newp = -1;
- /* if there are messages, and UIDL is desired, use UIDL
- * also use UIDL if fetchall is unset */
- if (*countp > 0 && (!ctl->fetchall || ctl->server.uidl))
+ if (*countp > 0)
{
int fastuidl;
char id [IDLEN+1];
else
dofastuidl = 0;
- if (!ctl->server.uidl) {
- gen_send(sock, "LAST");
- ok = pop3_ok(sock, buf);
- } else
- ok = 1;
-
- if (ok == 0)
- {
- /* scan LAST reply */
- if (sscanf(buf, "%d", &last) == 0)
- {
- report(stderr, GT_("protocol error\n"));
- return(PS_ERROR);
- }
- *newp = (*countp - last);
- }
- else
{
/* do UIDL */
if (dofastuidl)
return(TRUE);
/* in fast uidl, we manipulate the old list only! */
-
if ((rec = find_uid_by_num(&ctl->oldsaved, num)))
{
/* we already have the id! */
yyerror(GT_("SDPS not enabled."));
#endif /* SDPS_ENABLE */
}
- | UIDL {current.server.uidl = FLAG_TRUE;}
- | NO UIDL {current.server.uidl = FLAG_FALSE;}
+ | UIDL {/* EMPTY - removed in 6.4.0 */}
+ | NO UIDL {/* EMPTY - removed in 6.4.0 */}
| CHECKALIAS {current.server.checkalias = FLAG_TRUE;}
| NO CHECKALIAS {current.server.checkalias = FLAG_FALSE;}
| SERVICE STRING {
/**
- * \file uid.c -- UIDL handling for POP3 servers without LAST
+ * \file uid.c -- UID list handling (currently, only for POP3)
*
* For license terms, see the file COPYING in this directory.
*/
#include "sdump.h"
/*
- * Machinery for handling UID lists live here. This is mainly to support
- * RFC1725/RFC1939-conformant POP3 servers without a LAST command, but may also
- * be useful for making the IMAP4 querying logic UID-oriented, if a future
- * revision of IMAP forces me to.
+ * Machinery for handling UID lists live here. This is currently used
+ * by POP3, but may also be useful for making the IMAP4 querying logic
+ * UID-oriented.
*
* These functions are also used by the rest of the code to maintain
* string lists.