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);
}
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);
}
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)
}
free(myrecipient);
- free(mymailfilename);
return bounceaddr;
}