diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-08-25 14:14:05 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-08-25 14:14:05 +0000 |
commit | b54db4158f8dfb521a2464fbf9969bf09ef9d5b2 (patch) | |
tree | d4ad3df8a5e68d56f8c939e5aa3a502fa3d97e21 | |
parent | 10d0d2ea3016eace1a06e16f72dd785c32949a34 (diff) | |
download | fetchmail-b54db4158f8dfb521a2464fbf9969bf09ef9d5b2.tar.gz fetchmail-b54db4158f8dfb521a2464fbf9969bf09ef9d5b2.tar.bz2 fetchmail-b54db4158f8dfb521a2464fbf9969bf09ef9d5b2.zip |
Fixed SDPS support.
svn path=/trunk/; revision=2058
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | pop3.c | 26 | ||||
-rw-r--r-- | rcfile_y.y | 6 |
3 files changed, 19 insertions, 18 deletions
@@ -1,5 +1,10 @@ Release Notes: +fetchmail-4.5.7 (Tue Aug 25 00:29:44 EDT 1998): +* Fixed SDPS support (thanks to Chris Brooks). + +There are 253 people on fetchmail-friends and 272 on fetchmail-announce. + fetchmail-4.5.6 (Tue Aug 25 00:29:44 EDT 1998): * SDPS support, experimental version 2. Requires configure --enable-SDPS. * Major FAQ update. Added geocities warning. @@ -551,26 +551,22 @@ static int pop3_fetch(int sock, struct query *ctl, int number, int *lenp) { int linecount = 0; -#define DUMMY_HEADER "Delivered-To: " /* will only get discarded */ -#define DUMMY_LENGTH (sizeof(DUMMY_HEADER) - 1) - strcpy(buf, DUMMY_HEADER); sdps_envto = (char *)NULL; gen_send(sock, "*ENV %d", number); do { - if (gen_recv(sock, buf + DUMMY_LENGTH, sizeof(buf) - DUMMY_LENGTH)) - { - break; - } - linecount++; - if (linecount == 5) - { - sdps_envto = strdup(buf); - error(0, 0, "*ENV returned envelope address %s"); - } + if (gen_recv(sock, buf, sizeof(buf))) + { + break; + } + linecount++; + if (linecount == 5) + { + /* Wrap address with To: <> so nxtaddr() likes it */ + sdps_envto = malloc(strlen(buf)+7); + sprintf(sdps_envto,"To: <%s>",buf); + } } while (buf[0] !='.'); -#undef DUMMY_HEADER -#undef DUMMY_LENGTH } #endif /* SDPS_ENABLE */ @@ -139,13 +139,13 @@ serv_option : AKA alias_list current.server.port = KPOP_PORT; #endif /* INET6 */ } - | SDPS { -#ifdef ENABLE_SDPS + | PROTOCOL SDPS { +#ifdef SDPS_ENABLE current.server.protocol = P_POP3; current.server.sdps = TRUE; #else yyerror("SDPS not enabled."); -#endif /* ENABLE_SDPS */ +#endif /* SDPS_ENABLE */ } | UIDL {current.server.uidl = FLAG_TRUE;} | NO UIDL {current.server.uidl = FLAG_FALSE;} |