fetchmail/fetchmail-6.3.8-starttls.patch

30 lines
1.0 KiB
Diff

# Patches fetchmail's behaviour for SMTP servers which insist
# on using TLS - we do not want messages which cannot be
# sent due to server negotiation problems lost - rather we
# keep them on the mailserver. As users should realize rather
# quickly that something went wrong, the overhead shouldn't
# be considered that important.
--- fetchmail-6.3.8.orig/sink.c 2007-03-30 00:45:17.000000000 +0200
+++ fetchmail-6.3.8.new/sink.c 2007-09-25 17:37:49.332165910 +0200
@@ -535,7 +535,19 @@
free(responses[0]);
return(PS_REFUSED);
- default:
+ case 530: /* must issue STARTTLS error */
+ /*
+ * Some SMTP servers insist on encrypted communication
+ * Let's set PS_TRANSIENT, otherwise all messages to be sent
+ * over such server would be blackholed
+ */
+ free(responses[0]);
+ if (outlevel > O_SILENT)
+ report_complete(stdout,
+ GT_(" SMTP server requires STARTTLS, keeping message.\n"));
+ return(PS_TRANSIENT);
+
+ default:
/* bounce non-transient errors back to the sender */
if (smtperr >= 500 && smtperr <= 599)
{