From: Baptiste Daroussin Date: Mon, 23 Sep 2024 12:00:40 +0000 (+0200) Subject: bounce: fix recording twice bounces X-Git-Tag: RELEASE_1_5_0~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14c8cde318cc89432d9e64196da580a3dac351f9;p=thirdparty%2Fmlmmj.git bounce: fix recording twice bounces While here simplify bounce code --- diff --git a/src/listcontrol.c b/src/listcontrol.c index bbdc7618..d36267e4 100644 --- a/src/listcontrol.c +++ b/src/listcontrol.c @@ -394,12 +394,10 @@ int listcontrol(strlist *fromemails, struct ml *ml, const char *controlstr, bret = bouncemail(ml->fd, lowercase(c), bouncenr); if (bret == BOUNCE_DONE) save_lastbouncedmsg(ml->fd, c, mailname); - if (bouncemail(ml->fd, c, bouncenr) == BOUNCE_FAIL) + if (bret == BOUNCE_FAIL) exit(EXIT_FAILURE); - if (bret == BOUNCE_OK) - unlink(mailname); unlink(mailname); - exit(bret == BOUNCE_FAIL ? EXIT_FAILURE : EXIT_SUCCESS); + exit(EXIT_SUCCESS); break; /* listname+release-COOKIE@domain.tld */