]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Adding help command
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 12 Aug 2025 12:34:52 +0000 (08:34 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Tue, 12 Aug 2025 12:34:52 +0000 (08:34 -0400)
data-feed/feed21.tst
lib/lvleml.c
lib/unieml.c
lib/unieml.h

index 080eb8f201016fe71cd90a6c11184d509fef99e1..05d2ab15df32eb5107b87d7ea6256719ebb0e025 100644 (file)
@@ -3,11 +3,4 @@
 T:(feed20) Testing double connectopm
 R:220 mailleur.example.com, ESMTP (cleartext) mailleur...
 #====================================================
-S:HELO example.com
-R:250 mailleur.example.com, link (cleartext) ready,...
-C:ORGN: 185.242.226.23
-R:220 mailleur.example.com, ESMTP (cleartext) mailleur...
-C:WAIT 5       #wait 5 sec
-S:QUIT
-R:221 2.0.0 Bye, closing connection...
 #-------------------------------------------------------------------------
index 8ebab75b22c542bccca1854c740fad471f54d912..a1062519bdb8771f38463aadea03d0fe3e3794ca 100644 (file)
@@ -2464,6 +2464,12 @@ while (proceed==true) {
     case c_ehlo         :       //EHLO SMTP protocol
       proceed=doehlo(contact,line);
       break;
+    case c_help         :       //HELP SMTP protocol
+      (void) eml_transmit(contact,true,"%d-2.0.1 see https://datatracker.ietf.org"
+                                        "/doc/html/rfc5321",
+                                        GOTHELP);
+      (void) sleep(1);          //avoiding abuse
+      break;
     case c_noop         :       //No Operation
       (void) eml_transmit(contact,true,"%d 2.0.0 OK, %s",    
                                        CMDOK,contact->mainsesid);
index f505c920bd68864c907a5713b0c844fcf85cacbe..2199fcb2747744708957392cb9c1d51939ed8200 100644 (file)
@@ -35,6 +35,7 @@ static VOCTYP vocsmtp[]={
                 {c_data,"DATA"},
                 {c_ehlo,"EHLO"},
                 {c_helo,"HELO"},
+                {c_help,"HELP"},
                 {c_mail,"MAIL FROM:"},
                 {c_noop,"NOOP"},
 #if   MODEDEBUG
index 90604d280fc8c7b5851ab1c780993e9893d85840..27337664cf98abe3f0317924782816d214eaa98c 100644 (file)
@@ -17,6 +17,7 @@
 
 #define MXMSIZE "52428800"      //52 Megabytes
 #define CRLF    "\r\n"          //EOL within SMTP protocol
+#define        GOTHELP 214             //Help message (A response to the HELP command)
 #define        SIGNON  220             //signon information
 #define        QUITOK  221             //status on quit
 #define IDOK    235             //Authentication ID OK
@@ -72,6 +73,7 @@ typedef enum    {               //list of SMTP protocol keyword
         c_data,                 //DATA email contents transfer request
         c_ehlo,                 //EHLO command
         c_helo,                 //Basic Helo command
+        c_help,                 //HELP command
         c_mail,                 //'mail from:' sequence detected
         c_noop,                 //No Operation request
 #ifdef  MODEDEBUG