<pre style='margin:0'>
Frank Schima (mf2k) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/b0a4a1fba7a470cf4876b1a043f5843076d87c4b">https://github.com/macports/macports-ports/commit/b0a4a1fba7a470cf4876b1a043f5843076d87c4b</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new b0a4a1f mail-server and dns-server: Portfile simplifications
</span>b0a4a1f is described below
<span style='display:block; white-space:pre;color:#808000;'>commit b0a4a1fba7a470cf4876b1a043f5843076d87c4b
</span>Author: Steven Thomas Smith <s.t.smith@ieee.org>
AuthorDate: Sat Sep 21 12:51:55 2019 -0400
<span style='display:block; white-space:pre;color:#404040;'> mail-server and dns-server: Portfile simplifications
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> * Remove dns-server amd logrotate as mail-server dependencies because some user may use their own DNS and log rotation capabilities
</span><span style='display:block; white-space:pre;color:#404040;'> * Simplify dns-server configuration modification code
</span>---
mail/mail-server/Portfile | 32 ++++++++++++++++++++++++--------
net/dns-server/Portfile | 14 +++++++-------
2 files changed, 31 insertions(+), 15 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/mail/mail-server/Portfile b/mail/mail-server/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 78b28fa..97275e8 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/mail/mail-server/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/mail/mail-server/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortGroup active_variants 1.1
</span>
name mail-server
version 1.0
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> categories mail net
platforms darwin
supported_archs noarch
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,6 +31,7 @@ set dovecot2_required_variants \
</span> depends_lib-append port:dcc \
port:dovecot2 \
port:dovecot2-sieve \
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:logrotate \
</span> port:openssl \
port:postfix \
port:rspamd \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,9 +44,7 @@ depends_lib-append port:apache-solr8 \
</span> port:expat \
port:pcre
<span style='display:block; white-space:pre;background:#ffe0e0;'>-depends_run-append port:clamav-server \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:dns-server \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- port:logrotate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_run-append port:clamav-server
</span>
variant initialize \
description {Initialize all configuration files. Existing
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -768,15 +767,13 @@ in ${prefix}/etc/dovecot/sieve*/*.sieve are compiled with sievec.
</span>
startupitem.create yes
<span style='display:block; white-space:pre;background:#ffe0e0;'>-startupitem.start "port load dns-server
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-\tport load clamav-server
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+startupitem.start "port load clamav-server
</span> \tport load apache-solr8
\tport load redis
\tport load dcc
\tport load postfix
\tport load dovecot2
<span style='display:block; white-space:pre;background:#ffe0e0;'>-\tport load rspamd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-\tport load logrotate"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+\tport load rspamd"
</span>
startupitem.stop "port unload apache-solr8
\tport unload dcc
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -852,6 +849,14 @@ that must be changed before deployment.
</span> DKIM:
${prefix}/var/lib/rspamd/dkim
<span style='display:block; white-space:pre;background:#e0ffe0;'>+The ports dns-server and logrotate provide necessary DNS service on the LAN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+and log rotation capabilities:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo port install dns-server logrotate
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This port assume indepedent installation and management of DNS and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+log rotation; mail-server includes example logrotate configuration files.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> The port's launch daemon controls launching for each of the dependendent
services. These may be controlled independently, e.g.
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -862,6 +867,10 @@ services. These may be controlled independently, e.g.
</span> sudo port load postfix
sudo port load dovecot2
sudo port load rspamd
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+and if installed independently,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo port load dns-server
</span> sudo port load logrotate
References:
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -870,6 +879,13 @@ services. These may be controlled independently, e.g.
</span> * https://www.rspamd.com/doc/index.html
* https://www.c0ffee.net/blog/mail-server-guide/
* _The Book of Postfix_, by Patrick Koetter and Ralf Hildebrandt
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Known issues:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * The Postfix service does not reliably start after reboot,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ presumably due to an issue with launchd. A workaround
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ after rebooting is to issue the commands:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sudo port unload postfix ; sleep 5 ; sudo port load postfix
</span> "
livecheck.type none
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/dns-server/Portfile b/net/dns-server/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 5c84298..7f3b757 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/dns-server/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/dns-server/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortSystem 1.0
</span> name dns-server
# use port:bind9's version as the version number
version 9.14.3
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> categories net
platforms darwin freebsd sunos
supported_archs noarch
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -60,11 +60,11 @@ destroot.keepdirs ${destroot}${prefix}/var/log/named
</span>
# Network configuration
# hard-coded examples
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set named_fullhost host.domain.tld
</span> set named_host host
<span style='display:block; white-space:pre;background:#ffe0e0;'>-set named_domaintld domain.tld
</span> set named_domain domain
set named_tld tld
<span style='display:block; white-space:pre;background:#e0ffe0;'>+set named_fullhost ${named_host}.${named_domain}.${named_tld}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set named_domaintld ${named_domain}.${named_tld}
</span> set host_lan_ip_address 10.0.1.2
set lan_reverse_ip_subnet 1.0.10
set host_lan_reverse_ip_address 2.1.0.10
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -75,10 +75,10 @@ set client_lan_reverse_ip_address 3.1.0.10
</span> post-activate {
# use network settings for installed example configuration
set named_fullhost [exec /bin/hostname -f]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set named_host [exec /bin/sh -c "echo ${named_fullhost} | /usr/bin/sed -E -e 's|^(\[\[:alnum:\]_-\]+\\.)*((\[\[:alnum:\]_-\]+\\.)\[a-zA-Z0-9-\]{2,24})\\.?|\\1|' | /usr/bin/sed -E -e 's|^(\[\[:alnum:\]_-\]+)\\.?$|\\1|'"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set named_domaintld [exec /bin/sh -c "echo ${named_fullhost} | /usr/bin/sed -E -e 's|^(\[\[:alnum:\]_-\]+\\.)*((\[\[:alnum:\]_-\]+\\.)\[a-zA-Z0-9-\]{2,24})\\.?|\\2|'"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set named_domain [exec /bin/sh -c "echo ${named_domaintld} | /usr/bin/sed -E -e 's|^(\[\[:alnum:\]_-\]+)\\.\[a-zA-Z0-9-\]{2,24}\\.?|\\1|'"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set named_tld [exec /bin/sh -c "echo ${named_domaintld} | /usr/bin/sed -E -e 's|^\[\[:alnum:\]_-\]+\\.(\[a-zA-Z0-9-\]{2,24})\\.?|\\1|'"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set named_host [lindex [split ${named_fullhost} .] 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set named_domaintld [join [lrange [split ${named_fullhost} .] end-1 end] .]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set named_domain [lindex [split ${named_domaintld} .] 0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set named_tld [lindex [split ${named_domaintld} .] end]
</span> set host_lan_ip_address [exec /bin/sh -c "/sbin/ifconfig `/usr/sbin/netstat -nr | /usr/bin/awk '{ if (\$1 ~/default/) { print \$NF} }' | /usr/bin/head -1` | /usr/bin/awk '{ if (\$1 ~/inet\$/) { print \$2} }'"]
set lan_reverse_ip_subnet [exec /bin/sh -c "echo ${host_lan_ip_address} | /usr/bin/sed -E -e 's|(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\$|\\3.\\2.\\1|'"]
set host_lan_reverse_ip_address [exec /bin/sh -c "echo ${host_lan_ip_address} | /usr/bin/sed -E -e 's|(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\\.(\[\[:digit:\]\]{1,3})\$|\\4.\\3.\\2.\\1|'"]
</pre><pre style='margin:0'>
</pre>