Blame amavis-logwatch.1

Packit Bot ea69bd
.TH AMAVIS-LOGWATCH 1 
Packit Bot ea69bd
.ad
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.SH NAME
Packit Bot ea69bd
amavis-logwatch
Packit Bot ea69bd
\-
Packit Bot ea69bd
An Amavisd-new log parser and analysis utility
Packit Bot ea69bd
.SH "SYNOPSIS"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.fi
Packit Bot ea69bd
\fBamavis-logwatch\fR [\fIoptions\fR] [\fIlogfile ...\fR]
Packit Bot ea69bd
.SH DESCRIPTION
Packit Bot ea69bd
.ad
Packit Bot ea69bd
.fi
Packit Bot ea69bd
The \fBamavis-logwatch\fR(1) utility is an Amavisd-new log parser
Packit Bot ea69bd
that produces summaries, details, and statistics regarding
Packit Bot ea69bd
the operation of Amavisd-new (henceforth, simply called Amavis).
Packit Bot ea69bd
.PP
Packit Bot ea69bd
This utility can be used as a
Packit Bot ea69bd
standalone program, or as a Logwatch filter module to produce
Packit Bot ea69bd
Amavisd-new summary and detailed reports from within Logwatch.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBAmavis-logwatch\fR is able to produce
Packit Bot ea69bd
a wide range of reports with data grouped and sorted as much as possible
Packit Bot ea69bd
to reduce noise and highlight patterns.
Packit Bot ea69bd
Brief summary reports provide a
Packit Bot ea69bd
quick overview of general Amavis operations and message
Packit Bot ea69bd
delivery, calling out warnings that may require attention.
Packit Bot ea69bd
Detailed reports provide easy to scan, hierarchically-arranged
Packit Bot ea69bd
and organized information, with as much or little detail as
Packit Bot ea69bd
desired.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
Much of the interesting data is available when Amavis'
Packit Bot ea69bd
$log_level is set to at least 2.
Packit Bot ea69bd
See \fBAmavis Log Level\fR below.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBAmavis-logwatch\fR outputs two principal sections: a \fBSummary\fR section
Packit Bot ea69bd
and a \fBDetailed\fR section.
Packit Bot ea69bd
For readability and quick scanning, all event or hit counts appear in the left column,
Packit Bot ea69bd
followed by brief description of the event type, and finally additional
Packit Bot ea69bd
statistics or count representations may appear in the rightmost column.
Packit Bot ea69bd
Packit Bot ea69bd
The following segment from a sample Summary report illustrates:
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
****** Summary ********************************************
Packit Bot ea69bd
Packit Bot ea69bd
       9   Miscellaneous warnings 
Packit Bot ea69bd
Packit Bot ea69bd
   20313   Total messages scanned ----------------  100.00%
Packit Bot ea69bd
1008.534M  Total bytes scanned                1,057,524,252
Packit Bot ea69bd
========   ================================================
Packit Bot ea69bd
Packit Bot ea69bd
    1190   Blocked -------------------------------    5.86%
Packit Bot ea69bd
      18     Malware blocked                          0.09%
Packit Bot ea69bd
       4     Banned name blocked                      0.02%
Packit Bot ea69bd
     416     Spam blocked                             2.05%
Packit Bot ea69bd
     752     Spam discarded (no quarantine)           3.70%
Packit Bot ea69bd
Packit Bot ea69bd
   19123   Passed --------------------------------   94.14%
Packit Bot ea69bd
      47     Bad header passed                        0.23%
Packit Bot ea69bd
   19076     Clean passed                            93.91%
Packit Bot ea69bd
========   ================================================
Packit Bot ea69bd
Packit Bot ea69bd
      18   Malware -------------------------------    0.09%
Packit Bot ea69bd
      18     Malware blocked                          0.09%
Packit Bot ea69bd
Packit Bot ea69bd
       4   Banned --------------------------------    0.02%
Packit Bot ea69bd
       4     Banned file blocked                      0.02%
Packit Bot ea69bd
Packit Bot ea69bd
    1168   Spam ----------------------------------    5.75%
Packit Bot ea69bd
     416     Spam blocked                             2.05%
Packit Bot ea69bd
     752     Spam discarded (no quarantine)           3.70%
Packit Bot ea69bd
Packit Bot ea69bd
   19123   Ham -----------------------------------   94.14%
Packit Bot ea69bd
      47     Bad header passed                        0.23%
Packit Bot ea69bd
   19076     Clean passed                            93.91%
Packit Bot ea69bd
========   ================================================
Packit Bot ea69bd
Packit Bot ea69bd
    1982   SpamAssassin bypassed 
Packit Bot ea69bd
      32   Released from quarantine 
Packit Bot ea69bd
       2   DSN notification (debug supplemental) 
Packit Bot ea69bd
       2   Bounce unverifiable   
Packit Bot ea69bd
    2369   Whitelisted           
Packit Bot ea69bd
       2   Blacklisted           
Packit Bot ea69bd
      12   MIME error            
Packit Bot ea69bd
      58   Bad header (debug supplemental) 
Packit Bot ea69bd
      40   Extra code modules loaded at runtime 
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
The report indicates there were 9 general warnings, and
Packit Bot ea69bd
\fBAmavis\fR scanned a total of 20313 messages
Packit Bot ea69bd
for a total of 1008.53 megabytes or 1,057,524,252 bytes.
Packit Bot ea69bd
The next summary groups shows the Blocked / Passed overview, 
Packit Bot ea69bd
with 1190 Blocked messages (broken down as 18 messages blocked as malware,
Packit Bot ea69bd
4 messages with banned names, 416 spam messages, and 752 discarded
Packit Bot ea69bd
messages), and 19123 Passed messages (47 messages with bad headers
Packit Bot ea69bd
and 19076 clean messages).
Packit Bot ea69bd
Packit Bot ea69bd
The next (optional) summary grouping shows message disposition by contents category.  
Packit Bot ea69bd
There were 18 malware messages and 4 banned file messages (all blocked), 
Packit Bot ea69bd
1168 Spam messages, of which 416 were blocked (quarantined) and 752 discarded.
Packit Bot ea69bd
Finally, there were 19123 messages consdidered to be Ham (i.e. not spam), 47
Packit Bot ea69bd
of which contained bad headers.
Packit Bot ea69bd
Packit Bot ea69bd
Additional count summaries for a variety of events are also listed.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
There are dozens of sub-sections available in the \fBDetailed\fR report, each of
Packit Bot ea69bd
whose output can be controlled in various ways.
Packit Bot ea69bd
Each sub-section attempts to group and present the most meaningful data at superior levels,
Packit Bot ea69bd
while pushing less useful or \fInoisy\fR data towards inferior levels.
Packit Bot ea69bd
The goal is to provide as much benefit as possible from smart grouping of
Packit Bot ea69bd
data, to allow faster report scanning, pattern identification, and problem solving.
Packit Bot ea69bd
Data is always sorted in descending order by count, and then numerically by IP address
Packit Bot ea69bd
or alphabetically as appropriate.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
The following Spam blocked segment from a sample \fBDetailed\fR report
Packit Bot ea69bd
illustrates the basic hierarchical level structure of \fBamavis-logwatch\fR:
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
****** Detailed *******************************************
Packit Bot ea69bd
Packit Bot ea69bd
   19346   Spam blocked -----------------------------------
Packit Bot ea69bd
     756      from@example.com
Packit Bot ea69bd
      12         10.0.0.2
Packit Bot ea69bd
      12            <>
Packit Bot ea69bd
      12         192.168.2.2
Packit Bot ea69bd
      12            <>
Packit Bot ea69bd
       5         192.168.2.1
Packit Bot ea69bd
     ...
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.PP
Packit Bot ea69bd
The \fBamavis-logwatch\fR utility reads from STDIN or from the named Amavis
Packit Bot ea69bd
\fIlogfile\fR.
Packit Bot ea69bd
Multiple \fIlogfile\fR arguments may be specified, each processed
Packit Bot ea69bd
in order.
Packit Bot ea69bd
The user running \fBamavis-logwatch\fR must have read permission on
Packit Bot ea69bd
each named log file.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
.SS Options
Packit Bot ea69bd
The options listed below affect the operation of \fBamavis-logwatch\fR.
Packit Bot ea69bd
Options specified later on the command line override earlier ones.
Packit Bot ea69bd
Any option may be abbreviated to an unambiguous length.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fB--[no]autolearn\fR"
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--show_autolearn \fIboolean\fR"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Enables (disables) output of the autolearn report.
Packit Bot ea69bd
This report is only available if the default Amavis \fB$log_templ\fR
Packit Bot ea69bd
has been modified to provide autolearn results in log entries.
Packit Bot ea69bd
This can be done by uncommenting two lines in the Amavis program itself (where the
Packit Bot ea69bd
default log templates reside), or by correctly adding the \fB$log_templ\fR
Packit Bot ea69bd
variable to the \fBamavisd.conf\fR file.
Packit Bot ea69bd
See Amavis' \fBREADME.customize\fR and search near the end
Packit Bot ea69bd
of the Amavisd program for "autolearn".
Packit Bot ea69bd
.IP "\fB--[no]by_ccat_summary\fR"
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--show_by_ccat_summary \fIboolean\fR"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Enables (disables) the by contents category summary in the \fBSummary\fR section.
Packit Bot ea69bd
Default: enabled.
Packit Bot ea69bd
.IP "\fB-f \fIconfig_file\fR"
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--config_file \fIconfig_file\fR"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Use an alternate configuration file \fIconfig_file\fR instead of
Packit Bot ea69bd
the default.
Packit Bot ea69bd
This option may be used more than once.
Packit Bot ea69bd
Multiple configuration files will be processed in the order presented on the command line.
Packit Bot ea69bd
See \fBCONFIGURATION FILE\fR below.
Packit Bot ea69bd
.IP "\fB--debug \fIkeywords\fR"
Packit Bot ea69bd
Output debug information during the operation of \fBamavis-logwatch\fR.
Packit Bot ea69bd
The parameter \fIkeywords\fR is one or more comma or space separated keywords.
Packit Bot ea69bd
To obtain the list of valid keywords, use --debug xxx where xxx is any invalid keyword.
Packit Bot ea69bd
.IP "\fB--detail \fIlevel\fR"
Packit Bot ea69bd
Sets the maximum detail level for \fBamavis-logwatch\fR to \fIlevel\fR.
Packit Bot ea69bd
This option is global, overriding any other output limiters described below.
Packit Bot ea69bd
Packit Bot ea69bd
The \fBamavis-logwatch\fR utility
Packit Bot ea69bd
produces a \fBSummary\fR section, a \fBDetailed\fR section, and
Packit Bot ea69bd
additional report sections.
Packit Bot ea69bd
With \fIlevel\fR less than 5, \fBamavis-logwatch\fR will produce
Packit Bot ea69bd
only the \fBSummary\fR section.
Packit Bot ea69bd
At \fIlevel\fR 5 and above, the \fBDetailed\fR section, and any
Packit Bot ea69bd
additional report sections are candidates for output.
Packit Bot ea69bd
Each incremental increase in \fIlevel\fR generates one additional
Packit Bot ea69bd
hierarchical sub-level of output in the \fBDetailed\fR section of the report.
Packit Bot ea69bd
At \fIlevel\fR 10, all levels are output.
Packit Bot ea69bd
Lines that exceed the maximum report width (specified with 
Packit Bot ea69bd
\fBmax_report_width\fR) will be cut.
Packit Bot ea69bd
Setting \fIlevel\fR to 11 will prevent lines in the report from being cut (see also \fB--line_style\fR).
Packit Bot ea69bd
.IP "\fB--[no]first_recip_only\fR"
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--show_first_recip_only \fIboolean\fR"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Specifies whether or not to sort by, and show, only the first
Packit Bot ea69bd
recipient when a scanned messages contains multiple recipients.
Packit Bot ea69bd
.IP "\fB--help\fR"
Packit Bot ea69bd
Print usage information and a brief description about command line options.
Packit Bot ea69bd
.IP "\fB--ipaddr_width \fIwidth\fR"
Packit Bot ea69bd
Specifies that IP addresses in address/hostname pairs should be printed
Packit Bot ea69bd
with a field width of \fIwidth\fR characters.
Packit Bot ea69bd
Increasing the default may be useful for systems using long IPv6 addresses.
Packit Bot ea69bd
.IP "\fB-l limiter=levelspec\fR"
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--limit limiter=levelspec\fR"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Sets the level limiter \fIlimiter\fR with the specification \fIlevelspec\fR.
Packit Bot ea69bd
.IP "\fB--line_style \fIstyle\fR"
Packit Bot ea69bd
Specifies how to handle long report lines.
Packit Bot ea69bd
Three styles are available: \fBfull\fR, \fBtruncate\fR, and \fBwrap\fR.
Packit Bot ea69bd
Setting \fIstyle\fR to \fBfull\fR will prevent cutting lines to \fBmax_report_width\fR; 
Packit Bot ea69bd
this is what occurs when \fBdetail\fR is 11 or higher.
Packit Bot ea69bd
When \fIstyle\fR is \fBtruncate\fR (the default), 
Packit Bot ea69bd
long lines will be truncated according to \fBmax_report_width\fR.
Packit Bot ea69bd
Setting \fIstyle\fR to \fBwrap\fR will wrap lines longer than \fBmax_report_width\fR such that
Packit Bot ea69bd
left column hit counts are not obscured.
Packit Bot ea69bd
This option takes precedence over the line style implied by the \fBdetail\fR level.
Packit Bot ea69bd
The options \fB--full\fR, \fB--truncate\fR, and \fB--wrap\fR are synonyms.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fB--nodetail\fR"
Packit Bot ea69bd
Disables the \fBDetailed\fR section of the report, and all supplemental reports.
Packit Bot ea69bd
This option provides a convenient mechanism to quickly disable all sections
Packit Bot ea69bd
under the \fBDetailed\fR report, where subsequent command line
Packit Bot ea69bd
options may re-enable one or more sections to create specific reports.
Packit Bot ea69bd
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--sarules \fR\`\fIS,H\fR\'"
Packit Bot ea69bd
.IP "\fB--sarules default"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Enables the SpamAssassin Rules Hit report.
Packit Bot ea69bd
The comma-separated \fIS\fR and \fIH\fR arguments are top N values for the Spam and Ham
Packit Bot ea69bd
reports, respectively, and can be any integer greater than or equal to 0, or the keyword \fBall\fR.
Packit Bot ea69bd
The keyword \fBdefault\fR uses the built-in default values.
Packit Bot ea69bd
.IP "\fB--nosarules\fR"
Packit Bot ea69bd
Disables the SpamAssassin Rules Hit report.
Packit Bot ea69bd
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--sa_timings \fR\fInrows\fR"
Packit Bot ea69bd
Enables the SpamAssassin Timings percentiles report.
Packit Bot ea69bd
The report can be limited to the top N rows with the \fInrows\fR argument.
Packit Bot ea69bd
This report requires Amavis 2.6+ and SpamAssassin 3.3+.
Packit Bot ea69bd
.PD
Packit Bot ea69bd
.IP "\fB--sa_timings_percentiles \fR\`\fIP1 [P2 ...]\fR\'"
Packit Bot ea69bd
Specifies the percentiles shown in the SpamAssassin Timings report.
Packit Bot ea69bd
The arguments \fIP1 ...\fR are integers from 0 to 100 inclusive.
Packit Bot ea69bd
Their order will be preserved in the report.
Packit Bot ea69bd
.IP "\fB--nosa_timings\fR"
Packit Bot ea69bd
Disables the SpamAssassin Timings report.
Packit Bot ea69bd
.IP "\fB--version\fR"
Packit Bot ea69bd
Print \fBamavis-logwatch\fR version information.
Packit Bot ea69bd
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--score_frequencies \fR\`\fIB1 [B2 ...]\fR\'"
Packit Bot ea69bd
.IP "\fB--score_frequencies default"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Enables the Spam Score Frequency report.
Packit Bot ea69bd
The arguments \fIB1 ...\fR are frequency distribution buckets, and can be any real numbers.
Packit Bot ea69bd
Their order will be preserved in the report.
Packit Bot ea69bd
The keyword \fBdefault\fR uses the built-in default values.
Packit Bot ea69bd
.IP "\fB--noscore_frequencies\fR"
Packit Bot ea69bd
Disables the Spam Score Frequency report.
Packit Bot ea69bd
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--score_percentiles \fR\`\fIP1 [P2 ...]\fR\'"
Packit Bot ea69bd
.IP "\fB--score_percentiles default"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Enables the Spam Score Percentiles report.
Packit Bot ea69bd
The arguments \fIP1 ...\fR specify the percentiles shown in the report,
Packit Bot ea69bd
and are integers from 0 to 100 inclusive.
Packit Bot ea69bd
The keyword \fBdefault\fR uses the built-in default values.
Packit Bot ea69bd
.IP "\fB--noscore_percentiles\fR"
Packit Bot ea69bd
Disables the Spam Score Percentiles report.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fB--[no]sect_vars\fR"
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--show_sect_vars \fIboolean\fR"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Enables (disables) supplementing each \fBDetailed\fR section title
Packit Bot ea69bd
with the name of that section's level limiter.
Packit Bot ea69bd
The name displayed is the command line option (or configuration
Packit Bot ea69bd
file variable) used to limit that section's output.
Packit Bot ea69bd
.
Packit Bot ea69bd
With the large number of level limiters available in \fBamavis-logwatch\fR,
Packit Bot ea69bd
this a convenient mechanism for determining exactly which level limiter
Packit Bot ea69bd
affects a section.
Packit Bot ea69bd
.IP "\fB--[no]startinfo\fR"
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--show_startinfo \fIboolean\fR"
Packit Bot ea69bd
.PD
Packit Bot ea69bd
Enables (disables) the Amavis startup report showing most recent Amavis startup details.
Packit Bot ea69bd
.IP "\fB--[no]summary\fR"
Packit Bot ea69bd
.IP "\fB--show_summary\fR"
Packit Bot ea69bd
Enables (disables) displaying of the the \fBSummary\fR section of the report.
Packit Bot ea69bd
The variable Amavis_Show_Summary in used in a configuration file.
Packit Bot ea69bd
.IP "\fB--syslog_name \fInamepat\fR"
Packit Bot ea69bd
Specifies the syslog service name that \fBamavis-logwatch\fR uses
Packit Bot ea69bd
to match syslog lines.
Packit Bot ea69bd
Only log lines whose service name matches
Packit Bot ea69bd
the perl regular expression \fInamepat\fR will be used by
Packit Bot ea69bd
\fBamavis-logwatch\fR; all non-matching lines are silently ignored.
Packit Bot ea69bd
This is useful when a pre-installed Amavis package uses a name
Packit Bot ea69bd
other than the default (\fBamavis\fR).
Packit Bot ea69bd
Packit Bot ea69bd
\fBNote:\fR if you use parenthesis in your regular expression, be sure they are cloistering
Packit Bot ea69bd
and not capturing: use  \fB(?:\fIpattern\fB)\fR instead of \fB(\fIpattern\fB)\fR.
Packit Bot ea69bd
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.IP "\fB--timings \fR\fIpercent\fR"
Packit Bot ea69bd
Enables the Amavis Scan Timings percentiles report.
Packit Bot ea69bd
The report can be top N-percent limited with the \fIpercent\fR argument.
Packit Bot ea69bd
.PD
Packit Bot ea69bd
.IP "\fB--timings_percentiles \fR\`\fIP1 [P2 ...]\fR\'"
Packit Bot ea69bd
Specifies the percentiles shown in the Scan Timings report.
Packit Bot ea69bd
The arguments \fIP1 ...\fR are integers from 0 to 100 inclusive.
Packit Bot ea69bd
Their order will be preserved in the report.
Packit Bot ea69bd
.IP "\fB--notimings\fR"
Packit Bot ea69bd
Disables the Amavis Scan Timings report.
Packit Bot ea69bd
.IP "\fB--version\fR"
Packit Bot ea69bd
Print \fBamavis-logwatch\fR version information.
Packit Bot ea69bd
Packit Bot ea69bd
.SS Level Limiters
Packit Bot ea69bd
.PP
Packit Bot ea69bd
The output of every section in the \fBDetailed\fR report is controlled by a level limiter.
Packit Bot ea69bd
The name of the level limiter variable will be output when the \fBsect_vars\fR option is set.
Packit Bot ea69bd
Level limiters are set either via command line in standalone mode with \fB--limit \fIlimiter\fB=\fIlevelspec\fR option,
Packit Bot ea69bd
or via configuration file variable \fB$amavis_\fIlimiter\fB=\fIlevelspec\fR.
Packit Bot ea69bd
Each limiter requires a \fIlevelspec\fR argument, which is described below in \fBLEVEL CONTROL\fR.
Packit Bot ea69bd
Packit Bot ea69bd
The list of level limiters is shown below.
Packit Bot ea69bd
Packit Bot ea69bd
.de TQ
Packit Bot ea69bd
.  br
Packit Bot ea69bd
.  ns
Packit Bot ea69bd
.  TP \\$1
Packit Bot ea69bd
..
Packit Bot ea69bd
Packit Bot ea69bd
.PD 0
Packit Bot ea69bd
.PP
Packit Bot ea69bd
Amavis major contents category (ccatmajor) sections, listed in order of priority:
Packit Bot ea69bd
VIRUS, BANNED, UNCHECKED, SPAM, SPAMMY, BADH, OVERSIZED, MTA, CLEAN.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBMalwareBlocked"
Packit Bot ea69bd
.IP "\fBMalwarePassed"
Packit Bot ea69bd
Blocked or passed messages that contain malware (ccatmajor: VIRUS).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBBannedNameBlocked"
Packit Bot ea69bd
.IP "\fBBannedNamePassed"
Packit Bot ea69bd
Blocked or passed messages that contain banned names in MIME parts (ccatmajor: BANNED).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBUncheckedBlocked"
Packit Bot ea69bd
.IP "\fBUncheckedPassed"
Packit Bot ea69bd
Blocked or passed messages that were not checked by a virus scanner or SpamAssassin (Amavis ccatmajor: UNCHECKED).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBSpamBlocked"
Packit Bot ea69bd
.IP "\fBSpamPassed"
Packit Bot ea69bd
Blocked or passed messages that were considered spam that reached kill level (Amavis ccatmajor: SPAM)
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBSpammyBlocked"
Packit Bot ea69bd
.IP "\fBSpammyPassed"
Packit Bot ea69bd
Blocked or passed messages that were considered spam, but did not reach kill level (Amavis ccatmajor: SPAMMY)
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBBadHeaderBlocked"
Packit Bot ea69bd
.IP "\fBBadHeaderPassed"
Packit Bot ea69bd
Blocked or passed messages that contain bad mail headers (ccatmajor: BAD-HEADER).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBOversizedBlocked"
Packit Bot ea69bd
.IP "\fBOversizedPassed"
Packit Bot ea69bd
Blocked or passed messages that were considered oversized (Amavis ccatmajor: OVERSIZED).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBMtaBlocked"
Packit Bot ea69bd
.IP "\fBMtaPassed"
Packit Bot ea69bd
Blocked or passed messages due to failure to re-inject to MTA (Amavis ccatmajor: MTA-BLOCKED).
Packit Bot ea69bd
Occurrences of this event indicates a configuration problem.
Packit Bot ea69bd
[ note: I don't believe mtapassed occurs, but exists for completeness.]
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBOtherBlocked"
Packit Bot ea69bd
.IP "\fBOtherPassed"
Packit Bot ea69bd
Blocked or passed messages that are not any of other major contents categories (Amavis ccatmajor: OTHER).
Packit Bot ea69bd
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBTempFailBlocked"
Packit Bot ea69bd
.IP "\fBTempfailPassed"
Packit Bot ea69bd
Blocked or passed messages that had a temporary failure (Amavis ccatmajor: TEMPFAIL)
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBCleanBlocked"
Packit Bot ea69bd
.IP "\fBCleanPassed "
Packit Bot ea69bd
Messages blocked or passed which were considered clean (Amavis ccatmajor: CLEAN; i.e. non-spam, non-viral).
Packit Bot ea69bd
Packit Bot ea69bd
.PP
Packit Bot ea69bd
Other sections, arranged alphabetically:
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBAvConnectFailure"
Packit Bot ea69bd
Problems connecting to Anti-Virus scanner(s).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBAvTimeout"
Packit Bot ea69bd
Timeouts awaiting responses from Anti-Virus scanner(s).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBArchiveExtract"
Packit Bot ea69bd
Archive extraction problems.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBBadHeaderSupp"
Packit Bot ea69bd
Supplemental debug information regarding messages containing bad mail headers.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBBayes"
Packit Bot ea69bd
Messages frequencies by Bayesian probability buckets.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBBadAddress"
Packit Bot ea69bd
Invalid mail address syntax.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBBlacklisted"
Packit Bot ea69bd
Messages that were (soft-)blacklisted.  See also Whitelisted below.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBBounceKilled"
Packit Bot ea69bd
.IP "\fBBounceRescued"
Packit Bot ea69bd
.IP "\fBBounceUnverifiable"
Packit Bot ea69bd
Disposition of incoming bounce messages (DSNs).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBContentType"
Packit Bot ea69bd
MIME attachment breakdown by type/subtype.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBDccError"
Packit Bot ea69bd
Errors encountered with or returned by DCC.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBDefangError"
Packit Bot ea69bd
Errors encountered during defang process.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBDefanged"
Packit Bot ea69bd
Messages defanged (rendered harmless).
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBDsnNotification"
Packit Bot ea69bd
Errors encountered during attempt to send delivery status notification.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBDsnSuppressed"
Packit Bot ea69bd
Delivery status notification (DSN) intentionally suppressed.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBExtraModules"
Packit Bot ea69bd
Additional code modules Amavis loaded during runtime.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBFakeSender"
Packit Bot ea69bd
Forged sender addresses, as determimed by Amavis.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBFatal"
Packit Bot ea69bd
Fatal events.  These are presented at the top of the report, as they may require attention.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBLocalDeliverySkipped"
Packit Bot ea69bd
Failures delivering to a local address.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBMalwareByScanner"
Packit Bot ea69bd
Breakdown of malware by scanner(s) that detected the malware.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBMimeError"
Packit Bot ea69bd
Errors encountered during MIME extraction.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBPanic"
Packit Bot ea69bd
Panic events.  These are presented at the top of the report, as they may require attention.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBp0f"
Packit Bot ea69bd
Passive fingerprint (p0f) hits, grouped by mail contents type (virus, unchecked, banned, spam, ham),
Packit Bot ea69bd
next by operating system genre, and finally by IP address.
Packit Bot ea69bd
Note: Windows systems are refined by Windows OS version, whereas versions of other operating systems
Packit Bot ea69bd
are grouped generically.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBReleased"
Packit Bot ea69bd
Messages that were released from Amavis quarantine.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBSADiags"
Packit Bot ea69bd
Diagnostics as reported from SpamAssassin.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBSmtpResponse"
Packit Bot ea69bd
SMTP responses received during dialog with MTA.  These log entries are primarly debug.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBTmpPreserved"
Packit Bot ea69bd
Temporary directories preserved by Amavis when some component encounters a problem or failure.
Packit Bot ea69bd
Directories listed and their corresponding log entries should be evaluated for problems.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBVirusScanSkipped"
Packit Bot ea69bd
Messages that could not be scanned by a virus scanner.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBWarning"
Packit Bot ea69bd
Warning events not categorized in specific warnings below.
Packit Bot ea69bd
These are presented at the top of the report, as they may require attention.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBWarningAddressModified"
Packit Bot ea69bd
Incomplete email addresses modified by Amavis for safety.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBWarningNoQuarantineId"
Packit Bot ea69bd
Attempts to release a quarantined message that did not contain an X-Quarantine-ID header.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBWarningSecurity \fIlevelspec\fR"
Packit Bot ea69bd
Insecure configuration or utility used by Amavis.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBWarningSmtpShutdown"
Packit Bot ea69bd
Failures during SMTP conversation with MTA.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBWarningSql"
Packit Bot ea69bd
Failures to communicate with, or error replies from, SQL service.
Packit Bot ea69bd
Packit Bot ea69bd
.IP "\fBWhitelisted"
Packit Bot ea69bd
Messages that were (soft-)whitelisted.  See also Blacklisted above.
Packit Bot ea69bd
Packit Bot ea69bd
.PD
Packit Bot ea69bd
.SH LEVEL CONTROL
Packit Bot ea69bd
.ad
Packit Bot ea69bd
.fi
Packit Bot ea69bd
The \fBDetailed\fR section of the report consists of a number of sub-sections,
Packit Bot ea69bd
each of which is controlled both globally and independently.
Packit Bot ea69bd
Two settings influence the output provided in the \fBDetailed\fR report: 
Packit Bot ea69bd
a global detail level (specified with \fB--detail\fR) which has final (big hammer)
Packit Bot ea69bd
output-limiting control over the \fBDetailed\fR section,
Packit Bot ea69bd
and sub-section specific detail settings (small hammer), which allow further limiting
Packit Bot ea69bd
of the output for a sub-section.
Packit Bot ea69bd
Each sub-section may be limited to a specific depth level, and each sub-level may be limited with top N or threshold limits.
Packit Bot ea69bd
The \fIlevelspec\fR argument to each of the level limiters listed above is used to accomplish this.
Packit Bot ea69bd
Packit Bot ea69bd
It is probably best to continue explanation of sub-level limiting with the following well-known outline-style hierarchy, and
Packit Bot ea69bd
some basic examples:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
    level 0
Packit Bot ea69bd
       level 1
Packit Bot ea69bd
          level 2
Packit Bot ea69bd
             level 3
Packit Bot ea69bd
                level 4
Packit Bot ea69bd
                level 4
Packit Bot ea69bd
          level 2
Packit Bot ea69bd
             level 3
Packit Bot ea69bd
                level 4
Packit Bot ea69bd
                level 4
Packit Bot ea69bd
                level 4
Packit Bot ea69bd
             level 3
Packit Bot ea69bd
                level 4
Packit Bot ea69bd
             level 3
Packit Bot ea69bd
       level 1
Packit Bot ea69bd
          level 2
Packit Bot ea69bd
             level 3
Packit Bot ea69bd
                level 4
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
The simplest form of output limiting suppresses all output below a specified level.
Packit Bot ea69bd
For example, a \fIlevelspec\fR set to "2" shows only data in levels 0 through 2.
Packit Bot ea69bd
Think of this as collapsing each sub-level 2 item, thus hiding all inferior levels (3, 4, ...),
Packit Bot ea69bd
to yield:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
    level 0
Packit Bot ea69bd
       level 1
Packit Bot ea69bd
          level 2
Packit Bot ea69bd
          level 2
Packit Bot ea69bd
       level 1
Packit Bot ea69bd
          level 2
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
Sometimes the volume of output in a section is too great, and it is useful to suppress any data that does not exceed a certain threshold value.
Packit Bot ea69bd
Consider a dictionary spam attack, which produces very lengthy lists of hit-once recipient email or IP addresses.
Packit Bot ea69bd
Each sub-level in the hierarchy can be threshold-limited by setting the \fIlevelspec\fR appropriately.
Packit Bot ea69bd
Setting \fIlevelspec\fR to the value "2::5" will suppress any data at level 2 that does not exceed a hit count of 5.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
Perhaps producing a top N list, such as top 10 senders, is desired.
Packit Bot ea69bd
A \fIlevelspec\fR of "3:10:" limits level 3 data to only the top 10 hits.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
With those simple examples out of the way, a \fIlevelspec\fR is defined as a whitespace- or comma-separated list of one or more of the following:
Packit Bot ea69bd
.IP "\fIl\fR"
Packit Bot ea69bd
Specifies the maximum level to be output for this sub-section, with a range from 0 to 10.
Packit Bot ea69bd
if \fIl\fR is 0, no levels will be output, effectively disabling the sub-section
Packit Bot ea69bd
(level 0 data is already provided in the Summary report, so level 1 is considered the first useful level in the \fBDetailed\fR report).
Packit Bot ea69bd
Higher values will produce output up to and including the specified level.
Packit Bot ea69bd
.IP "\fIl\fB.\fIn\fR"
Packit Bot ea69bd
Same as above, with the addition that \fIn\fR limits this section's level 1 output to
Packit Bot ea69bd
the top \fIn\fR items.
Packit Bot ea69bd
The value for \fIn\fR can be any integer greater than 1.
Packit Bot ea69bd
(This form of limiting has less utility than the syntax shown below. It is provided for
Packit Bot ea69bd
backwards compatibility; users are encouraged to use the syntax below).
Packit Bot ea69bd
.IP "\fIl\fB:\fIn\fB:\fIt\fR"
Packit Bot ea69bd
This triplet specifies level \fIl\fR, top \fIn\fR, and minimum threshold \fIt\fR.
Packit Bot ea69bd
Each of the values are integers, with \fIl\fR being the level limiter as described above, \fIn\fR being
Packit Bot ea69bd
a top \fIn\fR limiter for the level \fIl\fR, and \fIt\fR being the threshold limiter for level \fIl\fR.
Packit Bot ea69bd
When both \fIn\fR and \fIt\fR are specified, \fIn\fR has priority, allowing top \fIn\fR lists (regardless of
Packit Bot ea69bd
threshold value).
Packit Bot ea69bd
If the value of \fIl\fR is omitted, the specified values for \fIn\fR and/or \fIt\fR are used for
Packit Bot ea69bd
all levels available in the sub-section.
Packit Bot ea69bd
This permits a simple form of wildcarding (eg. place minimum threshold limits on all levels).
Packit Bot ea69bd
However, specific limiters always override wildcard limiters.
Packit Bot ea69bd
The first form of level limiter may be included in \fIlevelspec\fR to restrict output, regardless of how many triplets are present.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
All three forms of limiters are effective only when \fBamavis-logwatch\fR's detail level is 5
Packit Bot ea69bd
or greater (the \fBDetailed\fR section is not activated until detail is at least 5).
Packit Bot ea69bd
.PP
Packit Bot ea69bd
See the \fBEXAMPLES\fR section for usage scenarios.
Packit Bot ea69bd
.SH CONFIGURATION FILE
Packit Bot ea69bd
.ad
Packit Bot ea69bd
\fBAmavis-logwatch\fR can read configuration settings from a configuration file.
Packit Bot ea69bd
Essentially, any command line option can be placed into a configuration file, and
Packit Bot ea69bd
these settings are read upon startup.
Packit Bot ea69bd
Packit Bot ea69bd
Because \fBamavis-logwatch\fR can run either standalone or within Logwatch,
Packit Bot ea69bd
to minimize confusion, \fBamavis-logwatch\fR inherits Logwatch's configuration
Packit Bot ea69bd
file syntax requirements and conventions.
Packit Bot ea69bd
These are:
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
White space lines are ignored.
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
Lines beginning with \fB#\fR are ignored
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
Settings are of the form:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
        \fIoption\fB = \fIvalue\fR
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
Spaces or tabs on either side of the \fB=\fR character are ignored.
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
Any \fIvalue\fR protected in double quotes will be case-preserved.
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
All other content is reduced to lowercase (non-preserving, case insensitive).
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
All \fBamavis-logwatch\fR configuration settings must be prefixed with "\fB$amavis_\fR" or
Packit Bot ea69bd
\fBamavis-logwatch\fR will ignore them.
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
When running under Logwatch, any values not prefixed with "\fB$amavis_\fR" are
Packit Bot ea69bd
consumed by Logwatch; it only passes to \fBamavis-logwatch\fR (via environment variable)
Packit Bot ea69bd
settings it considers valid.
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
The values \fBTrue\fR and \fBYes\fR are converted to 1, and \fBFalse\fR and \fBNo\fR are converted to 0.
Packit Bot ea69bd
.IP \(bu 4'. 
Packit Bot ea69bd
Order of settings is not preserved within a configuration file (since settings are passed
Packit Bot ea69bd
by Logwatch via environment variables, which have no defined order).
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To include a command line option in a configuration file,
Packit Bot ea69bd
prefix the command line option name with the word "\fB$amavis_\fR".
Packit Bot ea69bd
The following configuration file setting and command line option are equivalent:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
        \fB$amavis_Line_Style = Truncate\fR
Packit Bot ea69bd
Packit Bot ea69bd
        \fB--line_style Truncate\fR
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
Level limiters are also prefixed with \fB$amavis_\fR, but on the command line are specified with the \fB--limit\fR option:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
        \fB$amavis_SpamBlocked = 2\fR
Packit Bot ea69bd
Packit Bot ea69bd
        \fB--limit SpamBlocked=2\fR
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
Packit Bot ea69bd
Packit Bot ea69bd
The order of command line options and configuration file processing occurs as follows:
Packit Bot ea69bd
1) The default configuration file is read if it exists and no \fB--config_file\fR was specified on a command line.
Packit Bot ea69bd
2) Configuration files are read and processed in the order found on the command line.
Packit Bot ea69bd
3) Command line options override any options already set either via command line or from any configuration file.
Packit Bot ea69bd
Packit Bot ea69bd
Command line options are interpreted when they are seen on the command line, and later options will override previously set options.
Packit Bot ea69bd
Packit Bot ea69bd
Packit Bot ea69bd
.SH "EXIT STATUS"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.ad
Packit Bot ea69bd
.fi
Packit Bot ea69bd
The \fBamavis-logwatch\fR utility exits with a status code of 0, unless an error
Packit Bot ea69bd
occurred, in which case a non-zero exit status is returned.
Packit Bot ea69bd
.SH "EXAMPLES"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.ad
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.SS Running Standalone
Packit Bot ea69bd
\fBNote:\fR \fBamavis-logwatch\fR reads its log data from one or more named Amavis log files, or from STDIN.
Packit Bot ea69bd
For brevity, where required, the examples below use the word \fIfile\fR as the command line
Packit Bot ea69bd
argument meaning \fI/path/to/amavis.log\fR.
Packit Bot ea69bd
Obviously you will need to substitute \fIfile\fR with the appropriate path.
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To run \fBamavis-logwatch\fR in standalone mode, simply run:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBamavis-logwatch \fIfile\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.PP
Packit Bot ea69bd
A complete list of options and basic usage is available via:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBamavis-logwatch --help\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To print a summary only report of Amavis log data:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBamavis-logwatch --detail 1 \fIfile\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To produce a summary report and a one-level detail report for May 25th:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBgrep 'May 25' \fIfile\fB | amavis-logwatch --detail 5\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To produce only a top 10 list of Sent email domains, the summary report and detailed reports
Packit Bot ea69bd
are first disabled. Since commands line options are read and enabled left-to-right,
Packit Bot ea69bd
the Sent section is re-enabled to level 1 with a level 1 top 10 limiter:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBamavis-logwatch --nosummary --nodetail \\
Packit Bot ea69bd
   --limit spamblocked '1 1:10:' \fIfile\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
The following command and its sample output shows a more complex level limiter example.
Packit Bot ea69bd
The command gives the top 4 spam blocked recipients (level 1), and under with each recipient
Packit Bot ea69bd
the top 2 sending IPs (level 2) and finally below that, only envelope from addresses (level 3) with hit counts
Packit Bot ea69bd
greater than 6.
Packit Bot ea69bd
Ellipses indicate top N or threshold-limited data:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBamavis-logwatch --nosummary --nodetail \\
Packit Bot ea69bd
        --limit spamblocked '1:4: 2:2: 3::6' \fIfile\fR
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
19346   Spam blocked -----------------------------------
Packit Bot ea69bd
  756      joe@example.com
Packit Bot ea69bd
   12         10.0.0.1
Packit Bot ea69bd
   12            <>
Packit Bot ea69bd
   12         10.99.99.99
Packit Bot ea69bd
   12            <>
Packit Bot ea69bd
	     ...
Packit Bot ea69bd
  640      fred@example.com
Packit Bot ea69bd
    8         10.0.0.1
Packit Bot ea69bd
    8            <>
Packit Bot ea69bd
    8         192.168.3.19
Packit Bot ea69bd
    8            <>
Packit Bot ea69bd
	     ...
Packit Bot ea69bd
  595      peter@sample.net
Packit Bot ea69bd
    8         10.0.0.1
Packit Bot ea69bd
    8            <>
Packit Bot ea69bd
    7         192.168.3.3
Packit Bot ea69bd
    7            <>
Packit Bot ea69bd
	     ...
Packit Bot ea69bd
  547      paul@example.us
Packit Bot ea69bd
    8         192.168.3.19
Packit Bot ea69bd
    8            <>
Packit Bot ea69bd
    7         10.0.0.1
Packit Bot ea69bd
    7            <>
Packit Bot ea69bd
 	      ...
Packit Bot ea69bd
	   ...
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.SS Running within Logwatch
Packit Bot ea69bd
\fBNote:\fR Logwatch versions prior to 7.3.6, unless configured otherwise, required the \fB--print\fR option to print to STDOUT instead of sending reports via email.
Packit Bot ea69bd
Since version 7.3.6, STDOUT is the default output destination, and the \fB--print\fR option has been replaced
Packit Bot ea69bd
by \fB--output stdout\fR. Check your configuration to determine where report output will be directed, and add the appropriate option to the commands below.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To print a summary report for today's Amavis log data:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBlogwatch --service amavis --range today --detail 1\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To print a report for today's Amavis log data, with one level
Packit Bot ea69bd
of detail in the \fBDetailed\fR section:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBlogwatch --service amavis --range today --detail 5\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To print a report for yesterday, with two levels of detail in the \fBDetailed\fR section:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBlogwatch --service amavis --range yesterday --detail 6\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To print a report from Dec 12th through Dec 14th, with four levels of detail in the \fBDetailed\fR section:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBlogwatch --service amavis --range \\
Packit Bot ea69bd
        'between 12/12 and 12/14' --detail 8\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.PP
Packit Bot ea69bd
To print a report for today, with all levels of detail:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBlogwatch --service amavis --range today --detail 10\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.PP
Packit Bot ea69bd
Same as above, but leaves long lines uncropped:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.RS 4
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBlogwatch --service amavis --range today --detail 11\fR
Packit Bot ea69bd
.RE 0
Packit Bot ea69bd
.SS "Amavis Log Level"
Packit Bot ea69bd
.PP
Packit Bot ea69bd
Amavis provides additional log information when the variable 
Packit Bot ea69bd
\fB$log_level\fR is increased above the default 0 value.
Packit Bot ea69bd
This information is used by the \fBamavis-logwatch\fR utility to provide additional reports,
Packit Bot ea69bd
not available with the default \fB$log_level\fR=0 value.
Packit Bot ea69bd
A \fB$log_level\fR of 2 is suggested.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
If you prefer not to increase the noise level in your main mail or Amavis logs,
Packit Bot ea69bd
you can configure syslog to log Amavis' output to multiple log files,
Packit Bot ea69bd
where basic log entries are routed to your main mail log(s) and more detailed
Packit Bot ea69bd
entries routed to an Amavis-specific log file used to feed the \fBamavis-logwatch\fR utility.
Packit Bot ea69bd
.PP
Packit Bot ea69bd
A convenient way to accomplish this is to change the Amavis
Packit Bot ea69bd
configuration variables in \fBamavisd.conf\fR as shown below:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
    amavisd.conf:
Packit Bot ea69bd
        $log_level = 2;
Packit Bot ea69bd
        $syslog_facility = 'local5';
Packit Bot ea69bd
        $syslog_priority = 'debug';
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
This increases \fB$log_level\fR to 2, and sends Amavis' log entries to
Packit Bot ea69bd
an alternate syslog facility (eg. \fBlocal5\fR, user), which can then be
Packit Bot ea69bd
routed to one or more log files, including your main mail log file:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
    syslog.conf:
Packit Bot ea69bd
        #mail.info                         -/var/log/maillog
Packit Bot ea69bd
        mail.info;local5.notice            -/var/log/maillog
Packit Bot ea69bd
Packit Bot ea69bd
        local5.info                        -/var/log/amavisd-info.log
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.PP
Packit Bot ea69bd
\fBAmavis\fR' typical \fB$log_level\fR 0 messages will be directed to both your maillog
Packit Bot ea69bd
and to the \fBamavisd-info.log\fR file, but higher \fB$log_level\fR messages
Packit Bot ea69bd
will only be routed to the \fBamavisd-info.log\fR file.
Packit Bot ea69bd
For additional information on Amavis' logging, search the
Packit Bot ea69bd
file \fBRELEASE_NOTES\fR in the Amavis distribution for:
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Packit Bot ea69bd
    "syslog priorities are now dynamically derived"
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
.SH "ENVIRONMENT"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.ad
Packit Bot ea69bd
.fi
Packit Bot ea69bd
The \fBamavis-logwatch\fR program uses the following (automatically set) environment
Packit Bot ea69bd
variables when running under Logwatch:
Packit Bot ea69bd
.IP \fBLOGWATCH_DETAIL_LEVEL\fR
Packit Bot ea69bd
This is the detail level specified with the Logwatch command line argument \fB--detail\fR
Packit Bot ea69bd
or the \fBDetail\fR setting in the ...conf/services/amavis.conf configuration file.
Packit Bot ea69bd
.IP \fBLOGWATCH_DEBUG\fR
Packit Bot ea69bd
This is the debug level specified with the Logwatch command line argument \fB--debug\fR.
Packit Bot ea69bd
.IP \fBamavis_\fIxxx\fR
Packit Bot ea69bd
The Logwatch program passes all settings \fBamavis_\fIxxx\fR in the configuration file ...conf/services/amavis.conf
Packit Bot ea69bd
to the \fBamavis\fR filter (which is actually named .../scripts/services/amavis) via environment variable.
Packit Bot ea69bd
.SH "FILES"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.SS Standalone mode
Packit Bot ea69bd
.IP "/usr/local/bin/amavis-logwatch"
Packit Bot ea69bd
The \fBamavis-logwatch\fR program
Packit Bot ea69bd
.IP "/usr/local/etc/amavis-logwatch.conf"
Packit Bot ea69bd
The \fBamavis-logwatch\fR configuration file in standalone mode
Packit Bot ea69bd
.SS Logwatch mode
Packit Bot ea69bd
.IP "/etc/logwatch/scripts/services/amavis"
Packit Bot ea69bd
The Logwatch \fBamavis\fR filter
Packit Bot ea69bd
.IP "/etc/logwatch/conf/services/amavis.conf"
Packit Bot ea69bd
The Logwatch \fBamavis\fR filter configuration file
Packit Bot ea69bd
.SH "SEE ALSO"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
logwatch(8), system log analyzer and reporter
Packit Bot ea69bd
.SH "README FILES"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.ad
Packit Bot ea69bd
.nf
Packit Bot ea69bd
README, an overview of \fBamavis-logwatch\fR
Packit Bot ea69bd
Changes, the version change list history
Packit Bot ea69bd
Bugs, a list of the current bugs or other inadequacies
Packit Bot ea69bd
Makefile, the rudimentary installer
Packit Bot ea69bd
LICENSE, the usage and redistribution licensing terms
Packit Bot ea69bd
.SH "LICENSE"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
.ad
Packit Bot ea69bd
Covered under the included MIT/X-Consortium License:
Packit Bot ea69bd
http://www.opensource.org/licenses/mit-license.php
Packit Bot ea69bd
Packit Bot ea69bd
.SH "AUTHOR(S)"
Packit Bot ea69bd
.na
Packit Bot ea69bd
.nf
Packit Bot ea69bd
Mike Cappella
Packit Bot ea69bd
Packit Bot ea69bd
.fi
Packit Bot ea69bd
The original \fBamavis\fR Logwatch filter was written by
Packit Bot ea69bd
Jim O'Halloran, and has had many contributors over the years.
Packit Bot ea69bd
They are entirely not responsible for any errors, problems or failures since the current author's
Packit Bot ea69bd
hands have touched the source code.