diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-10-13 21:11:33 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-10-13 21:11:33 +0000 |
commit | 5480ab320b813bddefe7383582c45b88bec00013 (patch) | |
tree | bdef3e4ea6f663efc97a68830cefe85683039fae /driver.c | |
parent | c868890caebd7a1408665c7799864b08be0a4021 (diff) | |
download | fetchmail-5480ab320b813bddefe7383582c45b88bec00013.tar.gz fetchmail-5480ab320b813bddefe7383582c45b88bec00013.tar.bz2 fetchmail-5480ab320b813bddefe7383582c45b88bec00013.zip |
Added envelope-skip feature.
svn path=/trunk/; revision=1509
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -543,7 +543,7 @@ int num; /* index of message */ char buf[MSGBUFSIZE+1], return_path[MSGBUFSIZE+1]; int from_offs, ctt_offs, env_offs, next_address; char *headers, *received_for, *desthost, *rcv; - int n, linelen, oldlen, ch, remaining; + int n, linelen, oldlen, ch, remaining, skipcount; char *cp; struct idlist *idp, *xmit_names; flag good_addresses, bad_addresses, has_nuls; @@ -562,6 +562,7 @@ int num; /* index of message */ from_offs = ctt_offs = env_offs = -1; oldlen = 0; msglen = 0; + skipcount = 0; for (remaining = fetchlen; remaining > 0 || protocol->delimited; remaining -= linelen) { @@ -778,11 +779,17 @@ int num; /* index of message */ if (env_offs == -1 && !strncasecmp(ctl->server.envelope, line, strlen(ctl->server.envelope))) + if (skipcount++ != ctl->server.envskip) + continue; env_offs = (line - headers); } #ifdef HAVE_RES_SEARCH else if (!received_for && !strncasecmp("Received:", line, 9)) + { + if (skipcount++ != ctl->server.envskip) + continue; received_for = parse_received(ctl, line); + } #endif /* HAVE_RES_SEARCH */ } } |