On 3/25/2019 3:49 PM, Rick Gutierrez wrote: > El lun., 25 mar. 2019 a las 9:44, Kris Deugau (<kdeu...@vianet.ca>) escribió: > >> That looks to be far too complicated for most purposes, and reading back >> and forth I don't think it's even intended for the standard spamd >> logging; it's looking at log traces from some other SA library caller >> entirely. Can you post a couple of example log entries you're expecting >> this to match and extract fields from? > https://pastebin.com/nsJ4PUBM
Based on your original question, it looks like you could just grep the logs for 'spam-tag', but if you want to be sure, you could also check the score. This would also give you a bit more flexibility if you wanted to do a search for only high-scoring spam or something. I would do it with Perl. Here's an untested one-liner (assuming the file with the logs is called "maillog"): perl -ne '($score) = /spam-tag.*score=([\d.]+)/; if ($score > 5) {print}' maillog This could easily be expanded to output various parts of the log line, counts, average scores, etc. -- Bowie