Description of problem: Line 1539 of /usr/share/logwatch/scripts/services/postfix: elsif ( ($reason,$host,$hostip) = ($p1 =~ /lost connection (after [^ ]*) (\(\d+ bytes\) )?from ([^[]*)\[($re_IP|unknown)\]$/o )) { Not all "lost connection" lines in /var/log/maillog have the "(xxx bytes)" part (examples attached.) It needs to be non-capturing: (?:\(\d+ bytes\) As it is now, if "(xxx bytes)" is present it will be captured as $host, and $hostip will be the hostname. This causes errors in the values reported for "*Warning: Pre-queue content-filter connection overload" and "Connections lost", which are both based on "lost connection" messages. Version-Release number of selected component (if applicable): logwatch-7.3.6-44.fc11.noarch How reproducible: Every day Steps to Reproduce: 1. Get "lost connection" messages in /var/log/maillog 2. Get incorrect values in the logwatch mail, as described above Actual results: Incorrect values Expected results: Correct values! Additional info: The logwatch script is getting quite old... it would be a good idea to replace it with the latest from http://www.mikecappella.com/logwatch/. I've sent a message to the logwatch-devel list to see if they have any plans to release a new version any time soon.
Created attachment 362788 [details] entries from my maillog
Richard, Thanks. This was resolved some time ago, I don't recall when. Certainly it is resolved in the latest version 1.38.01. Capturing is OK, but just needs to be handled correctly. As you've mentioned, the version in logwatch is now very old. $ postfix-logwatch --version postfix-logwatch: 1.38.01 $ cat log.connectionlost Sep 26 16:06:16 glacier postfix/smtpd[27000]: lost connection after DATA from unknown[192.168.0.134] Sep 26 16:06:16 glacier postfix/smtpd[27000]: lost connection after CONNECT from mail.example.com[192.168.0.1] # postfix 2.5:20071003 Sep 26 16:06:16 glacier postfix/smtpd[27000]: lost connection after DATA (494133 bytes) from localhost[127.0.0.1] # postfix 2.6:20080621 Sep 26 16:06:16 glacier postfix/smtpd[27000]: lost connection after DATA (approximately 0 bytes) from example.com[10.0.0.1] $ postfix-logwatch -l connectionlostinbound=10 --max_report=70 log.connectionlost ****** Summary ******************************************************* 4 Connections lost (inbound) ****** Detail (10) *************************************************** 4 Connections lost (inbound) -------------------------------- 3 After DATA 1 10.0.0.1 example.com 1 0 1 127.0.0.1 localhost 1 494,133 1 192.168.0.134 unknown 1 After CONNECT 1 192.168.0.1 mail.example.com As for the logwatch project including the latest versions, there are license differences preventing inclusion: http://www.mikecappella.com/logwatch/faq.html#comparison However, the Fedora project is free to include updates via their patch mechanism so long as the postfix-logwatch license and man page is included. @ivana - OK to ping me w/any bug reports re: postfix-logwatch/amavis-logwatch (eg. the postfix and amavis filters in logwatch).
Thanks. The fix for this problem is in the CVS, adding :? seems to work well. The update will follow shortly. Mike, regarding the postfix-logwatch and amavis-logwatch packages: in my opinion those should be packaged separately from logwatch, because it's another upstream (you), separate versioning, and different licenses.
logwatch-7.3.6-46.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/logwatch-7.3.6-46.fc11
logwatch-7.3.6-49.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/logwatch-7.3.6-49.fc12
logwatch-7.3.6-46.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update logwatch'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-13395
logwatch-7.3.6-49.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
logwatch-7.3.6-46.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.