aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-12-30 21:24:40 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-12-30 21:24:40 +0000
commit0ad59c275bcbc27b63b6f99996eecc99ac559321 (patch)
tree3303f735e84a0ef476407ef50881dc94af5275ed
parenta37cf60e7985ab1fd27758d86c1de72412281c82 (diff)
downloadfetchmail-0ad59c275bcbc27b63b6f99996eecc99ac559321.tar.gz
fetchmail-0ad59c275bcbc27b63b6f99996eecc99ac559321.tar.bz2
fetchmail-0ad59c275bcbc27b63b6f99996eecc99ac559321.zip
Add more RFC1894.
svn path=/trunk/; revision=2300
-rw-r--r--sink.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sink.c b/sink.c
index 6ec32d87..2f5b7f9d 100644
--- a/sink.c
+++ b/sink.c
@@ -256,7 +256,7 @@ static int send_bouncemail(struct msgblk *msg, int userclass,
/* bounce back an error report a la RFC 1892 */
{
char daemon_name[18 + HOSTLEN] = "FETCHMAIL-DAEMON@";
- char boundary[BUFSIZ];
+ char boundary[BUFSIZ], *ts;
int i, sock;
/* don't bounce in reply to undeliverable bounces */
@@ -280,6 +280,8 @@ static int send_bouncemail(struct msgblk *msg, int userclass,
"om-mani-padme-hum-%d-%d-%ld",
getpid(), getppid(), time((time_t *)NULL));
+ ts = rfc822timestamp();
+
if (outlevel >= O_VERBOSE)
error(0, 0, "SMTP: (bounce-message body)");
@@ -320,6 +322,7 @@ static int send_bouncemail(struct msgblk *msg, int userclass,
/* Minimum RFC1894 compliance + Diagnostic-Code field */
SockPrintf(sock, "\r\n");
SockPrintf(sock, "Final-Recipient: rfc822; %s\r\n", idp->id);
+ SockPrintf(sock, "Last-Attempt-Date: %s\r\n", ts);
SockPrintf(sock, "Action: failed\r\n");
if (nerrors == 1)
@@ -423,7 +426,9 @@ static int handle_smtp_error(struct query *ctl, struct msgblk *msg)
* a future retrieval cycle.
*
* Bouncemail *might* be appropriate here as a delay
- * notification. But it's not really necessary because
+ * notification (note; if we ever add this, we must make
+ * sure the RFC1894 Action field is "delayed" rather thwn
+ * "failed"). But it's not really necessary because
* this is not an actual failure, we're very likely to be
* able to recover on the next cycle.
*/