aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-07-28 16:16:13 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-07-28 16:16:13 +0000
commit7301e74a9bfbf0abaf2782bc2b7112a84bcd32c8 (patch)
treed7c878d5f6eb90b1a132cc200b44ea022c9fa144 /driver.c
parentf7aef23b0c18a1ee4724f9e10984427cdee07c5d (diff)
downloadfetchmail-7301e74a9bfbf0abaf2782bc2b7112a84bcd32c8.tar.gz
fetchmail-7301e74a9bfbf0abaf2782bc2b7112a84bcd32c8.tar.bz2
fetchmail-7301e74a9bfbf0abaf2782bc2b7112a84bcd32c8.zip
Added the dropstatus option.
svn path=/trunk/; revision=1183
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/driver.c b/driver.c
index 934ddacb..44e2e309 100644
--- a/driver.c
+++ b/driver.c
@@ -598,6 +598,34 @@ char *realname; /* real name of host */
}
/*
+ * 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
* 4.1.1) to generate a Return-Path line on final delivery.