]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
cleanup: remove now dead code
authorBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 14 Apr 2023 11:52:13 +0000 (13:52 +0200)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 14 Apr 2023 11:52:13 +0000 (13:52 +0200)
include/send_mail.h
src/send_mail.c

index 97a1b028ff56f3a394c3893d70c68a65dd7a17e1..e0d1e7d4e4760a04e806ae06be7165291a2572b9 100644 (file)
@@ -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);
 
index 14660a1dd5331367669e09eb19944991520fb8d8..d88df0e2e4615ab19ab354ab5c671e90c4c71691 100644 (file)
@@ -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)
 {