]> Pileus Git - ~andy/fetchmail/commitdiff
RFC1894 conformance.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 30 Dec 1998 18:12:30 +0000 (18:12 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 30 Dec 1998 18:12:30 +0000 (18:12 -0000)
svn path=/trunk/; revision=2297

NEWS
fetchmail-features.html
fetchmail.man
sink.c

diff --git a/NEWS b/NEWS
index 74646f264be58b4a9d081bbd51f3531a6784eaea..788c8e9a1f0f2a98b919c131700691cddfd195ba 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -4,8 +4,9 @@ fetchmail-4.7.3 ():
 * Added new FAQ item G11 and added material to R1.
 * Do a full antispam check on the EOM response in case the local MTA does
   content analysis of the message body.
+* Bouncemail now conforms to RFC1984 correctly.
 
-There are 246 people on fetchmail-friends and 329 on fetchmail-announce.
+There are 249 people on fetchmail-friends and 337 on fetchmail-announce.
 
 fetchmail-4.7.2 (Fri Dec 25 01:01:54 EST 1998):
 * Don't append the destination address to a postmaster name containing @.
index 7cdf489f20b2ccbf00bf16c69e69c9393a7c2c47..23be2ce128143848855e84477ab0b820949cf997 100644 (file)
@@ -10,7 +10,7 @@
 <table width="100%" cellpadding=0><tr>
 <td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
 <td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/12/15 16:17:21 $
+<td width="30%" align=right>$Date: 1998/12/30 18:12:29 $
 </table>
 <HR>
 
@@ -18,7 +18,7 @@
 
 <H2>Since 4.0:</H2>
 <UL>
-<LI> Fetchmail now sends bouncemail on SMTP and LMTP errors.
+<LI> Fetchmail now sends RFC1984-conformant bouncemail on SMTP and LMTP errors.
 
 <LI> Full support for LMTP according to RFC2033.
 
@@ -165,7 +165,7 @@ get-mail, gwpop, pimp-1.0, pop-perl5-1.2, popc, popmail-1.6 and upop.<P>
 <table width="100%" cellpadding=0><tr>
 <td width="30%">Back to <a href="index.html">Fetchmail Home Page</a>
 <td width="30%" align=center>To <a href="/~esr/sitemap.html">Site Map</a>
-<td width="30%" align=right>$Date: 1998/12/15 16:17:21 $
+<td width="30%" align=right>$Date: 1998/12/30 18:12:29 $
 </table>
 
 <P><ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com">&lt;esr@snark.thyrsus.com&gt;</A></ADDRESS>
index d6467bf58b3b39344d1489fbfd7ea6d843f52ae4..81a3cc18186b03ce0e3a08fe4ddf3ee19971c250 100644 (file)
@@ -1783,8 +1783,7 @@ MDA.  For maximum safety, however, don't use an mda command containing
 %F or %T when fetchmail is run from the root account itself.
 .PP
 Fetchmail's method of sending bouncemail requires that port 25 of localhost
-be available for sending mail via SMTP.  The bouncemail format conforms
-to 1892, but not yet to 1894.
+be available for sending mail via SMTP.
 .PP
 Send comments, bug reports, gripes, and the like to the
 fetchmail-friends list <fetchmail-friends@ccil.org>.  An HTML FAQ is
diff --git a/sink.c b/sink.c
index bed6be17ff82e1d9b286ccef55e1c390d7ab8d31..55bc53b70c16255a62e13a473138fe8f4539e55c 100644 (file)
--- a/sink.c
+++ b/sink.c
@@ -307,45 +307,35 @@ static int send_bouncemail(struct msgblk *msg,
        SockPrintf(sock, "--%s\r\n", boundary); 
        SockPrintf(sock,"Content-Type: message/delivery-status\r\n");
        SockPrintf(sock, "\r\n");
-#ifdef RFC1894
-       SockPrintf(sock, "Reporting-MTA: DNS; %s\r\n", fetchmailhost);
-#endif /* RFC1894 */
+       SockPrintf(sock, "Reporting-MTA: dns; %s\r\n", fetchmailhost);
        for (i = 0; i < nerrors; i++)
        {
-#ifndef RFC1894
-           SockPrintf(sock, "%s\r\n", errors[i]);
-#else
            /* Minimum RFC1894 compliance + Diagnostic-Code field */
            SockPrintf(sock, "\r\n");
-           /*
-            * And here's the real reason RFC1984-style DSNs don't
-            * work; we can't generate Final-Recipient properly.
-            * First, fetchmailhost is probably going to be just
-            * `localhost'.  Secondly, we're only sure of the final
-            * recipient in the single-drop case; in the multidrop
-            * case, we don't have any idea how to get that
-            * information (it's not guaranteed that errors even
-            * correspond one-to-one with recipients).
-            */
-           SockPrintf(sock, "Final-Recipient: RFC822; %s@%s\r\n",
-                      msg->recipients->id,
-                      fetchmailhost);
+           if (msg->recipients && !msg->recipients->next)
+               SockPrintf(sock, "Final-Recipient: rfc822; %s\r\n",
+                      msg->recipients->id);
+           else
+               /*
+                * This is technically compliant with RFC1894,
+                * because "multidrop;" is an RFC822 group
+                * address.  It kind of evades the intent, though.
+                * Unfortunately, it's just too hard to do the
+                * right thing here when there are multiiple
+                * multidrop recipients; we don't know how to
+                * associate them with the list of errors passed in.
+                */
+               SockPrintf(sock,"Final-Recipient: rfc822; multidrop; (see the message headers below)\r\n");
            SockPrintf(sock, "Action: failed\r\n");
            if (strlen(errors[i]) > 9 && isdigit(errors[i][4])
-               && errors[i][5] == '.' && isdigit(errors[i][6])
-               && errors[i][7] == '.' && isdigit(errors[i][8]))
-           {
+                       && errors[i][5] == '.' && isdigit(errors[i][6])
+                       && errors[i][7] == '.' && isdigit(errors[i][8]))
                /* Enhanced status code available, use it */
                SockPrintf(sock, "Status: %5.5s\r\n", &(errors[i][4]));
-               SockPrintf(sock, "Diagnostic-Code: smtp; %3.3s%s\r\n", errors[i], &(errors[i][9]));
-           } 
            else
-           {
                /* Enhanced status code not available, fake one */
                SockPrintf(sock, "Status: %c.0.0\r\n", errors[i][0]);
-               SockPrintf(sock, "Diagnostic-Code: smtp; %s\r\n", errors[i]);
-           }
-#endif /* RFC1894 */
+           SockPrintf(sock, "Diagnostic-Code: %s\r\n", errors[i]);
        }
        SockPrintf(sock, "\r\n");
     }