qpsmtpd/plugins
John Peacock e331f6b248 Add plugable logging support include sample plugin which replicates the
existing core code.  Add OK hook.

*  lib/Qpsmtpd.pm
   (init_logger): replaced with log_level()
   (load_logging): NEW - load logging plugins without calling log()
   (log_level): NEW - set/get global $LogLevel scalar
   (log): now just a wrapper for varlog(); called only by core code
   (varlog): initializes logging if not already done, calls logging plugins
     in turn and falls back to interal logging unless plugins OK or DECLINED
   (_load_plugins): only display "Loading plugin" when actually loading one
   (run_hooks): load logging plugins without calling log(); add OK hook as
     else of the DENY* case
   (spool_dir): use global $Spool_dir scalar to cache location

*  lib/Qpsmtpd/Plugin.pm
   (%hooks): add "logging" and "ok"
   (register_hook): add local _hook to object cache
   (log): call varlog() with additional parameters hook and plugin_name
     except for logging hook
   (compile): add accessor sub for local _hook scalar

*  lib/Qpsmtpd/SMTP.pm
   (mail, rcpt): change loglevel to LOGALERT instead of LOGWARN for from/to

*  qpsmtpd-forkserver
   (REAPER): use package ::log() instead of warn()
   (main): defer calling log until $plugin_loader has been initialized
   (log): call logging using the $plugin_loader object

*  plugins/logging/warn
   NEW: sample plugin which replicates the core logging functionality

*  plugins/logging/devnull
   NEW: sample plugin which logs nothing (for testing multiple logging
     plugin functionality)

*  config.sample/logging
   sample configuration file for logging plugins

*  plugins/virus/uvscan
   plugins/virus/clamav
   Increase loglevel for non-serious warnings to LOGWARN from LOGERROR


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@398 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-24 21:16:35 +00:00
..
auth * plugins/auth/auth_vpopmail_sql 2005-02-10 14:33:13 +00:00
ident Two new plugins: 2004-08-29 07:47:25 +00:00
logging Add plugable logging support include sample plugin which replicates the 2005-03-24 21:16:35 +00:00
queue Changes by jpeacock@cpan.org (John Peacock) 2005-01-28 03:30:50 +00:00
virus Add plugable logging support include sample plugin which replicates the 2005-03-24 21:16:35 +00:00
check_badmailfrom Fix all uses of warn() to be $self->log(LOGWARN, ...) 2005-03-03 02:37:04 +00:00
check_badmailfromto Fix all uses of warn() to be $self->log(LOGWARN, ...) 2005-03-03 02:37:04 +00:00
check_badrcptto Perform checks on MAIL-FROM and RCPT-TO case insensitively. 2004-06-18 05:47:45 +00:00
check_basicheaders * plugins/check_basicheaders 2004-09-25 11:40:43 +00:00
check_earlytalker Changes by jpeacock@cpan.org (John Peacock) 2005-01-28 03:30:50 +00:00
check_relay * plugins/check_relay 2004-09-22 16:01:16 +00:00
check_spamhelo New for 0.28: Log levels and $Include for config/plugins 2004-03-05 12:46:24 +00:00
content_log A simple example of a plugin that logs all incoming mail to a file. 2002-11-01 02:08:38 +00:00
count_unrecognized_commands Changes by jpeacock@cpan.org (John Peacock) 2005-01-28 03:30:50 +00:00
dns_whitelist_soft Changes by jpeacock@cpan.org (John Peacock) 2005-01-28 03:30:50 +00:00
dnsbl Changes by jpeacock@cpan.org (John Peacock) 2005-01-28 03:30:50 +00:00
greylisting add Gavin's greylisting plugin 2005-02-15 21:42:52 +00:00
http_config New for 0.28: Log levels and $Include for config/plugins 2004-03-05 12:46:24 +00:00
milter Support more of the milter functionality (header changes) 2004-09-16 10:44:47 +00:00
quit_fortune http_config plugin 2002-11-06 06:42:55 +00:00
rcpt_ok * plugins/check_relay 2004-09-22 16:01:16 +00:00
require_resolvable_fromhost fix thinko from the log cleanup 2005-03-03 17:28:43 +00:00
rhsbl Don't check the HELO host for rfc-ignorant compliance (maybe this should be an option?) 2005-03-24 19:17:46 +00:00
sender_permitted_from From: Nick Leverton <> 2004-12-02 07:26:11 +00:00
spamassassin Fix all uses of warn() to be $self->log(LOGWARN, ...) 2005-03-03 02:37:04 +00:00