git: 1b52941c9103 - main - mail/p5-Mail-Milter-Authentication: Update to 3.20241011
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Oct 2024 14:03:23 UTC
The branch main has been updated by nork: URL: https://cgit.FreeBSD.org/ports/commit/?id=1b52941c910323a41bc2b994f4f9e646adfa1fc5 commit 1b52941c910323a41bc2b994f4f9e646adfa1fc5 Author: Norikatsu Shigemura <nork@FreeBSD.org> AuthorDate: 2024-10-17 14:02:10 +0000 Commit: Norikatsu Shigemura <nork@FreeBSD.org> CommitDate: 2024-10-17 14:02:10 +0000 mail/p5-Mail-Milter-Authentication: Update to 3.20241011 - portlint/portfmt/portclippy happy. - add missing TEST_DEPENDS. - up default listen_backlog to 200. PR: 281941 Submitted by: Andreas Jobs <andreas.jobs+freebsdbugs@ruhr-uni-bochum.de> ChangeLogs: https://metacpan.org/dist/Mail-Milter-Authentication/changes Approved by: hrs (mentor) --- mail/p5-Mail-Milter-Authentication/Makefile | 37 ++++++++++++---------- mail/p5-Mail-Milter-Authentication/distinfo | 6 ++-- .../files/patch-MANIFEST | 10 ++++++ .../files/patch-bin_authentication__milter | 30 ++++-------------- .../files/patch-lib_Mail_Milter_Authentication.pm | 18 ----------- .../patch-lib_Mail_Milter_Authentication_Config.pm | 19 +++++------ ...lib_Mail_Milter_Authentication_Handler_DMARC.pm | 6 ++-- .../files/patch-share_authentication__milter.json | 24 ++++---------- .../files/patch-t_04-unit-handler-dmarc.t | 11 +++++++ 9 files changed, 71 insertions(+), 90 deletions(-) diff --git a/mail/p5-Mail-Milter-Authentication/Makefile b/mail/p5-Mail-Milter-Authentication/Makefile index 83b0fa34b5ab..1a97766c5251 100644 --- a/mail/p5-Mail-Milter-Authentication/Makefile +++ b/mail/p5-Mail-Milter-Authentication/Makefile @@ -1,6 +1,5 @@ PORTNAME= Mail-Milter-Authentication -PORTVERSION= 3.20240205 -PORTREVISION= 1 +PORTVERSION= 3.20241011 CATEGORIES= mail perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- @@ -46,7 +45,8 @@ RUN_DEPENDS= p5-App-Cmd>0:devel/p5-App-Cmd \ 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 + p5-Test-Perl-Critic>0:textproc/p5-Test-Perl-Critic \ + p5-Test-Pod>0:devel/p5-Test-Pod USES= perl5 shebangfix USE_PERL5= configure @@ -58,22 +58,24 @@ TEST_ENV= AUTHOR_TESTING=1 \ RELEASE_TESTING=1 \ TEST_AUTHOR=1 -ETCDIR= ${PREFIX}/etc/mail +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 - +REINPLACE_VARS= CACHEDIR \ + DEFAULT_GROUP \ + DEFAULT_USER \ + ETCDIR \ + RUNDIR \ + SPOOLDIR \ + VARLIBDIR \ + VARLIBDIRBASE +REINPLACE_LIST= ${REINPLACE_VARS:@.V.@-e "s|%%${.V.}%%|${${.V.}}|g"@} +NO_ARCH= yes +SUB_FILES= pkg-message +SUB_LIST= ${REINPLACE_VARS:@.V.@${.V.}=${${.V.}}@} PLIST_SUB= ${SUB_LIST} +.ifnmake portclippy CACHEDIR= /var/cache/auth_milter DEFAULT_GROUP= mailnull DEFAULT_USER= mailnull @@ -81,13 +83,16 @@ RUNDIR= /var/run/auth_milter SPOOLDIR= /var/spool/auth_milter VARLIBDIR= /var/lib/auth_milter VARLIBDIRBASE= /var/lib +.endif 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 + share/authentication_milter.json \ + t/04-unit-handler-dmarc.t + ${FIND} ${WRKSRC} -name "*.bak" -delete -o -name "*.orig" -delete post-install: ${MKDIR} ${STAGEDIR}${ETCDIR}/authentication_milter.d diff --git a/mail/p5-Mail-Milter-Authentication/distinfo b/mail/p5-Mail-Milter-Authentication/distinfo index 248b6a8464f1..adaa1057af8b 100644 --- a/mail/p5-Mail-Milter-Authentication/distinfo +++ b/mail/p5-Mail-Milter-Authentication/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1708613768 -SHA256 (Mail-Milter-Authentication-3.20240205.tar.gz) = 88a04406509c2f6a2b1b718b1ca250dc4e86f783343ceeb6cd6eac00ed4d0d7e -SIZE (Mail-Milter-Authentication-3.20240205.tar.gz) = 249101 +TIMESTAMP = 1728744567 +SHA256 (Mail-Milter-Authentication-3.20241011.tar.gz) = fa7ef2251ab72a2fbc551ae65223d261c28658a34eb4b7c42aabaed21d3a0eaa +SIZE (Mail-Milter-Authentication-3.20241011.tar.gz) = 257856 diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-MANIFEST b/mail/p5-Mail-Milter-Authentication/files/patch-MANIFEST new file mode 100644 index 000000000000..132031ca1f64 --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/patch-MANIFEST @@ -0,0 +1,10 @@ +--- MANIFEST.orig 2024-10-11 04:07:26 UTC ++++ MANIFEST +@@ -96,7 +96,6 @@ lib/Mail/Milter/Authentication/htdocs/css/skeleton.css + lib/Mail/Milter/Authentication/htdocs/css/authmilter.css + lib/Mail/Milter/Authentication/htdocs/css/normalize.css + lib/Mail/Milter/Authentication/htdocs/css/skeleton.css +-share/authentication_milter.init + share/authentication_milter.json + share/mail-dmarc.ini + t/00-load.t diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-bin_authentication__milter b/mail/p5-Mail-Milter-Authentication/files/patch-bin_authentication__milter index 2d9ef925cdcf..6f6e6b3fdd3c 100644 --- a/mail/p5-Mail-Milter-Authentication/files/patch-bin_authentication__milter +++ b/mail/p5-Mail-Milter-Authentication/files/patch-bin_authentication__milter @@ -1,4 +1,4 @@ ---- bin/authentication_milter.orig 2024-02-05 02:41:57 UTC +--- bin/authentication_milter.orig 2024-10-11 04:07:26 UTC +++ bin/authentication_milter @@ -15,7 +15,7 @@ use Mail::Milter::Authentication::Protocol::SMTP; use Mail::Milter::Authentication::Protocol::SMTP; @@ -9,7 +9,7 @@ my $daemon = 0; my $help = 0; my $prefix; -@@ -195,11 +195,11 @@ version 3.20240205 +@@ -195,11 +195,11 @@ version 3.20241011 =item --pidfile <file> Write the process PID to the given file. @@ -23,7 +23,7 @@ =item -i|--ident <ident> -@@ -212,7 +212,7 @@ version 3.20240205 +@@ -212,7 +212,7 @@ version 3.20241011 =head1 CONFIGURATION @@ -32,7 +32,7 @@ The configuration file format is as follows... -@@ -266,10 +266,10 @@ version 3.20240205 +@@ -266,10 +266,10 @@ version 3.20241011 "metric_tempfile" : "/tmpfs/authmilter_metrics", | Path to shared metrics data, defaults to <lib_path>/metrics "metric_basic_http" : 1, | Disable extended http services such as config and grafana json pages @@ -47,7 +47,7 @@ # metric_port and metric_host are deprecated. # please use metric_connection instead -@@ -289,7 +289,7 @@ version 3.20240205 +@@ -289,7 +289,7 @@ version 3.20241011 "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) @@ -56,7 +56,7 @@ "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 +@@ -315,7 +315,7 @@ version 3.20241011 "unix:/var/sock/a.sock" : { "server_name" : "util.example.com", "sock_type" : "unix", @@ -65,21 +65,3 @@ "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 deleted file mode 100644 index 7908a75deddf..000000000000 --- a/mail/p5-Mail-Milter-Authentication/files/patch-lib_Mail_Milter_Authentication.pm +++ /dev/null @@ -1,18 +0,0 @@ ---- 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 index c2ac6dfd0d26..3de07a7988f7 100644 --- 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 @@ -1,4 +1,4 @@ ---- lib/Mail/Milter/Authentication/Config.pm.orig 2024-02-05 02:41:57 UTC +--- lib/Mail/Milter/Authentication/Config.pm.orig 2024-10-11 04:07:26 UTC +++ lib/Mail/Milter/Authentication/Config.pm @@ -21,7 +21,7 @@ our @EXPORT_OK = qw{ }; @@ -14,18 +14,19 @@ 'dryrun' => 0, 'logtoerr' => 0, - 'error_log' => '/var/log/authentication_milter.err', -+ "log_dispatchouli" => {}, ++ 'log_dispatchouli' => {}, 'extended_log' => 1, 'legacy_log' => 0, - 'connection' => 'inet:12345@localhost', - 'umask' => '0000', - 'runas' => 'nobody', - 'rungroup' => 'nogroup', +- 'listen_backlog' => 20, + 'connection' => 'unix:%%RUNDIR%%/auth_milter.sock', + 'umask' => '0077', + 'runas' => '%%DEFAULT_USER%%', + 'rungroup' => '%%DEFAULT_GROUP%%', - 'listen_backlog' => 20, ++ 'listen_backlog' => 200, 'check_for_dequeue' => 60, - 'min_children' => 20, - 'max_children' => 200, @@ -38,7 +39,7 @@ 'max_requests_per_child' => 200, 'protocol' => 'milter', 'connect_timeout' => 30, -@@ -61,9 +61,9 @@ sub default_config { +@@ -62,9 +62,9 @@ sub default_config { 'ip_map' => {}, 'authserv_id' => '', 'handlers' => {}, @@ -51,18 +52,18 @@ 'lock_file' => '', }; -@@ -104,7 +104,7 @@ sub setup_config { +@@ -105,7 +105,7 @@ sub setup_config { else { - if ( $EUID == 0 ) { - # We are root, create in global space + if ( $EUID == 0 && -d "/var/$type" && -w "/var/$type" ) { + # We are root, create in global space if it exists and is writable - $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 { +@@ -120,7 +120,7 @@ sub setup_config { else { - # We are a user! Create something in a temporary space + # We are a user, or have no writable global space, Create something in a temporary space $dir = join( '_', - '/tmp/authentication_milter', + '/tmp/auth_milter', 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 index 4f336401d318..9110c1d4a6d8 100644 --- 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 @@ -1,7 +1,7 @@ ---- lib/Mail/Milter/Authentication/Handler/DMARC.pm.orig 2024-02-05 02:41:57 UTC +--- lib/Mail/Milter/Authentication/Handler/DMARC.pm.orig 2024-10-11 04:07:26 UTC +++ lib/Mail/Milter/Authentication/Handler/DMARC.pm -@@ -26,7 +26,7 @@ sub default_config { - 'report_suppression_list' => 'rbl.example.com', +@@ -27,7 +27,7 @@ sub default_config { + 'report_suppression_email_list' => 'rbl.example.com', 'no_report' => 0, 'hide_report_to' => 0, - 'config_file' => '/etc/mail-dmarc.ini', 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 index 1547a396af4f..c0130115633f 100644 --- a/mail/p5-Mail-Milter-Authentication/files/patch-share_authentication__milter.json +++ b/mail/p5-Mail-Milter-Authentication/files/patch-share_authentication__milter.json @@ -1,4 +1,4 @@ ---- share/authentication_milter.json.orig 2024-02-05 02:41:57 UTC +--- share/authentication_milter.json.orig 2024-10-11 04:07:26 UTC +++ share/authentication_milter.json @@ -2,19 +2,19 @@ "debug" : 0, @@ -17,11 +17,12 @@ + "rungroup" : "%%DEFAULT_GROUP%%", "chroot" : "", - "listen_backlog" : 20, +- "listen_backlog" : 20, - "min_children" : 20, - "max_children" : 200, - "min_spare_children" : 10, - "max_spare_children" : 20, ++ "listen_backlog" : 200, + "min_children" : 1, + "max_children" : 2, + "min_spare_children" : 1, @@ -29,7 +30,7 @@ "max_requests_per_child" : 200, "connect_timeout" : 30, -@@ -31,21 +31,32 @@ +@@ -32,19 +32,30 @@ "handlers" : { "SPF" : { @@ -56,21 +57,10 @@ + "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" -- ], -+ ] ++ "ARC" : { ++ "hide_none" : 0 }, - "!AddID" : {}, + "PTR" : {}, diff --git a/mail/p5-Mail-Milter-Authentication/files/patch-t_04-unit-handler-dmarc.t b/mail/p5-Mail-Milter-Authentication/files/patch-t_04-unit-handler-dmarc.t new file mode 100644 index 000000000000..66a30f9c2a10 --- /dev/null +++ b/mail/p5-Mail-Milter-Authentication/files/patch-t_04-unit-handler-dmarc.t @@ -0,0 +1,11 @@ +--- t/04-unit-handler-dmarc.t.orig 2024-10-11 04:07:26 UTC ++++ t/04-unit-handler-dmarc.t +@@ -102,7 +102,7 @@ subtest 'config' => sub { + 'report_skip_to' => [ 'my_report_from_address@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,