]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_smtp.c
removed all references to sprintf from several files (not all files yet)
[citadel.git] / citadel / serv_smtp.c
index e7ac6a00f095c12c61b966452d7ab4d6daa92fbe..25082d77c12e04fca656e6bedf7f3a17de98c94c 100644 (file)
@@ -470,14 +470,17 @@ void smtp_data(void) {
 
        cprintf("354 Transmit message now; terminate with '.' by itself\r\n");
        
-       datestring(nowstamp, time(NULL), DATESTRING_RFC822);
+       datestring(nowstamp, sizeof nowstamp, time(NULL), DATESTRING_RFC822);
        body = mallok(4096);
 
+       /* FIXME
+          it should be Received: from %s (real.name.dom [w.x.y.z])
+        */
        if (body != NULL) snprintf(body, 4096,
-               "Received: from %s\n"
-               "       by %s;\n"
-               "       %s\n",
+               "Received: from %s (%s)\n"
+               "       by %s; %s\n",
                        SMTP->helo_node,
+                       CC->cs_host,
                        config.c_fqdn,
                        nowstamp);