fetchmail 4.0.3 ()
* Replace vsprintf with vnsprintf to avoid buffer-overrun screws.
* Added via option to make ssh configuration cleaner.
+* Added dropstatus option to cope with xbuffy.
* Allow either `login' or `user' in .netrc files.
There are 257 people on the fetchmail-friends list.
continue;
}
+ /*
+ * If we see a Status line, it may have been inserted by an MUA
+ * on the mail host, or it may have been inserted by the server
+ * program after the headers in the transaction stream. This
+ * can actually hose some new-mail notifiers such as xbuffy,
+ * which assumes any Status line came from a *local* MDA and
+ * therefore indicates that the message has been seen.
+ *
+ * Some buggy POP servers (including at least the 3.3(20)
+ * version of the one distributed with IMAP) insert empty
+ * Status lines in the transaction stream; we'll chuck those
+ * unconditionally. Nonempty ones get chucked if the user
+ * turns on the dropstatus flag.
+ */
+ if (!strncasecmp(line, "Status:", 7))
+ {
+ char *cp;
+
+ for (cp = line + 7; *cp && isspace(*cp); cp++)
+ continue;
+
+ if (!*cp || ctl->dropstatus)
+ {
+ free(line);
+ continue;
+ }
+ }
+
/*
* OK, this is messy. If we're forwarding by SMTP, it's the
* SMTP-receiver's job (according to RFC821, page 22, section
DEFAULT(ctl->stripcr, (ctl->mda != (char *)NULL));
DEFAULT(ctl->forcecr, FALSE);
DEFAULT(ctl->pass8bits, FALSE);
+ DEFAULT(ctl->dropstatus, FALSE);
DEFAULT(ctl->server.dns, TRUE);
DEFAULT(ctl->server.uidl, FALSE);
#undef DEFAULT
printf(" Interpretation of Content-Transfer-Encoding is %sabled (pass8bits %s).\n",
ctl->pass8bits ? "dis" : "en",
ctl->pass8bits ? "on" : "off");
+ printf(" Nonempty Status lines will be %s (dropstatus %s)\n",
+ ctl->dropstatus ? "discarded" : "kept",
+ ctl->dropstatus ? "on" : "off");
if (ctl->limit > 0)
printf(" Message size limit is %d bytes (--limit %d).\n",
ctl->limit, ctl->limit);
flag stripcr; /* if TRUE, strip CRs in text */
flag forcecr; /* if TRUE, force CRs before LFs in text */
flag pass8bits; /* if TRUE, ignore Content-Transfer-Encoding */
+ flag dropstatus; /* if TRUE, drop Status lines in mail */
int limit; /* limit size of retrieved messages */
int fetchlimit; /* max # msgs to get in single poll */
int batchlimit; /* max # msgs to pass in single SMTP session */
stripcr
forcecr
pass8bits
+ dropstatus
dns
no keep
no flush
no stripcr
no forcecr
no pass8bits
+ no dropstatus
no dns
no envelope
limit
.PP
All options correspond to the obvious command-line arguments, except
the following: `via', `interval', `aka', `is', `to', `dns'/`no dns',
-\&`password', \&`preconnect', `localdomains', `stripcr'/`no stripcr' ,
-\&`forcecr'/`no forcecr', `pass8bits'/`no pass8bits' and `no
-received'.
+\&`password', \&`preconnect', `localdomains', `stripcr'/`no stripcr',
+\&`forcecr'/`no forcecr', `pass8bits'/`no pass8bits' `dropstatus/no
+dropstatus', and `no received'.
.PP
The `via' option is for use with ssh, or if you want to have more
than one configuration pointing at the same site. If it is present,
the listener is 8-bit-clean (as all the major ones now are) the right
thing will probably result.
.PP
+The `dropstatus' option controls whether nonempty Status lines are
+retained in fetched mail (the default) or discarded. Retaining them
+allows your MUA to see what messages (if any) were marked seen on the
+client. On the other hand, it can confuse some new-mail notifiers,
+which assume that anything with a Status line in it has been seen.
+(Note: the empty Status lines inserted by some buggy POP servers are
+unconditionally discarded.)
+.PP
Legal protocol identifiers are
auto (or AUTO)
forcecr { return FORCECR; }
stripcr { return STRIPCR; }
pass8(bits)? { return PASS8BITS; }
+dropstatus? { return DROPSTATUS; }
dns { return DNS; }
uidl { return UIDL; }
%token <proto> PROTO
%token <sval> STRING
%token <number> NUMBER
-%token NO KEEP FLUSH FETCHALL REWRITE FORCECR STRIPCR PASS8BITS
+%token NO KEEP FLUSH FETCHALL REWRITE FORCECR STRIPCR PASS8BITS DROPSTATUS
%token DNS PORT UIDL INTERVAL
%%
| FORCECR {current.forcecr = FLAG_TRUE;}
| STRIPCR {current.stripcr = FLAG_TRUE;}
| PASS8BITS {current.pass8bits = FLAG_TRUE;}
+ | DROPSTATUS {current.dropstatus = FLAG_TRUE;}
| NO KEEP {current.keep = FLAG_FALSE;}
| NO FLUSH {current.flush = FLAG_FALSE;}
| NO REWRITE {current.rewrite = FLAG_FALSE;}
| NO FORCECR {current.forcecr = FLAG_FALSE;}
| NO STRIPCR {current.stripcr = FLAG_FALSE;}
+ | NO PASS8BITS {current.pass8bits = FLAG_FALSE;}
+ | NO DROPSTATUS {current.dropstatus = FLAG_FALSE;}
| LIMIT NUMBER {current.limit = $2;}
| FETCHLIMIT NUMBER {current.fetchlimit = $2;}
# forcecr
# stripcr
# pass8bits
+# dropstatus
# dns
# no keep
# no flush
# no stripcr
# no dns
# no envelope
+# no pass8bits
+# no dropstatus
# limit -- must be followed by numeric size limit
# fetchlimit -- must be followed by numeric msg fetch limit
# batchlimit -- must be followed by numeric SMTP batch limit