]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_smtp.c
* Add specific error codes for every command on the wire protocol, so that
[citadel.git] / citadel / serv_smtp.c
index 5941ebaf697c78deab0b4f5c2079f68bc3bcba6c..56408ca6e245398c5354293b7e83a1b0ab203883 100644 (file)
@@ -161,10 +161,23 @@ void smtp_hello(char *argbuf, int which_command) {
        }
 
        if (which_command == 0) {
-               cprintf("250 Greetings and joyous salutations.\r\n");
+               cprintf("250 Hello %s (%s [%s])\r\n",
+                       SMTP->helo_node,
+                       CC->cs_host,
+                       CC->cs_addr
+               );
        }
        else {
-               cprintf("250-Greetings and joyous salutations.\r\n");
+               if (which_command == 1) {
+                       cprintf("250-Hello %s (%s [%s])\r\n",
+                               SMTP->helo_node,
+                               CC->cs_host,
+                               CC->cs_addr
+                       );
+               }
+               else {
+                       cprintf("250-Greetings and joyous salutations.\r\n");
+               }
                cprintf("250-HELP\r\n");
                cprintf("250-SIZE %ld\r\n", config.c_maxmsglen);
                cprintf("250-PIPELINING\r\n");
@@ -174,6 +187,7 @@ void smtp_hello(char *argbuf, int which_command) {
 }
 
 
+
 /*
  * Implement HELP command.
  */
@@ -1468,7 +1482,7 @@ void cmd_smtp(char *argbuf) {
        }
 
        else {
-               cprintf("%d Invalid command.\n", ERROR+ILLEGAL_VALUE);
+               cprintf("%d Invalid command.\n", ERROR + ILLEGAL_VALUE);
        }
 
 }