From nobody Mon Mar 11 01:27:21 2024 X-Original-To: dev-commits-ports-main@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 4TtJzY4vCjz5DL7x; Mon, 11 Mar 2024 01:27: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 4TtJzY4d9Kz41jr; Mon, 11 Mar 2024 01:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710120441; 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=UCTLtyK4AOh3Zl+ngCUUzW6btlfPlj2M4N/uZ07p+BU=; b=r2Lsj/W7XidSUUPwaNtxkUd8WgGdIRw1M5jwTtR8eVuJqR9Svkt4tZX9RNwu+LrshoT1pH b+3zR31Ww4kBy5TlUyhrSANsx2M72g0zIAy2xq3jy/YpofpLABSdZpP4IMrX8P304nOuaE qvjfy6Ircvr/onp5PP+aZj6nxoCa3YEpDJ6eNcc4av1IQm6BC6ZsOwHy16eh/mot43lXbY D0TXz03ud75Y17mkK5OdFEKgEhF57WqXySWlkNTuNxyPKztDJKDdyV3GYA0GP6zjAeMyYw xW6ulPu0qxjixSkA7SPVG9uZwO9R5lrQjsBK2s5Q3o/X47ZhAwzSxa+Cp4oUww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710120441; a=rsa-sha256; cv=none; b=gr6ExECAzP6i5/0iOZl51sCDrcHFiPXutUPteMKLPBP2U/GwIRTgWNDt94P2jUYPzTCc0n UYIBrlbzVbo7YD1qOssTJmTGl66gMlMJImbiyEn9Ec3pUPohXfq5d6hOwjW5qAxRPuJsR2 1Ovhd+AERzhmK76DcXb2cmSluQ2gRzt5js3W+A6QTCCXG5emB3Tm35vm/afRghUzPtIfFn lLCmBBLD0TW3u6OvWWDHi/GF+ChRQOR/6WzXGhlc9c4+i3FSec3qbf8kf7zLRRme7/cYHk BylRQXAX58ykn2wI/flA1Mqo2Aw2WaAzPG1rjpb0PEnq6S35qtYqdZqnj3FwXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710120441; 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=UCTLtyK4AOh3Zl+ngCUUzW6btlfPlj2M4N/uZ07p+BU=; b=bRV85Oz8tSSsz7rJgfprJF7AgF4B0tVGEkyyhIit4njn53aNfmw5XS4LzNHxDniKBzTOKN 148RigdMv3fHNMoIx1SB1lCDs2QiuGq5w07wH7AritY14mPdt9nwNJE7vNpyF8Q4zCCuMC yu8yd1cL40X82H+7S2r/4nFt27QaUPEW2ghLcZG4ZrtmFtoIQ3sx8xB5SevNLttrhzvCVG 8oTHkMNyleg7BLcdLTbHya0o7tVunekAEcvcthUIuuCV0+O//xHSNCkw62U9nZ6+HPmMmA //F+sohtet+yQrCBLjE89MeIKpbjKTxoEZyGXc0o7GgY5QKPGZiMxDXorzUyxA== 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 4TtJzY46Jnz18jZ; Mon, 11 Mar 2024 01:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B1RL2M095331; Mon, 11 Mar 2024 01:27:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B1RLNB095329; Mon, 11 Mar 2024 01:27:21 GMT (envelope-from git) Date: Mon, 11 Mar 2024 01:27:21 GMT Message-Id: <202403110127.42B1RLNB095329@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Norikatsu Shigemura Subject: git: 8aa480245f56 - main - mail/p5-Mail-Milter-Authentication: Add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nork X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8aa480245f5657e917b209a3c7766f38582ec4c7 Auto-Submitted: auto-generated The branch main has been updated by nork: URL: https://cgit.FreeBSD.org/ports/commit/?id=8aa480245f5657e917b209a3c7766f38582ec4c7 commit 8aa480245f5657e917b209a3c7766f38582ec4c7 Author: Norikatsu Shigemura AuthorDate: 2024-03-11 01:26:27 +0000 Commit: Norikatsu Shigemura CommitDate: 2024-03-11 01:26:27 +0000 mail/p5-Mail-Milter-Authentication: Add new port A Perl implementation of email authentication standards rolled up into a single easy to use milter. This milter verifies using the following standards. ARC / BIMI / DMARC / IPRev / SPF Check HELO matches it's IP address DKIM (including ADSP) DomainKeys (deprecated) SenderID (deprecated) Includes other additional modules like AddID, ReturnOK and etc... Approved by: hrs (mentor) --- mail/Makefile | 1 + mail/p5-Mail-Milter-Authentication/Makefile | 94 +++++++++++++++ mail/p5-Mail-Milter-Authentication/distinfo | 3 + .../files/authentication_milter.in | 93 +++++++++++++++ .../files/patch-bin_authentication__milter | 85 ++++++++++++++ .../files/patch-lib_Mail_Milter_Authentication.pm | 18 +++ .../patch-lib_Mail_Milter_Authentication_Config.pm | 71 ++++++++++++ ...lib_Mail_Milter_Authentication_Handler_DMARC.pm | 11 ++ .../files/patch-share_authentication__milter.json | 76 ++++++++++++ .../files/pkg-message.in | 33 ++++++ mail/p5-Mail-Milter-Authentication/pkg-descr | 22 ++++ mail/p5-Mail-Milter-Authentication/pkg-plist | 128 +++++++++++++++++++++ 12 files changed, 635 insertions(+) diff --git a/mail/Makefile b/mail/Makefile index ef59986a9a0e..3e4784b259cb 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -377,6 +377,7 @@ SUBDIR += p5-Mail-Mbox-MessageParser SUBDIR += p5-Mail-MboxParser SUBDIR += p5-Mail-Message + SUBDIR += p5-Mail-Milter-Authentication SUBDIR += p5-Mail-OpenDKIM SUBDIR += p5-Mail-OpenRelay-Simple SUBDIR += p5-Mail-POP3Client diff --git a/mail/p5-Mail-Milter-Authentication/Makefile b/mail/p5-Mail-Milter-Authentication/Makefile new file mode 100644 index 000000000000..7416e7c9a919 --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/Makefile @@ -0,0 +1,94 @@ +PORTNAME= Mail-Milter-Authentication +PORTVERSION= 3.20240205 +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/distinfo b/mail/p5-Mail-Milter-Authentication/distinfo new file mode 100644 index 000000000000..248b6a8464f1 --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1708613768 +SHA256 (Mail-Milter-Authentication-3.20240205.tar.gz) = 88a04406509c2f6a2b1b718b1ca250dc4e86f783343ceeb6cd6eac00ed4d0d7e +SIZE (Mail-Milter-Authentication-3.20240205.tar.gz) = 249101 diff --git a/mail/p5-Mail-Milter-Authentication/files/authentication_milter.in b/mail/p5-Mail-Milter-Authentication/files/authentication_milter.in new file mode 100644 index 000000000000..870ea0c4b6df --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/authentication_milter.in @@ -0,0 +1,93 @@ +#!/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="" +# + +. /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} + +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%%" \ + %%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" diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-bin_authentication__milter b/mail/p5-Mail-Milter-Authentication/files/patch-bin_authentication__milter new file mode 100644 index 000000000000..2d9ef925cdcf --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/patch-bin_authentication__milter @@ -0,0 +1,85 @@ +--- bin/authentication_milter.orig 2024-02-05 02:41:57 UTC ++++ bin/authentication_milter +@@ -15,7 +15,7 @@ use Mail::Milter::Authentication::Protocol::SMTP; + use Mail::Milter::Authentication::Protocol::SMTP; + + # CONFIG +-my $pid_file = '/run/authentication_milter.pid'; ++my $pid_file = '%%RUNDIR%%/authentication_milter.pid'; + my $daemon = 0; + my $help = 0; + my $prefix; +@@ -195,11 +195,11 @@ version 3.20240205 + =item --pidfile + + Write the process PID to the given file. +- defaults to /run/authentication_milter.pid ++ defaults to %%RUNDIR%%/authentication_milter.pid + + =item --prefix + +- Read configuration from dir rather than /etc/ ++ Read configuration from dir rather than %%ETCDIR%% + + =item -i|--ident + +@@ -212,7 +212,7 @@ version 3.20240205 + + =head1 CONFIGURATION + +- The milter reads configuration from /etc/authentication_milter.json ++ The milter reads configuration from %%ETCDIR%%/authentication_milter.json + + The configuration file format is as follows... + +@@ -266,10 +266,10 @@ version 3.20240205 + "metric_tempfile" : "/tmpfs/authmilter_metrics", | Path to shared metrics data, defaults to /metrics + "metric_basic_http" : 1, | Disable extended http services such as config and grafana json pages + +- "cache_dir" : "/var/cache/auth_milter", | Path to the shared cache directory +- "spool_dir" : "/var/spool/auth_milter", | Path to the shared spool directory +- "lib_dir" : "/var/lib/auth_milter", | Path to the shared lib directory +- "lock_file" : "/var/run/authmilter.lock", | Optionally specify the location of the Net::Server lock file ++ "cache_dir" : "%%CACHEDIR%%", | Path to the shared cache directory ++ "spool_dir" : "%%SPOOLDIR%%", | Path to the shared spool directory ++ "lib_dir" : "%%VARLIBDIR%%", | Path to the shared lib directory ++ "lock_file" : "%%RUNDIR%%/authmilter.lock", | Optionally specify the location of the Net::Server lock file + + # metric_port and metric_host are deprecated. + # please use metric_connection instead +@@ -289,7 +289,7 @@ version 3.20240205 + "sock_type" : "inet", | Socket type (inet or unix) + "sock_host" : "localhost", | Host to connect to (when inet) + "sock_port" : "2525", | Port to connect to (when inet) +- "sock_path" : "/var/run/smtp.sock", | Socket path to connect to (when unix) ++ "sock_path" : "%%RUNDIR%%/smtp.sock", | Socket path to connect to (when unix) + "timeout_in" : "10", | Timeout when waiting for inbound SMTP data + "timeout_out" : "10", | Timeout when waiting for outbound SMTP data + "pipeline_limit" : "50", | Limit the number of transactions accepted in an SMTP pipeline +@@ -315,7 +315,7 @@ version 3.20240205 + "unix:/var/sock/a.sock" : { + "server_name" : "util.example.com", + "sock_type" : "unix", +- "sock_path" : "/var/run/smtp.sock", ++ "sock_path" : "%%RUNDIR%%/smtp.sock", + "timeout_in" : "10", + "timeout_out" : "10" + } +@@ -408,7 +408,7 @@ version 3.20240205 + }, + "!InactiveModule" : {}, + | Additionally, config for a module can be placed in a file +- | with filename /etc/authentication_milter.d/ModuleName.json ++ | with filename %%ETCDIR%%/authentication_milter.d/ModuleName.json + | the contents of which should be the JSON assigned to the + | entry here. + +@@ -421,7 +421,7 @@ This milter uses Mail::DMARC as a backend for DMARC ch + + This milter uses Mail::DMARC as a backend for DMARC checks, this module requires that a configuration file is setup. + +-You should create and populate /etc/mail-dmarc.ini ++You should create and populate %%ETCDIR%%/mail-dmarc.ini + + For DMARC reporting you are also required to setup a datastore, including creating a basic table structure. + The detauls of this are to be found in the Mail::DMARC documentation. diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication.pm b/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication.pm new file mode 100644 index 000000000000..7908a75deddf --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication.pm @@ -0,0 +1,18 @@ +--- lib/Mail/Milter/Authentication.pm.orig 2024-02-05 02:41:57 UTC ++++ lib/Mail/Milter/Authentication.pm +@@ -32,11 +32,14 @@ use vars qw(@ISA); + my $MYARGS = { + 'ident' => $Mail::Milter::Authentication::Config::IDENT, + 'to_stderr' => 0, # handled elsewhere ++ 'to_stdout' => 0, # handled elsewhere + 'log_pid' => 1, + 'facility' => LOG_MAIL, + }; + if ( exists $config->{ 'log_dispatchouli' } ) { +- $MYARGS = $config->{ 'log_dispatchouli' }; ++ foreach my $k (keys %{$config->{ 'log_dispatchouli' }}) { ++ $MYARGS->{$k} = $config->{ 'log_dispatchouli' }->{$k}; ++ } + } + + $LOGGER = Log::Dispatchouli->new( $MYARGS ); diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication_Config.pm b/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication_Config.pm new file mode 100644 index 000000000000..c2ac6dfd0d26 --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication_Config.pm @@ -0,0 +1,71 @@ +--- lib/Mail/Milter/Authentication/Config.pm.orig 2024-02-05 02:41:57 UTC ++++ lib/Mail/Milter/Authentication/Config.pm +@@ -21,7 +21,7 @@ our @EXPORT_OK = qw{ + }; + + +-our $PREFIX = '/etc'; ++our $PREFIX = '%%ETCDIR%%'; + our $IDENT = 'authentication_milter'; + my $CONFIG; + +@@ -31,19 +31,19 @@ sub default_config { + 'debug' => 0, + 'dryrun' => 0, + 'logtoerr' => 0, +- 'error_log' => '/var/log/authentication_milter.err', ++ "log_dispatchouli" => {}, + 'extended_log' => 1, + 'legacy_log' => 0, +- 'connection' => 'inet:12345@localhost', +- 'umask' => '0000', +- 'runas' => 'nobody', +- 'rungroup' => 'nogroup', ++ 'connection' => 'unix:%%RUNDIR%%/auth_milter.sock', ++ 'umask' => '0077', ++ 'runas' => '%%DEFAULT_USER%%', ++ 'rungroup' => '%%DEFAULT_GROUP%%', + 'listen_backlog' => 20, + 'check_for_dequeue' => 60, +- 'min_children' => 20, +- 'max_children' => 200, +- 'min_spare_children' => 10, +- 'max_spare_children' => 20, ++ 'min_children' => 1, ++ 'max_children' => 2, ++ 'min_spare_children' => 1, ++ 'max_spare_children' => 1, + 'max_requests_per_child' => 200, + 'protocol' => 'milter', + 'connect_timeout' => 30, +@@ -61,9 +61,9 @@ sub default_config { + 'ip_map' => {}, + 'authserv_id' => '', + 'handlers' => {}, +- 'cache_dir' => '/var/cache/authentication_milter', +- 'spool_dir' => '/var/spool/authentication_milter', +- 'lib_dir' => '/var/lib/authentication_milter', ++ 'cache_dir' => '%%CACHEDIR%%', ++ 'spool_dir' => '%%SPOOLDIR%%', ++ 'lib_dir' => '%%VARLIBDIR%%', + 'lock_file' => '', + }; + +@@ -104,7 +104,7 @@ sub setup_config { + else { + if ( $EUID == 0 ) { + # We are root, create in global space +- $dir = '/var/'.$type.'/authentication_milter'; ++ $dir = '/var/'.$type.'/auth_milter'; + mkdir $dir if ! -e $dir; + # Create the subdir for this IDENT + $dir .= '/'.$safe_ident; +@@ -119,7 +119,7 @@ sub setup_config { + else { + # We are a user! Create something in a temporary space + $dir = join( '_', +- '/tmp/authentication_milter', ++ '/tmp/auth_milter', + $type, + $EUID, + $safe_ident, diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication_Handler_DMARC.pm b/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication_Handler_DMARC.pm new file mode 100644 index 000000000000..4f336401d318 --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication_Handler_DMARC.pm @@ -0,0 +1,11 @@ +--- lib/Mail/Milter/Authentication/Handler/DMARC.pm.orig 2024-02-05 02:41:57 UTC ++++ lib/Mail/Milter/Authentication/Handler/DMARC.pm +@@ -26,7 +26,7 @@ sub default_config { + 'report_suppression_list' => 'rbl.example.com', + 'no_report' => 0, + 'hide_report_to' => 0, +- 'config_file' => '/etc/mail-dmarc.ini', ++ 'config_file' => '%%ETCDIR%%/mail-dmarc.ini', + 'no_reject_disposition' => 'quarantine', + 'no_list_reject_disposition' => 'none', + 'reject_on_multifrom' => 30, diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-share_authentication__milter.json b/mail/p5-Mail-Milter-Authentication/files/patch-share_authentication__milter.json new file mode 100644 index 000000000000..1547a396af4f --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/patch-share_authentication__milter.json @@ -0,0 +1,76 @@ +--- share/authentication_milter.json.orig 2024-02-05 02:41:57 UTC ++++ share/authentication_milter.json +@@ -2,19 +2,19 @@ + "debug" : 0, + "dryrun" : 0, + "logtoerr" : 0, +- "error_log" : "/var/log/authentication_milter.err", ++ "log_dispatchouli" : {}, + +- "connection" : "inet:12345@localhost", +- "umask" : "0000", +- "runas" : "nobody", +- "rungroup" : "nogroup", ++ "connection" : "unix:%%RUNDIR%%/auth_milter.sock", ++ "umask" : "0077", ++ "runas" : "%%DEFAULT_USER%%", ++ "rungroup" : "%%DEFAULT_GROUP%%", + "chroot" : "", + + "listen_backlog" : 20, +- "min_children" : 20, +- "max_children" : 200, +- "min_spare_children" : 10, +- "max_spare_children" : 20, ++ "min_children" : 1, ++ "max_children" : 2, ++ "min_spare_children" : 1, ++ "max_spare_children" : 1, + "max_requests_per_child" : 200, + + "connect_timeout" : 30, +@@ -31,21 +31,32 @@ + "handlers" : { + + "SPF" : { +- "hide_none" : 0 ++ "hide_none" : 0, ++ "hide_received-spf_header": 1 + }, + + "DKIM" : { + "hide_none" : 0, +- "check_adsp" : 1, ++ "check_adsp" : 0, ++ "hide_domainkeys" : 1, + "show_default_adsp" : 0, +- "adsp_hide_none" : 0 ++ "adsp_hide_none" : 1 + }, + + "DMARC" : { + "hide_none" : 0, ++ "hard_reject" : 0, ++ "no_reject_disposition" : "quarantine", ++ "use_arc" : 1, ++ "no_report" : 1, ++ "config_file": "%%ETCDIR%%/mail-dmarc.ini", + "detect_list_id" : "1" + }, + ++ "ARC" : { ++ "hide_none" : 0 ++ }, ++ + "PTR" : {}, + + "SenderID" : { +@@ -63,7 +74,7 @@ + "100.200.100.2", + "2001:44c2:3881:aa00::/56", + "2001:44b8:3021:123:dead:beef:abcd:1234" +- ], ++ ] + }, + + "!AddID" : {}, diff --git a/mail/p5-Mail-Milter-Authentication/files/pkg-message.in b/mail/p5-Mail-Milter-Authentication/files/pkg-message.in new file mode 100644 index 000000000000..b818cbe67c5d --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/pkg-message.in @@ -0,0 +1,33 @@ +[ +{ type: install + message: <