Hi all,
I attach an alternative file... I wanted to attach a patch, but the
patch size is larger than the file itself: that's because I removed
all those
echo "</p>" >> $OUTPUT
(Reason: mysql --html outputs a table, which cannot be inside a
paragraph.)
I enumerate the other changes:
* Added a doctype, for the sake of html parser.
* Remove the full path for mysql command, it is safer to assume that
it is in PATH than in a specific directory.
* Set DB, USER, PASSWORD, and OUTPUT from the environment, in case
they are there. That way one does not have to edit it each time a
new version is installed, but can set those values from command
line, e.g.
OPENDKIM_OUTPUT="$(pwd)/my.html" opendkim-genstats
* Append a selection of worst adsp cases. IMHO this can provide a
useful hint to those who are wondering whether to enable rejecting
or dropping messages based on ADSP. The SQL seems correct to me,
but a review may be in order. I repeat it here:
SELECT domains.name,
m.ipaddr,
IF(m.adsp_all, 'all', 'discardable') AS type,
SUM(IF(s.pass <> NULL, 0, 1)) AS missing,
SUM(IF(s.pass, 0, 1)) AS failed,
SUM(IFNULL(s.pass,0)) AS good
FROM domains,
messages AS m LEFT JOIN signatures AS s
ON m.id = s.message
WHERE domains.id = m.from_domain AND
(s.domain = m.from_domain OR s.domain IS NULL) AND
m.adsp_all + m.adsp_discardable = 1
GROUP BY m.from_domain, m.ipaddr
ORDER BY missing DESC
LIMIT 10;
Received on Wed Sep 22 2010 - 18:26:57 PST