From a694f25943adda181db8954e8351d21fe8bec964 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 3 Dec 1997 05:42:57 +0000 Subject: Generate RFC822 dates. svn path=/trunk/; revision=1555 --- NEWS | 4 +++- configure.in | 2 +- driver.c | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9595e541..fc0601c3 100644 --- a/NEWS +++ b/NEWS @@ -22,8 +22,10 @@ fetchmail-4.3.4 () * Improved POP3 protocol-synchronization error messages. * Allow fetchmail to proceed even if DNS is down or unavailable, if all multidrop entries have `no dns'. +* Added Robert de Bath's "fetchspool" script to contrib. +* Use strftime(3) to gen a proper RFC822 date into fetchmail's Received header. -There are 274 people on fetchmail-friends and 95 on fetchmail-announce. +There are 272 people on fetchmail-friends and 96 on fetchmail-announce. fetchmail-4.3.3 (Sat Nov 22 01:51:41 EST 1997) * Robert Hardy 's patch to use IMAP EXAMINE in check mode. diff --git a/configure.in b/configure.in index a8275080..c9a10f1b 100644 --- a/configure.in +++ b/configure.in @@ -80,7 +80,7 @@ AC_SUBST(EXTRAOBJ) AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \ strrchr strerror setlinebuf syslog snprintf vprintf vsnprintf vsyslog \ - atexit inet_aton) + atexit inet_aton strftime) # Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky # and breaks gethostbyname(2). It's better to use the bind stuff in the C diff --git a/driver.c b/driver.c index 7e5824ce..7607004b 100644 --- a/driver.c +++ b/driver.c @@ -1214,7 +1214,16 @@ int num; /* index of message */ buf[1] = '\0'; time(&now); +#ifdef STRFTIME + /* conform to RFC822 */ + strftime(buf, sizeof(buf), "%a, %d b %Y %H:%M:%S %Z\n", localtime(&now)); +#else + /* + * This is really just a fallback, as the date format ctime(3) + * emits is not RFC822 conformant. + */ strcat(buf, ctime(&now)); +#endif /* STRFTIME */ n = stuffline(ctl, buf); } } -- cgit v1.2.3