X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fnetwork%2Fserv_netmail.c;fp=citadel%2Fmodules%2Fnetwork%2Fserv_netmail.c;h=2782fbf8f23bf60a4b8a08fe98534b5fe362cac7;hp=fd1de7abe71aac452a024a0fa21567395c38be56;hb=2975015a8e6b00893a0ba003f3b086132fb858c8;hpb=b44d1c2f1e0ae68a1c274bd98799471426ae620f diff --git a/citadel/modules/network/serv_netmail.c b/citadel/modules/network/serv_netmail.c index fd1de7abe..2782fbf8f 100644 --- a/citadel/modules/network/serv_netmail.c +++ b/citadel/modules/network/serv_netmail.c @@ -182,7 +182,7 @@ void network_deliver_digest(SpoolControl *sc) recptypes *valid; char bounce_to[256]; - if (sc->Users[listrecp] == NULL) + if (sc->Users[digestrecp] == NULL) return; if (sc->num_msgs_spooled < 1) { @@ -219,11 +219,9 @@ void network_deliver_digest(SpoolControl *sc) fread(pbuf, (size_t)msglen, 1, sc->digestfp); pbuf[msglen] = '\0'; CM_SetAsField(msg, eMesageText, &pbuf, msglen); - fclose(sc->digestfp); - sc->digestfp = NULL; /* Now generate the delivery instructions */ - if (sc->Users[listrecp] == NULL) + if (sc->Users[digestrecp] == NULL) return; /* Where do we want bounces and other noise to be heard? @@ -231,7 +229,7 @@ void network_deliver_digest(SpoolControl *sc) snprintf(bounce_to, sizeof bounce_to, "room_aide@%s", config.c_fqdn); /* Now submit the message */ - valid = validate_recipients(ChrPtr(sc->Users[listrecp]), NULL, 0); + valid = validate_recipients(ChrPtr(sc->Users[digestrecp]), NULL, 0); if (valid != NULL) { valid->bounce_to = strdup(bounce_to); valid->envelope_from = strdup(bounce_to);