]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
get_bounce_from_addr: remove useless parameter
authorBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 14 Apr 2023 11:30:16 +0000 (13:30 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 14 Apr 2023 11:35:45 +0000 (13:35 +0200)
include/send_mail.h
src/listcontrol.c
src/send_mail.c

index 2b7e8db22b2730c78423ee9d0f4622c7b68069bc..97a1b028ff56f3a394c3893d70c68a65dd7a17e1 100644 (file)
@@ -45,6 +45,6 @@ bool send_single_mail(struct mail *mail, struct ml *ml, bool bounce);
 void save_queue(const char *queuefilename, struct mail *mail);
 bool requeuemail(int listfd, int index, strlist *addrs, const char *addr);
 char *bounce_from_adr(const char *recipient, const char *listadr, const char *listdelim, const char *mailfilename, int ctrlfd);
-char *get_bounce_from_adr(const char *recipient, struct ml *ml, const char *mailfilename, int index);
+char *get_bounce_from_adr(const char *recipient, struct ml *ml, int index);
 int get_index_from_filename(const char *filename);
 
index afbf51765ccd8b5736b4f8be5796642e63cc490d..4bb8942d7a9e67111ab6e08ae13713b46ab1ab68 100644 (file)
@@ -605,7 +605,7 @@ permit:
                }
                struct mail mail = { 0 };
                mail.to = tll_front(*fromemails);
-               mail.from = get_bounce_from_adr(mail.to, ml, archivefilename, index);
+               mail.from = get_bounce_from_adr(mail.to, ml, index);
                mail.fp = fdopen(fd, "r");
                log_oper(ml->fd, OPLOGFNAME, "%s got archive/%s",
                                tll_front(*fromemails), param);
index 9d3c24891518e61df37e44137ddf0096f5165d7d..14660a1dd5331367669e09eb19944991520fb8d8 100644 (file)
@@ -455,16 +455,13 @@ requeuemail(int listfd, int index, strlist *addrs, const char *addr)
 }
 
 char *
-get_bounce_from_adr(const char *recipient, struct ml *ml,
-    const char *mailfilename, int index)
+get_bounce_from_adr(const char *recipient, struct ml *ml, int index)
 {
        char *bounceaddr, *myrecipient;
-       char *a = NULL, *mymailfilename;
+       char *a = NULL;
        char *staticbounceaddr, *staticbounceaddr_localpart = NULL;
        const char *staticbounceaddr_domain = NULL;
 
-       mymailfilename = xstrdup(mailfilename);
-
        myrecipient = xstrdup(recipient);
        a = strchr(myrecipient, '@');
        if (a)
@@ -489,7 +486,6 @@ get_bounce_from_adr(const char *recipient, struct ml *ml,
        }
 
        free(myrecipient);
-       free(mymailfilename);
 
        return bounceaddr;
 }