diff --git a/sysutils/logwatch/Makefile b/sysutils/logwatch/Makefile index c9f09d893f6e..5600ae6ac26f 100644 --- a/sysutils/logwatch/Makefile +++ b/sysutils/logwatch/Makefile @@ -1,46 +1,47 @@ PORTNAME= logwatch DISTVERSION= 7.13 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${DISTVERSION} MAINTAINER= trashcan@ellael.org COMMENT= Log file analysis program WWW= https://www.logwatch.org LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE USES= perl5 shebangfix USE_PERL5= run SHEBANG_FILES= scripts/logwatch.pl MAKE_ENV+= SITE_PERL_REL=${SITE_PERL_REL} NO_ARCH= yes NO_BUILD= yes SUB_FILES= pkg-message PORTDOCS= HOWTO-Customize-LogWatch README OPTIONS_DEFINE= DATEMANIP DOCS DATEMANIP_DESC= Install Date::Manip perl module for all valid --range parameters DATEMANIP_RUN_DEPENDS= p5-Date-Manip>=0:devel/p5-Date-Manip pre-configure: ${REINPLACE_CMD} -E \ -e "s,/usr/share/logwatch,${LOCALBASE}," \ -e "s,/etc/logwatch,${ETCDIR}," \ -e "s,.BaseDir/lib,${LIBEXECDIR}," \ -e "s,BaseDir/scripts/([^/]*)/,BaseDir/libexec/${PORTNAME}/defaults/\1/," \ -e "s,ConfigDir/scripts/([^/]*)/,BaseDir/libexec/${PORTNAME}/\1/," \ ${WRKSRC}/scripts/logwatch.pl @${CP} ${FILESDIR}/Makefile ${WRKSRC} post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/HOWTO-Customize-LogWatch ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include diff --git a/sysutils/logwatch/files/patch-scripts_services_postfix b/sysutils/logwatch/files/patch-scripts_services_postfix new file mode 100644 index 000000000000..969b829560cb --- /dev/null +++ b/sysutils/logwatch/files/patch-scripts_services_postfix @@ -0,0 +1,43 @@ +--- scripts/services/postfix.orig 2025-03-02 22:05:02 UTC ++++ scripts/services/postfix +@@ -61,7 +61,8 @@ our $re_DSN = qr/(?:(?:\d{3})?(?: ?\d\.\d\.\d+)?)/ + our $re_QID; + + our $re_DSN = qr/(?:(?:\d{3})?(?: ?\d\.\d\.\d+)?)/; +-our $re_DDD = qr/(?:(?:conn_use=\d+ )?delay=-?[\d.]+(?:, delays=[\d\/.]+)?(?:, dsn=[\d.]+)?)/; ++# postfix >= 3.11 will log TLS feature information in delivery status logging by default (tls=) ++our $re_DDD = qr/(?:(?:conn_use=\d+ )?delay=-?[\d.]+(?:, delays=[\d\/.]+)?(?:, tls=[^,]*)?(?:, dsn=[\d.]+)?)/; + + #MODULE: ../Logreporters/Utils.pm + package Logreporters::Utils; +@@ -3287,14 +3288,30 @@ sys 0m3.005s + } + + ### sent, forwarded, bounced, softbounce, deferred, (un)deliverable ++ # ++ # postfix >= 3.11 will log TLS feature information in delivery status logging by default (tls=) ++ # modified $re_DDD detects the corresponding tls= part, now ++ # + elsif ($p1 =~ s/^to=<(.*?)>,(?: orig_to=<(.*?)>,)? relay=([^,]*).*, ($re_DDD), status=(\S+) //o) { + ($relay,$status) = ($3,$5); + + my ($to,$origto,$localpart,$domainpart,$dsn,$p1) = process_delivery_attempt ($1,$2,$4,$p1); + ++ my ($tlsfeatures) = $4 =~ /tls=([^,]+)/; ++ if ($tlsfeatures ne '') { ++ $domainpart = $domainpart . " (tls=" . $tlsfeatures . ")"; ++ } ++ ++ # postfix <= 3.10: ++ # + #TD 552B6C20E: to=, relay=mail.example.net[10.0.0.1]:25, delay=1021, delays=1020/0.04/0.56/0.78, dsn=2.0.0, status=sent (250 Ok: queued as 6EAC4719EB) + #TD 552B6C20E: to=, relay=mail.example.net[10.0.0.1]:25, conn_use=2 delay=1021, delays=1020/0.04/0.56/0.78, dsn=2.0.0, status=sent (250 Ok: queued as 6EAC4719EB) + #TD DD925BBE2: to=, orig_to=, relay=mail.example.net[2001:dead:beef::1], delay=2, status=sent (250 Ok: queued as 5221227246) ++ # ++ # postfix >= 3.11: ++ # ++ #TD4d9bVw113Wz1SwX: to=, relay=mail.example.org[10.0.01]:25, delay=3.2, delays=0.09/0.05/1.8/1.2, tls=dane, dsn=2.0.0, status=sent (250 OK id=1vLFwP-00000008xhU-3ZkI) ++ #TD4d9bVw113Wz1SwX: to=, relay=mail.example.org[10.0.01]:25, delay=3.2, delays=0.09/0.05/1.8/1.2, tls=may, dsn=2.0.0, status=sent (250 OK id=1vLFwP-00000008xhU-3ZkI) + + ### sent + if ($status eq 'sent') { diff --git a/sysutils/logwatch/files/pkg-message.in b/sysutils/logwatch/files/pkg-message.in index c885cea0b304..f790792b32b1 100644 --- a/sysutils/logwatch/files/pkg-message.in +++ b/sysutils/logwatch/files/pkg-message.in @@ -1,20 +1,24 @@ [ { type: upgrade message: < patterns in logfiles, if activated - improvement of the dovecot script and conf files (allow granular detail options like the ones for postfix script) - postfix script detects modified 3.10+ log entries, now +Important changes in logwatch-7.13_1: + + - postfix script detects 3.11+ TLS feature information in delivery status logging (tls=), now + EOM } ]