]> Pileus Git - ~andy/fetchmail/commitdiff
Always treat 530 SMTP codes as temporary.
authorMatthias Andree <matthias.andree@gmx.de>
Mon, 25 May 2009 15:56:52 +0000 (15:56 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Mon, 25 May 2009 15:56:52 +0000 (15:56 -0000)
These are usually configuration errors (missing TLS/SSL). Patch
partially taken from Petr Cerny, Novell's Bugzilla 246829.

svn path=/branches/BRANCH_6-3/; revision=5339

NEWS
TODO.txt
sink.c

diff --git a/NEWS b/NEWS
index e7c007a4e3aaff750fcddd0add147b5ad50eac7a..0da6eb25e602a3a954fdf78e493dbedf2b7b02a9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -93,6 +93,10 @@ fetchmail 6.3.10 (not yet released):
 * The ESMTP/LMTP client will now apply an application-specific timeout while
   waiting for the EHLO/LHLO response, rather than wait for the server or TCP
   connection timeout.
+* Treat 530 errors as temporary, so as not to delete messages on configuration
+  errors. Partially taken from Petr Cerny's patch in Novell Bugzilla #246829.
+  The 501 part of said patch was not added, as the maintainer is not convinced
+  501 is a temporary condition, and softbounce takes care of this anyways.
 
 # CHANGES
 * Make the comparison of the SSL fingerprints case insensitive, to
index d54798c8a9761f9112a7b7957ff8de2e8471d05c..5c35bfec1bb2147d9482ee52c55d7094d51c54f0 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -6,8 +6,6 @@ soon - MUST:
   See http://sourceware.org/bugzilla/show_bug.cgi?id=6453
 
 soon - SHOULD:
-- https://bugzilla.novell.com/show_bug.cgi?id=246829 - recycle part of
-  patch (STARTTLS required; 5XX error code in contradiction with manual?)
 - allow \Deleted without \Seen, rf. 
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466299
 - document IMAP4 ACL requirements
diff --git a/sink.c b/sink.c
index 78630a021bb652c0da084790acf89748ecc27d85..3db9def45497eb70cbfc64e5c25a91eb8a91fb71 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -539,6 +539,18 @@ static int handle_smtp_report(struct query *ctl, struct msgblk *msg)
        free(responses[0]);
        return(PS_REFUSED);
 
+    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 - see RFC 3207.
+        */
+       if (outlevel > O_SILENT)
+               report_complete(stdout,
+                               GT_("SMTP server requires STARTTLS, keeping message.\n"));
+       free(responses[0]);
+       return(PS_TRANSIENT);
+
     default:
        /* bounce non-transient errors back to the sender */
        if (smtperr >= 500 && smtperr <= 599)