]> SAFE projects GIT repository - jmp/mailleur/commitdiff
queue directory is now clean once email is sent
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 13 Jun 2025 09:15:25 +0000 (05:15 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Fri, 13 Jun 2025 09:15:25 +0000 (05:15 -0400)
Makefile
lib/geseml.c
lib/unieml.c
lib/unieml.h

index 67ade01614fa1412fef493480e89b99d1bd60619..efa51d47bedb57df46327b43d052adfa201dd510 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -39,6 +39,12 @@ TESTITER=    1
 #--------------------------------------------------------------------
 #To test sorter
 dosorter:  
+          @ bin/sorter                                 \
+                  -d 2                                 \
+                  -c ./conf/mailleur.conf.dvl          \
+                  -r $(TESTDIR) 
+
+donesort:
           @ bin/sorter                                 \
                   -f                                   \
                   -d 2                                 \
index e9c211b1d229436a46434ad6a6213bc3afd00826..57bdcc549561c3e9106fe328bc0a1cdbacbe104f 100644 (file)
@@ -499,8 +499,12 @@ if (list!=(TRATYP **)0) {
   while (*ptr!=(TRATYP *)0) {
     if ((*ptr)->code=='C') {
       if (eml_countqfile((*ptr)->sessid,-1)==0) {
+        char fname[200];
+
         (void) rou_alert(0,"%s JMPDBG need to remove <%s>",OPEP,(*ptr)->sessid);
+        (void) snprintf(fname,sizeof(fname),"%s.%s",(*ptr)->sessid,EXTCNT);
         (void) eml_deleteqfile((*ptr)->sessid);
+        (void) eml_deleteqfile(fname);
         }
       }
     else 
index fd66b8cd940449e381f72c491ac846f10ed68954..93a03b037a432cf1cf570ecd3a58933b92a731fa 100644 (file)
@@ -45,65 +45,6 @@ static VOCTYP vocsmtp[]={
 /********************************************************/
 /*                                                      */
 /*     Procedure to free memory used by a list of      */
-/*      session id.                                     */
-/*                                                      */
-/********************************************************/
-PUBLIC SIDTYP **eml_freesid(SIDTYP **list)
-
-{
-if (list!=(SIDTYP **)0) {
-  SIDTYP **ptr;
-
-  ptr=list;
-  while (*ptr!=(SIDTYP *)0) {
-    (void) free(*ptr);
-    ptr++;
-    }
-  (void) free(list);
-  list=(SIDTYP **)0;
-  }
-return list;
-}
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to add an session ID to a list of     */
-/*      session ID                                      */
-/*                                                      */
-/********************************************************/
-PUBLIC SIDTYP *eml_addsid(SIDTYP ***list,char *sessid)
-
-{
-SIDTYP *found;
-
-found=(SIDTYP *)0;
-if (*list!=(SIDTYP **)0) {
-  SIDTYP **ptr;
-
-  ptr=*list;
-  while (*ptr!=(SIDTYP *)0) {
-    if (strcmp(sessid,(*ptr)->sessid)==0) {
-      found=*ptr;
-      break;
-      }
-    ptr++;
-    }
-  }
-if (found==(SIDTYP *)0) {
-  found=(SIDTYP *)calloc(1,sizeof(SIDTYP));
-  found->sessid=sessid;
-  *list=(SIDTYP **)rou_addlist((void **)*list,(void *)found);
-  }
-return found;
-}
-/*
-^L
-*/
-/********************************************************/
-/*                                                      */
-/*     Procedure to free memory used by a list of      */
 /*      recipient.                                      */
 /*                                                      */
 /********************************************************/
index f2be473b9fbc8cc2e32239facc4dedc6b4272511..071cbb12991262d11d579493cdc0888e56bdd817 100644 (file)
@@ -64,17 +64,6 @@ typedef struct  {               //*definition of recipient
         char *userid;           //recipient email userid
         }RCPTYP;
 
-typedef struct  {               //definition of SID reference
-        int count;              //Number of SESSID reference
-        char *sessid;           //Session ID reference
-        }SIDTYP;
-
-//Freeing list of sessid
-extern SIDTYP **eml_freesid(SIDTYP **list);
-
-//adding an session ID to a list of session
-extern SIDTYP *eml_addsid(SIDTYP ***list,char *sessid);
-
 //procedure to Free one recipient info
 extern RCPTYP *eml_freerecipient(RCPTYP *info);