]> diplodocus.org Git - mdeliver/commitdiff
Document the get_filename, strip_from, and copy_message functions.
authorepg <>
Sun, 25 Aug 2002 07:22:41 +0000 (07:22 +0000)
committerepg <>
Sun, 25 Aug 2002 07:22:41 +0000 (07:22 +0000)
mdeliver.c

index 70f24ea..fb266d7 100644 (file)
@@ -69,6 +69,10 @@ full_write(int fd, const char *buf, size_t nbytes)
     return w;
 }
 
+/* Find a filename for the message according to the algorithm
+ * documented in the maildir(5) manual page from qmail
+ * (http://www.qmail.org/qmail-manual-html/man5/maildir.html).
+ */
 static void
 get_filename(char *fn)
 {
@@ -109,6 +113,14 @@ get_filename(char *fn)
     }
 }
 
+/* Strip the non-RFC2822-compliant 'From ' line some busted-ass
+ * mailers (such as Postfix) add as the first line of input.  This bit
+ * of historical gunk originated with Berkeley mbox files, which use
+ * this line to indicate the beginning of a message.  Postfix should
+ * only add such a line when it is acting as an MDA and delivering to
+ * a Berkeley mbox; the data written to an external MDA should be the
+ * raw RFC2822 message.  >sigh<
+ */
 /* buf is passed only as an (early, evil) space optimization). */
 static void
 strip_from(int fd, char *buf, char *fn)
@@ -141,6 +153,7 @@ strip_from(int fd, char *buf, char *fn)
     }
 }
 
+/* Copy the message from stdin to fd. */
 /* buf is passed only as an (early, evil) space optimization). */
 static void
 copy_message(int fd, char *buf, char *fn)