If this is the wrong forum to post these things 
please let me know the appropriate forum

in vpopmail.c: update_rules()
there is an attempt to delete the tcprules temporary file by unlinking 
'relay_template'  which was set in tcprules_open

however relay_template is only the extension added onto TCP_FILE
and not the actual tempfile passed to tcprules program. 

this seems to be the case in both 5.2.1 and 5.3.8

the following patch should fix that, or at the very least illustrate the
problem.  I am not the worlds best c coder, so use the patch at your

--- vpopmail.c.orig     Sat May 18 06:25:49 2002
+++ vpopmail.c  Sat Sep 28 10:04:07 2002
@@ -2167,7 +2167,8 @@ long unsigned tcprules_open()
-       snprintf(relay_template, 300, "tmp.%ld", (long unsigned)getpid());
+       snprintf(relay_template, 300, "%s.tmp.%ld",
+          TCP_FILE, (long unsigned)getpid());
        if (pipe(pim) == -1)  { return(-1);}
@@ -2181,8 +2182,7 @@ long unsigned tcprules_open()
                strncpy(bin0, TCPRULES_PROG, BUFF_SIZE);
                strncpy( bin1, TCP_FILE, BUFF_SIZE);
                strncat( bin1, ".cdb", BUFF_SIZE);
-               strncpy( bin2, TCP_FILE, BUFF_SIZE);
-               strncat( bin2, relay_template, BUFF_SIZE);
+               strncpy( bin2, relay_template, BUFF_SIZE);
                binqqargs[0] = bin0;
                binqqargs[1] = bin1;
                binqqargs[2] = bin2;

ps. please include me in any replys, as i am not subscribed to  this
mailing list.

Reply via email to