From nobody Thu Jul 14 05:53:21 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 68BCC1CF8749; Thu, 14 Jul 2022 05:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lk3Z92WPcz3GSk; Thu, 14 Jul 2022 05:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657778001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvLzXkRxoZliK7cPpgJKkFAdF0sUoOwExEbepcs95z4=; b=j67ClPFizppq10vR5zh1LwWrRmLEdGd+fufOsXmEvyvuH44asFub4Cxxz7pkZ9zu4YABs4 OWHQw294LMwfaBUu1t5JCN7+tpXm3GIXWyE4DESIbKIkCAX9ilDQh2C8RY5hZRKLcig5/t m6EXgLDnEC2Y8EI0o7X/OCiy/pKEL/+BP7xFTdKEHdO74SSHrZ/GxQFG6JdHgWPNsG86Hp U5tSHbmUflxpCSrb19WnrsF2+4TK0i5O3WaMGZlV34DkWQYnPEfioPzVngrzpbVa9K1pzT hTGb7Sp7dYSBCMsWf36FKq7IzBpwWhTl6Jm6bjXz3LdBeJWhTnNJYWGvNv++2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lk3Z91GqlzsKW; Thu, 14 Jul 2022 05:53:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26E5rLGK020616; Thu, 14 Jul 2022 05:53:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26E5rLKX020615; Thu, 14 Jul 2022 05:53:21 GMT (envelope-from git) Date: Thu, 14 Jul 2022 05:53:21 GMT Message-Id: <202207140553.26E5rLKX020615@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Philip Paeps Subject: git: 542ccf96b5d6 - main - mail/mlmmj: allow configuring IPv6 relayhosts List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 542ccf96b5d67adbc9b422d8e5d63de9be4f8390 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657778001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvLzXkRxoZliK7cPpgJKkFAdF0sUoOwExEbepcs95z4=; b=QYxH6IKw3A/fcpisPbBa6eh+rzFl8P9HHwnGpExKhkrXsUjIeyZx8kHP7mVVd3w7XluY8Q mcRzCGC6qRDcEBxS6+xS7+/rGGCx09NceKmvJWDeFEDTxTmpjBF8MJx6Uu7mbYTCwzDMK4 060n0zOT5hwRbq+CKDP1E4YPWOR88xPcNfuyPn4gE66xCHr26ofAZAz0OeKzeA011/fuOU Qn7/yAaP9fG7uhayHMZuGAAs6CFcp3w9BS9jiz01kfR+MKpuvR4fbLzmvPQGa/Nr6TfhrN i0Bknnz0K+6aO3FElq8z019G6vCOYjtTg/iwOgXHQ4FAMhXtk6ZSSuQ++z3qcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657778001; a=rsa-sha256; cv=none; b=rF8cZDVh7DPJYs60FaomFfrd6XLBkVugTmk/lGaz1fHJwE+kj4JvxaqXCEMYsy3hH5WrQr n8eN4nOigiSKkvbAST9jhhvHDz3XWF+Tp5YtJJZMFbZOBzDWWO+dfbnj13tD5Kzmh5Phaf tJi6VElEaIlXC8qfgcBy3yolbx43u/wnCqf9F3d1UYXcnLSFLDRx6LxroVhB4XflYAReFr sdjUdKHCluQKpiuZj3NbPSvi+DOux/W+IgmbQpnyFc49qBuvMysxBWfGIC8lvbVWBXWO2w YS0bhToS5rom3TVpRdZide67gwD1zjx4t+bnx77e6Uj4qNYB2KvG9gLqAfTIMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by philip: URL: https://cgit.FreeBSD.org/ports/commit/?id=542ccf96b5d67adbc9b422d8e5d63de9be4f8390 commit 542ccf96b5d67adbc9b422d8e5d63de9be4f8390 Author: Philip Paeps AuthorDate: 2022-07-14 05:42:47 +0000 Commit: Philip Paeps CommitDate: 2022-07-14 05:51:58 +0000 mail/mlmmj: allow configuring IPv6 relayhosts Allow IPv6 addresses and hostnames that only resolve to IPv6 addresses in control/relayhost. This fixes mlmmj on IPv6-only systems. Approved by: bapt (implicit) --- mail/mlmmj/Makefile | 2 +- mail/mlmmj/files/patch-src_mlmmj-send.c | 115 ++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 1 deletion(-) diff --git a/mail/mlmmj/Makefile b/mail/mlmmj/Makefile index c1655ca42f86..0218cba4a1b7 100644 --- a/mail/mlmmj/Makefile +++ b/mail/mlmmj/Makefile @@ -2,7 +2,7 @@ PORTNAME= mlmmj PORTVERSION= 1.3.0 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= mail MASTER_SITES= http://mlmmj.org/releases/ diff --git a/mail/mlmmj/files/patch-src_mlmmj-send.c b/mail/mlmmj/files/patch-src_mlmmj-send.c new file mode 100644 index 000000000000..1529884b0a37 --- /dev/null +++ b/mail/mlmmj/files/patch-src_mlmmj-send.c @@ -0,0 +1,115 @@ +--- src/mlmmj-send.c.orig 2022-07-14 05:25:21 UTC ++++ src/mlmmj-send.c +@@ -817,13 +817,12 @@ int main(int argc, char **argv) + char *listctrl = NULL, *subddirname = NULL, *listdir = NULL; + char *mlmmjbounce = NULL, *bindir, *mailmap, *probefile, *a; + char *body = NULL, *hdrs = NULL, *memmailsizestr = NULL, *verp = NULL; +- char relay[16], *listname, *listfqdn, *verpfrom, *maxverprecipsstr; ++ char *listname, *listfqdn, *verpfrom, *maxverprecipsstr; + char strindex[32], *reply, *strport, *smtphelo, *requeuefilename; + ssize_t memmailsize = 0; + DIR *subddir; + struct dirent *dp; + struct stat st; +- struct hostent *relayent; + uid_t uid; + struct strlist stl; + unsigned short smtpport = 25; +@@ -1080,22 +1079,11 @@ int main(int argc, char **argv) + + itoa(mindex, strindex); + +- if(!relayhost) { ++ if(!relayhost) + relayhost = ctrlvalue(listdir, "relayhost"); +- } + if(!relayhost) +- strncpy(relay, RELAYHOST, sizeof(relay)); +- else { +- relayent = gethostbyname(relayhost); +- if(relayent == NULL) { +- strncpy(relay, RELAYHOST, sizeof(relay)); +- } else { +- if(inet_ntop(relayent->h_addrtype, +- relayent->h_addr_list[0], +- relay, sizeof(relay)) == NULL) +- strncpy(relay, RELAYHOST, sizeof(relay)); +- } +- } ++ relayhost = mystrdup(RELAYHOST); ++ + strport = ctrlvalue(listdir, "smtpport"); + if(strport) + smtpport = (unsigned short)atol(strport); +@@ -1107,7 +1095,7 @@ int main(int argc, char **argv) + switch(listctrl[0]) { + case '1': /* A single mail is to be sent */ + case '6': +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(send_mail(sockfd, bounceaddr, to_addr, replyto, + mailmap, st.st_size, listdir, NULL, + hdrs, hdrslen, body, bodylen)) { +@@ -1165,7 +1153,7 @@ int main(int argc, char **argv) + } + break; + case '2': /* Moderators */ +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap, + st.st_size, subfd, NULL, NULL, NULL, + listdir, NULL, hdrs, hdrslen, +@@ -1177,7 +1165,7 @@ int main(int argc, char **argv) + } + break; + case '3': /* resending earlier failed mails */ +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(send_mail_many_fd(sockfd, NULL, NULL, mailmap, st.st_size, + subfd, listaddr, listdelim, mailfilename, + listdir, mlmmjbounce, hdrs, hdrslen, +@@ -1190,7 +1178,7 @@ int main(int argc, char **argv) + unlink(subfilename); + break; + case '4': /* send mails to owner */ +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(send_mail_many_fd(sockfd, bounceaddr, NULL, mailmap, + st.st_size, subfd, listaddr, listdelim, + mailfilename, listdir, mlmmjbounce, +@@ -1202,7 +1190,7 @@ int main(int argc, char **argv) + } + break; + case '5': /* bounceprobe - handle relayhost local users bouncing*/ +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(send_mail(sockfd, bounceaddr, to_addr, replyto, + mailmap, st.st_size, listdir, NULL, + hdrs, hdrslen, body, bodylen)) { +@@ -1267,7 +1255,7 @@ int main(int argc, char **argv) + } + + if(verp) { +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(sockfd > -1) { + if(write_mail_from(sockfd, verpfrom, verp)) { + log_error(LOG_ARGS, +@@ -1331,7 +1319,7 @@ int main(int argc, char **argv) + } + } + if(stl.count == maxverprecips) { +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(verp) { + sendres = send_mail_verp( + sockfd, &stl, +@@ -1375,7 +1363,7 @@ int main(int argc, char **argv) + + } + if(stl.count) { +- initsmtp(&sockfd, relay, smtpport, smtphelo); ++ initsmtp(&sockfd, relayhost, smtpport, smtphelo); + if(verp) { + sendres = send_mail_verp(sockfd, &stl, mailmap, + st.st_size, verpfrom, listdir,