From: Jean-Marc Pigeon (Delson) Date: Tue, 12 Aug 2025 12:34:52 +0000 (-0400) Subject: Adding help command X-Git-Tag: tag-0.15~18 X-Git-Url: https://jmp-git.ovh.safe.ca/?a=commitdiff_plain;h=899fbe0c4dcb6ef58406dde0cff9535c9725794f;p=jmp%2Fmailleur Adding help command --- diff --git a/data-feed/feed21.tst b/data-feed/feed21.tst index 080eb8f..05d2ab1 100644 --- a/data-feed/feed21.tst +++ b/data-feed/feed21.tst @@ -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... #------------------------------------------------------------------------- diff --git a/lib/lvleml.c b/lib/lvleml.c index 8ebab75..a106251 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -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); diff --git a/lib/unieml.c b/lib/unieml.c index f505c92..2199fcb 100644 --- a/lib/unieml.c +++ b/lib/unieml.c @@ -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 diff --git a/lib/unieml.h b/lib/unieml.h index 90604d2..2733766 100644 --- a/lib/unieml.h +++ b/lib/unieml.h @@ -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