From: Baptiste Daroussin Date: Fri, 14 Apr 2023 11:52:13 +0000 (+0200) Subject: cleanup: remove now dead code X-Git-Tag: RELEASE_1_4_0b1~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebd659c6df0763ca6e1d78f8f3f5f035a256f977;p=thirdparty%2Fmlmmj.git cleanup: remove now dead code --- diff --git a/include/send_mail.h b/include/send_mail.h index 97a1b028..e0d1e7d4 100644 --- a/include/send_mail.h +++ b/include/send_mail.h @@ -44,7 +44,6 @@ int do_bouncemail(int listfd, int ctrlfd, const char *from); 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, int index); int get_index_from_filename(const char *filename); diff --git a/src/send_mail.c b/src/send_mail.c index 14660a1d..d88df0e2 100644 --- a/src/send_mail.c +++ b/src/send_mail.c @@ -490,61 +490,6 @@ get_bounce_from_adr(const char *recipient, struct ml *ml, int index) return bounceaddr; } -char * -bounce_from_adr(const char *recipient, const char *listadr, - const char *listdelim, const char *mailfilename, - int ctrlfd) -{ - char *bounceaddr, *myrecipient, *mylistadr; - char *listdomain, *a = NULL, *mymailfilename; - char *staticbounceaddr, *staticbounceaddr_localpart = NULL; - const char *staticbounceaddr_domain = NULL; - int index; - - mymailfilename = xstrdup(mailfilename); - - index = get_index_from_filename(mymailfilename); - - myrecipient = xstrdup(recipient); - a = strchr(myrecipient, '@'); - if (a) - *a = '='; - - mylistadr = xstrdup(listadr); - listdomain = strchr(mylistadr, '@'); - if (!listdomain) { - free(mymailfilename); - free(myrecipient); - free(mylistadr); - return NULL; - } - *listdomain++ = '\0'; - - staticbounceaddr = ctrlvalue(ctrlfd, "staticbounceaddr"); - if (staticbounceaddr) { - staticbounceaddr_localpart = genlistname(staticbounceaddr); - staticbounceaddr_domain = genlistfqdn(staticbounceaddr); - } - - if (staticbounceaddr) { - xasprintf(&bounceaddr, "%s%s%s-bounces-%d-%s@%s", - staticbounceaddr_localpart, listdelim, mylistadr, - index, myrecipient, staticbounceaddr_domain); - - free(staticbounceaddr); - free(staticbounceaddr_localpart); - } else { - xasprintf(&bounceaddr, "%s%sbounces-%d-%s@%s", mylistadr, listdelim, - index, myrecipient, listdomain); - } - - free(myrecipient); - free(mylistadr); - free(mymailfilename); - - return bounceaddr; -} - int get_index_from_filename(const char *filename) {