]> Pileus Git - ~andy/fetchmail/commitdiff
Back out --smtp list from bouncing. Sunil reports that this may require AUTH or other...
authorMatthias Andree <matthias.andree@gmx.de>
Sat, 24 Feb 2007 10:11:57 +0000 (10:11 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sat, 24 Feb 2007 10:11:57 +0000 (10:11 -0000)
svn path=/branches/BRANCH_6-3/; revision=5042

NEWS
sink.c

diff --git a/NEWS b/NEWS
index 66a7f4161e7c9be11884016d9e1900122e538827..23278519b16f3f0081027fae239557f4e8eb4719 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -44,10 +44,8 @@ be removed from a 6.4.0 or newer release.)
 
 fetchmail 6.3.8 (not yet released):
 
-# BUG FIXES (LONG-STANDING BUGS):
+# BUG FIXES:
 * Fix pluralization of oversized-message warning mails.
-* Fetchmail now iterates over the --smtp[host] list when bouncing and not in
-  --lmtp mode. Reported by Christian Kurz, Debian Bug #150137.
 
 # KNOWN BUGS AND WORKAROUNDS:
   (this section floats upwards through the NEWS file so it stays with the
diff --git a/sink.c b/sink.c
index afd1439efb9778709f2b79df9c04bbbce1e2b7dc..92477ef9e145abe6ad1621bcf6d41c8bfbe3e8a7 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -258,7 +258,6 @@ static int send_bouncemail(struct query *ctl, struct msgblk *msg,
     char daemon_name[15 + HOSTLEN] = "MAILER-DAEMON@";
     char boundary[BUFSIZ], *bounce_to;
     int sock;
-    struct idlist *ish;
     static char *fqdn_of_host = NULL;
     const char *md1 = "MAILER-DAEMON", *md2 = "MAILER-DAEMON@";
 
@@ -277,37 +276,10 @@ static int send_bouncemail(struct query *ctl, struct msgblk *msg,
                                        lose the NDN here */
     strlcat(daemon_name, fqdn_of_host, sizeof(daemon_name));
 
-    /* XXX FIXME: we blindly assume that any host on our smtphunt list
-     * and offers SMTP will accept our bounce; however, in global lmtp
-     * mode we'll just try localhost instead. */
     /* we need only SMTP for this purpose */
-    sock = -1;
-    if (ctl->smtphunt && ctl->listener == SMTP_MODE) {
-       for (ish = ctl->smtphunt ; ish; ish = ish->next) {
-           char *x = xstrdup(ish->id), *y, *port;
-
-           /* skip over LMTP entries */
-           if (x[0] == '/') {
-               free(x);
-               continue;
-           }
-
-           if ((y = strrchr(x, '/'))) {
-               *y = '\0';
-               port = y + 1;
-           } else {
-               port = SMTP_PORT;
-           }
-           sock = SockOpen(x, port, NULL, &ai1);
-           free(x);
-           if (sock != -1)
-               break;
-       }
-    } else {
-       sock = SockOpen("localhost", SMTP_PORT, NULL, &ai1);
-    }
-
-    if (sock == -1)
+    /* XXX FIXME: hardcoding localhost is nonsense if smtphost can be
+     * configured */
+    if ((sock = SockOpen("localhost", SMTP_PORT, NULL, &ai1)) == -1)
        return(FALSE);
 
     if (SMTP_ok(sock, SMTP_MODE) != SM_OK)