From 1b511d27a3d871f805529cc87993b5385996bb76 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 21 Aug 1999 06:05:51 +0000 Subject: Don't bounce mail on transient errors. svn path=/trunk/; revision=2543 --- NEWS | 1 + sink.c | 14 +++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index b42a69e2..f504749a 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ fetchmail-5.0.7 (): * Variouas small option-processing fixes. * Teach fetchmailconf about HP OpenMail. * SunOS compilation fixes. +* Steve Dodd's fix to not send bouncemail on transient errors. There are 263 people on fetchmail-friends and 421 on fetchmail-announce. diff --git a/sink.c b/sink.c index 0421f2c7..52efa37a 100644 --- a/sink.c +++ b/sink.c @@ -460,14 +460,14 @@ static int handle_smtp_report(struct query *ctl, struct msgblk *msg) 1, responses); return(PS_REFUSED); - default: /* bounce the error back to the sender */ + default: /* bounce non-transient errors back to the sender */ SMTP_rset(ctl->smtp_socket); /* stay on the safe side */ - if (send_bouncemail(ctl, msg, XMIT_ACCEPT, - "General SMTP/ESMTP error.\r\n", - 1, responses)) - return(run.bouncemail ? PS_REFUSED : PS_TRANSIENT); - else - return(PS_TRANSIENT); + if (smtperr >= 500 && smtperr <= 599) + if (send_bouncemail(ctl, msg, XMIT_ACCEPT, + "General SMTP/ESMTP error.\r\n", + 1, responses)) + return(run.bouncemail ? PS_REFUSED : PS_TRANSIENT); + return(PS_TRANSIENT); } } -- cgit v1.2.3