自宅サーバのPostfixにpypolicyd-spfを使ってSPFレコードの確認してるのですが
OSを CentOS 7.x から AlmaLinux 8.x に変えたタイミングでUnmatched Entriesが出るようになりました
SourceForgeにある5.10のファイルを参考に以下のようにファイルをコピーして修正しました
# cd /etc/logwatch/scripts/services
# cp -p /usr/share/logwatch/scripts/services/postfix .
# vi postfix
# diff -u /usr/share/logwatch/scripts/services/postfix postfix
--- /usr/share/logwatch/scripts/services/postfix 2023-10-15 10:32:16.000000000 +0900
+++ postfix 2024-07-04 09:32:19.827266095 +0900
@@ -1882,7 +1882,8 @@
# Pass; identity=helo; client-ip=192.168.0.2; helo=example.com; envelope-from=<>; receiver=bogus@example.net
# Permerror; identity=helo; client-ip=192.168.0.4; helo=example.com; envelope-from=f@example.com; receiver=bogus2@example.net
# Softfail; identity=mailfrom; client-ip=192.168.0.6; helo=example.com; envelope-from=f@example.com; receiver=yahl@example.org
- if ($line =~ /^(Pass|Fail|None|Neutral|Permerror|Softfail|Temperror); (.*)$/) {
+ ### if ($line =~ /^(Pass|Fail|None|Neutral|Permerror|Softfail|Temperror); (.*)$/) {
+ if ($line =~ /^(?:prepend Received-SPF: )?(Pass|Fail|None|Neutral|Permerror|Softfail|Temperror);? (.*)$/) {
my $result = $1;
my %params = $2 =~ /([-\w]+)=([^;]+)/g;
#$params{'s'} = '*unknown' unless $params{'s'};
上記対応後
# logwatch --service postfix --output stdout
でUnmatched Entriesが出なくなればOK