From: mmj Date: Thu, 13 Jan 2005 19:35:22 +0000 (+1100) Subject: Make the envelope from match the new order (VERP prep) and also remove X-Git-Tag: RELEASE_1_2_0~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33f3317570cdff999f819659382d8edf178d7595;p=thirdparty%2Fmlmmj.git Make the envelope from match the new order (VERP prep) and also remove superflous call to myunlock(). --- diff --git a/src/mlmmj-send.c b/src/mlmmj-send.c index a498ceb7..acfe3932 100644 --- a/src/mlmmj-send.c +++ b/src/mlmmj-send.c @@ -58,6 +58,7 @@ #include "memory.h" #include "statctrl.h" #include "ctrlvalue.h" +#include "mylocking.h" static int addtohdr = 0; static int prepmailinmem = 0; @@ -115,7 +116,7 @@ char *bounce_from_adr(const char *recipient, const char *listadr, return NULL; } snprintf(bounceaddr, len, "%s%cbounces-%s-%s@%s", mylistadr, RECIPDELIM, - myrecipient, indexstr, listdomain); + indexstr, myrecipient, listdomain); myfree(myrecipient); myfree(mylistadr); @@ -876,17 +877,14 @@ int main(int argc, char **argv) close(mailfd); if(archive) { - if(!ctrlarchive) + if(!ctrlarchive) { rename(mailfilename, archivefilename); - else + } else { unlink(mailfilename); + } myfree(archivefilename); } else if(deletewhensent) unlink(mailfilename); - if(myunlock(mailfd) < 0) - log_error(LOG_ARGS, "Could not unlock '%s'", mailfilename); - - return EXIT_SUCCESS; }