aboutsummaryrefslogtreecommitdiffstats
path: root/sink.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2002-04-01 07:50:04 +0000
committerEric S. Raymond <esr@thyrsus.com>2002-04-01 07:50:04 +0000
commit71bc7ce6858ee50574dc574a948ea24b5d2d0bfc (patch)
tree99f8d8677fdb18690839fa5d8023aae4016c90b6 /sink.c
parent26a916d0536f4048e3379bc7fe663ceb0944ce34 (diff)
downloadfetchmail-71bc7ce6858ee50574dc574a948ea24b5d2d0bfc.tar.gz
fetchmail-71bc7ce6858ee50574dc574a948ea24b5d2d0bfc.tar.bz2
fetchmail-71bc7ce6858ee50574dc574a948ea24b5d2d0bfc.zip
Debian 5.9.10 fixes.
svn path=/trunk/; revision=3603
Diffstat (limited to 'sink.c')
-rw-r--r--sink.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sink.c b/sink.c
index bd1d9243..74244e10 100644
--- a/sink.c
+++ b/sink.c
@@ -618,6 +618,7 @@ static int open_smtp_sink(struct query *ctl, struct msgblk *msg,
char **from_responses;
#endif /* EXPLICIT_BOUNCE_ON_BAD_ADDRESS */
int total_addresses;
+ int force_transient_error;
/*
* Compute ESMTP options.
@@ -727,7 +728,8 @@ static int open_smtp_sink(struct query *ctl, struct msgblk *msg,
#ifdef EXPLICIT_BOUNCE_ON_BAD_ADDRESS
char errbuf[POPBUFSIZE];
#endif /* EXPLICIT_BOUNCE_ON_BAD_ADDRESS */
- handle_smtp_report(ctl, msg);
+ if (handle_smtp_report(ctl, msg) == PS_TRANSIENT)
+ force_transient_error = 1;
#ifdef EXPLICIT_BOUNCE_ON_BAD_ADDRESS
#ifdef HAVE_SNPRINTF
@@ -774,6 +776,14 @@ static int open_smtp_sink(struct query *ctl, struct msgblk *msg,
*/
if (!(*good_addresses))
{
+ if (force_transient_error) {
+ /* do not risk dataloss due to overengineered multidrop
+ * crap. If one of the recipients returned PS_TRANSIENT,
+ * we return exactly that.
+ */
+ SMTP_rset(ctl->smtp_socket); /* required by RFC1870 */
+ return(PS_TRANSIENT);
+ }
if (!run.postmaster[0])
{
if (outlevel >= O_VERBOSE)