From 53c11477da4ac483b0e6be68200698b9804f33b8 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Sat, 26 Jul 2025 08:07:59 -0400 Subject: [PATCH] Improved contact->credit handling --- lib/lvleml.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/lvleml.c b/lib/lvleml.c index b570421..947af13 100644 --- a/lib/lvleml.c +++ b/lib/lvleml.c @@ -1583,12 +1583,11 @@ while (proceed==true) { break; case 4 : //check if contact authenticated switch (contact->privilege) { + case rel_isrelay : //Remote IP was already relaying + //NO BREAK; case rel_authentic : //User was authenticated break; - case rel_plain : //remote IP is Bplain - //NO BREAK; - case rel_isrelay : //Remote IP way already relay - contact->privilege=rel_plain; + case rel_plain : //remote IP is plain if ((status=checkcredit(contact))!=CMDOK) { (void) transmit(contact,true,"%d 5.5.4 Closing connection",status); phase=999; //bad credit not need to go further @@ -2421,9 +2420,9 @@ while (proceed==true) { CMDOK,contact->mainsesid); break; case c_quit : //QUIT SMTP protocol - (void) transmit(contact,true,"%d 2.0.0 Bye, closing connection CNT=%s", - QUITOK,contact->mainsesid); contact->credits++; //clean disconnect + (void) transmit(contact,true,"%d 2.0.0 Bye, closing connection CRD=%d,CNT=%s", + QUITOK,contact->credits,contact->mainsesid); status=1; //every thing fine proceed=false; break; -- 2.47.3