]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
send_mail: the file pointer can be reused
authorBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 17 Feb 2023 15:35:36 +0000 (16:35 +0100)
committerBaptiste Daroussin <bapt@FreeBSD.org>
Fri, 17 Feb 2023 16:05:04 +0000 (17:05 +0100)
src/send_mail.c

index e869aabb778f6b8c7e1484fd5d44e95169e468a6..ab94255a66202f2f45d8cdf12892b3509dccdcb8 100644 (file)
@@ -260,6 +260,7 @@ send_mail(int sockfd, struct mail *mail, int listfd, int ctrlfd, bool bounce)
                log_error(LOG_ARGS, "No mail to send, ignoring");
                return 0;
        }
+       rewind(mail->fp);
 
        retval = write_mail_from(sockfd, mail->from, "");
        if(retval) {