]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Don't litter the queue directory when rejecting posts for one reason or the
authormmj <none@none>
Tue, 22 Jun 2004 06:22:02 +0000 (16:22 +1000)
committermmj <none@none>
Tue, 22 Jun 2004 06:22:02 +0000 (16:22 +1000)
other.

Also make sure we write correct data when saving for resend:

-                               writen(tmpfd, bounceaddr, strlen(to_addr));
+                               writen(tmpfd, bounceaddr, strlen(bounceaddr));

src/mlmmj-process.c
src/mlmmj-send.c

index b611314d062b35370d0e99b29043a347865c5f6a..a5c6032c86afe2fe2f8dda2d685bff2c6def79eb 100644 (file)
@@ -543,6 +543,8 @@ int main(int argc, char **argv)
                myfree(listfqdn);
                myfree(fromstr);
                myfree(subject);
+               unlink(donemailname);
+               myfree(donemailname);
                execlp(mlmmjsend, mlmmjsend,
                                "-l", "1",
                                "-T", fromemails.emaillist[0],
@@ -576,6 +578,8 @@ int main(int argc, char **argv)
                        myfree(listfqdn);
                        myfree(fromstr);
                        myfree(subject);
+                       unlink(donemailname);
+                       myfree(donemailname);
                        execlp(mlmmjsend, mlmmjsend,
                                        "-l", "1",
                                        "-T", fromemails.emaillist[0],
@@ -610,6 +614,8 @@ int main(int argc, char **argv)
                        myfree(listfqdn);
                        myfree(fromstr);
                        myfree(subject);
+                       unlink(donemailname);
+                       myfree(donemailname);
                        execlp(mlmmjsend, mlmmjsend,
                                        "-l", "1",
                                        "-T", fromemails.emaillist[0],
index f0b628da6afb8b3f8c5e7ef34da26d9341951908..049e3d76b1c58cda4e6be9eed9f6acab916e7bda 100644 (file)
@@ -571,7 +571,7 @@ int main(int argc, char **argv)
                                                S_IRUSR|S_IWUSR);
                        myfree(tmpstr);
                        if(tmpfd >= 0) {
-                               writen(tmpfd, bounceaddr, strlen(to_addr));
+                               writen(tmpfd, bounceaddr, strlen(bounceaddr));
                                fsync(tmpfd);
                        }
                        close(tmpfd);
@@ -580,7 +580,7 @@ int main(int argc, char **argv)
                                                S_IRUSR|S_IWUSR);
                        myfree(tmpstr);
                        if(tmpfd >= 0) {
-                               writen(tmpfd, to_addr, strlen(bounceaddr));
+                               writen(tmpfd, to_addr, strlen(to_addr));
                                fsync(tmpfd);
                        }
                        close(tmpfd);