diff --git a/mail/p5-Mail-Milter-Authentication/Makefile b/mail/p5-Mail-Milter-Authentication/Makefile index 7416e7c9a919..83b0fa34b5ab 100644 --- a/mail/p5-Mail-Milter-Authentication/Makefile +++ b/mail/p5-Mail-Milter-Authentication/Makefile @@ -1,94 +1,95 @@ PORTNAME= Mail-Milter-Authentication PORTVERSION= 3.20240205 +PORTREVISION= 1 CATEGORIES= mail perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- MAINTAINER= nork@FreeBSD.org COMMENT= Perl Mail Authentication Milter WWW= https://metacpan.org/release/Mail-Milter-Authentication/ LICENSE= ART10 GPLv1+ LICENSE_COMB= dual BUILD_DEPENDS= p5-File-ShareDir-Install>0:devel/p5-File-ShareDir-Install RUN_DEPENDS= p5-App-Cmd>0:devel/p5-App-Cmd \ p5-Clone>0:devel/p5-Clone \ p5-Date-Manip>0:devel/p5-Date-Manip \ p5-Email-Date-Format>0:mail/p5-Email-Date-Format \ p5-Email-Sender>0:mail/p5-Email-Sender \ p5-Email-Simple>0:mail/p5-Email-Simple \ p5-File-Slurp>0:devel/p5-File-Slurp \ p5-Import-Into>0:devel/p5-Import-Into \ p5-JSON-XS>0:converters/p5-JSON-XS \ p5-List-MoreUtils>0:lang/p5-List-MoreUtils \ p5-Lock-File>0:devel/p5-Lock-File \ p5-Log-Dispatchouli>0:devel/p5-Log-Dispatchouli \ p5-Mail-AuthenticationResults>2.20230112:mail/p5-Mail-AuthenticationResults \ p5-Mail-BIMI>=3.20230913:mail/p5-Mail-BIMI \ p5-Mail-DataFeed-Abusix>=1.20200617.1:mail/p5-Mail-DataFeed-Abusix \ p5-Mail-DKIM>=1.20200824:mail/p5-Mail-DKIM \ p5-Mail-DMARC>=1.20160612:mail/p5-Mail-DMARC \ p5-Mail-SPF>0:mail/p5-Mail-SPF \ p5-Net-DNS-Resolver-Mock>=1.20171219:dns/p5-Net-DNS-Resolver-Mock \ p5-Net-DNS>=1.01:dns/p5-Net-DNS \ p5-Net-IP>0:net-mgmt/p5-Net-IP \ p5-Net-Server>0:net/p5-Net-Server \ p5-Proc-ProcessTable>0:devel/p5-Proc-ProcessTable \ p5-Prometheus-Tiny-Shared>=0.020:net-mgmt/p5-Prometheus-Tiny-Shared \ p5-Sereal>0:converters/p5-Sereal \ p5-SUPER>0:devel/p5-SUPER \ p5-Test-File-Contents>0:devel/p5-Test-File-Contents \ p5-Text-Table>0:textproc/p5-Text-Table \ p5-TimeDate>0:devel/p5-TimeDate \ p5-TOML>0:textproc/p5-TOML TEST_DEPENDS= p5-Crypt-OpenSSL-RSA>0:security/p5-Crypt-OpenSSL-RSA \ p5-Test-CheckManifest>0:devel/p5-Test-CheckManifest \ p5-Test-Exception>0:devel/p5-Test-Exception \ p5-Test-Perl-Critic>0:textproc/p5-Test-Perl-Critic USES= perl5 shebangfix USE_PERL5= configure USE_RC_SUBR= authentication_milter SHEBANG_FILES= bin/authentication_milter bin/authentication_milter_blocker \ bin/authentication_milter_client bin/authentication_milter_log TEST_ENV= AUTHOR_TESTING=1 \ RELEASE_TESTING=1 \ TEST_AUTHOR=1 ETCDIR= ${PREFIX}/etc/mail EXTRACT_AFTER_ARGS= --exclude ./share/authentication_milter.init \ --no-same-owner --no-same-permission .for V in CACHEDIR ETCDIR RUNDIR SPOOLDIR VARLIBDIR VARLIBDIRBASE \ DEFAULT_USER DEFAULT_GROUP REINPLACE_LIST+= -e "s|%%${V}%%|${$V}|g" .endfor NO_ARCH= yes SUB_FILES= pkg-message .for V in CACHEDIR ETCDIR RUNDIR SPOOLDIR VARLIBDIR VARLIBDIRBASE \ DEFAULT_USER DEFAULT_GROUP SUB_LIST+= ${V}=${$V} .endfor PLIST_SUB= ${SUB_LIST} CACHEDIR= /var/cache/auth_milter DEFAULT_GROUP= mailnull DEFAULT_USER= mailnull RUNDIR= /var/run/auth_milter SPOOLDIR= /var/spool/auth_milter VARLIBDIR= /var/lib/auth_milter VARLIBDIRBASE= /var/lib post-patch: cd ${PATCH_WRKSRC} && ${REINPLACE_CMD} ${REINPLACE_LIST} \ bin/authentication_milter \ lib/Mail/Milter/Authentication/Config.pm \ lib/Mail/Milter/Authentication/Handler/DMARC.pm \ share/authentication_milter.json post-install: ${MKDIR} ${STAGEDIR}${ETCDIR}/authentication_milter.d .include diff --git a/mail/p5-Mail-Milter-Authentication/files/authentication_milter.in b/mail/p5-Mail-Milter-Authentication/files/authentication_milter.in index 870ea0c4b6df..0336f0ccc0a6 100644 --- a/mail/p5-Mail-Milter-Authentication/files/authentication_milter.in +++ b/mail/p5-Mail-Milter-Authentication/files/authentication_milter.in @@ -1,93 +1,99 @@ #!/bin/sh # PROVIDE: authentication_milter # REQUIRE: NETWORKING # BEFORE: mail # KEYWORD: shutdown # # Define these authentication_milter* variables in one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/authentication_milter # # DO NOT CHANGE THESE DEFAULT VALUES HERE # # Add the following lines to /etc/rc.conf to enable authentication_milter: # # authentication_milter_enable="YES" # authentication_milter_flags="" # authentication_milter_prefix="%%ETCDIR%%" # authentication_milter_foreground_enable="" +# authentication_milter_directory_owner="" +# authentication_milter_directory_group="" # . /etc/rc.subr name="authentication_milter" rcvar="authentication_milter_enable" procname="${name}:parent" load_rc_config $name : ${authentication_milter_enable:=NO} : ${authentication_milter_prefix:=%%ETCDIR%%} : ${authentication_milter_foreground_enable:=NO} +: ${authentication_milter_directory_owner:=%%DEFAULT_USER%%} +: ${authentication_milter_directory_group:=%%DEFAULT_GROUP%%} pidfile="%%RUNDIR%%/${name}.pid" command="%%PREFIX%%/bin/authentication_milter" command_args="--pidfile ${pidfile} --prefix ${authentication_milter_prefix} ${command_args}" start_precmd="authentication_milter_precmd_start" stop_precmd="authentication_milter_precmd" authentication_milter_precmd_start () { var1= var2= case "${authentication_milter_flags}" in -c*|*-c*|--control*|*--control*) var1="control" ;; -d*|*-d*|--daemon*|*--daemon*) var1="daemon" ;; --pidfile*|*--pidfile*) var2="pidfile" ;; --prefix*|*--prefix*) var2="prefix" ;; -h*|*-h*|--help*|*--help*) var1="help" ;; esac case ${var1} in "") ;; *) err 1 "Invalid option --${var1} found in ${name}_flags" ;; esac case ${var2} in "") ;; *) err 1 "Invalid option --${var2} found in ${name}_flags." \ "Use \$${name}_${var2} in /etc/rc.conf instead." ;; esac piddir=$(dirname "$pidfile") install -d %%VARLIBDIRBASE%% - install -d -m 0755 -o "%%DEFAULT_USER%%" -g "%%DEFAULT_GROUP%%" "$piddir" - install -d -m 0750 -o "%%DEFAULT_USER%%" -g "%%DEFAULT_GROUP%%" \ + install -d -m 0755 -o "${authentication_milter_directory_owner}" \ + -g "${authentication_milter_directory_group}" "$piddir" + install -d -m 0750 -o "${authentication_milter_directory_owner}" \ + -g "${authentication_milter_directory_group}" \ %%RUNDIR%% %%CACHEDIR%% %%SPOOLDIR%% %%VARLIBDIR%% authentication_milter_precmd if ! checkyesno authentication_milter_foreground_enable; then command_args="-d ${command_args}" fi } authentication_milter_precmd () { command_args="-c ${rc_arg} ${command_args}" } run_rc_command "$1"