from Tom Callahan <anomaly@abducted.us>
(reformatted by Robert)
Signed-off-by: Robert <rspier@pobox.com>
Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
import plugins/connection_time from SVN's contrib. Changes:
* perltidy run
* add one optional parameter: log level of the message, defaults
to LOGNOTICE (same as in SVN)
* updated docs
* use magic hooking with hook_rcpt
* add note about regexes being eval()ed => trusted users only
Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
plugins/virus/kavscanner calls $transaction->add_recipient($_->address)
on a list of Mail::Address objects, but add_recipient() clearly
documents that it takes Qpsmtpd::Address (or compatible) objects, not
strings. This is a bit of a drive-by fix inspired by a grep through the
codebase for calls to add_recipient().
non-premium customers or something like that such as (3) annoying your
customers, if you are in a position to actually want to do that
Signed-off-by: Robert <rspier@pobox.com>
Can't call method "close" on an undefined value at
/usr/share/perl5/IO/Socket/SSL.pm line 780.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@937 958fd67b-6ff1-0310-b445-bb7760255be9
the MX lookups and, only if they return nothing, make the A lookups.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@880 958fd67b-6ff1-0310-b445-bb7760255be9
Fix to prevent run_continuation being incorrectly called
(both Radu Greab)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@857 958fd67b-6ff1-0310-b445-bb7760255be9
... now check_earlytalker can be expanded to VRFY and NOOP (see RFC 1854, #2.1)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@836 958fd67b-6ff1-0310-b445-bb7760255be9
- add back in after 0.42 is out? if yes: start implementing in -prefork
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@809 958fd67b-6ff1-0310-b445-bb7760255be9
Add _auth field to PollServer.
Make sure that check_earlytalker works with PollServer.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@711 958fd67b-6ff1-0310-b445-bb7760255be9
Qpsmtpd::Plugins for more info. This can be used to disable (and re-
enable) loaded plugins for the current connection.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@700 958fd67b-6ff1-0310-b445-bb7760255be9
domain names we queried.
See the thread "dnsbl or spamhaus occassionally blocks wrong IP"
starting at 14 Mar 2006 for details.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@683 958fd67b-6ff1-0310-b445-bb7760255be9
Sender: but does not resign message or strip DomainKeys-Signature. Add
config option to prevent badly signed message from being DENY'd.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@654 958fd67b-6ff1-0310-b445-bb7760255be9
mandate signing by policy for the moment).
Change variables to use actual English words as names (instead of disemvoweled
or truncated variants).
Tweak Copyright notice to be current.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@652 958fd67b-6ff1-0310-b445-bb7760255be9
Enhance the spamassassin plugin to support connecting to a remote
spamd process (Kjetil Kjernsmo).
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@651 958fd67b-6ff1-0310-b445-bb7760255be9
Make the clamdscan plugin temporarily deny mail if if can't talk to clamd
(Filippo Carletti)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@621 958fd67b-6ff1-0310-b445-bb7760255be9
From: gordonr@gormand.com.au
Subject: Re: Submitting plugins (was Re: New plugin: denybounce)
Date: January 24, 2006 9:02:35 PM PST
To: ask@develooper.com
Cc: gavin@openfusion.com.au, qpsmtpd@perl.org
Message-Id: <43D7066B.3050106@gormand.com.au>
Ask Bjørn Hansen wrote:
On Jan 24, 2006, at 1:08 PM, Gordon Rowell wrote:
- License statement - either as per qpsmtpd or as per Perl or similar open license
No, it really should be MIT licensed ("as per qpsmtpd") to go in the distribution.
There are a few exceptions (only your plugins at a cursory glance), but those are mistakes. :-)
I don't have an issue with my qpsmtpd plugins being changed to state:
=head1 AUTHOR
Copyright 2005 Gordon Rowell <gordonr@gormand.com.au>
This software is free software and may be distributed under the same
terms as qpsmtpd itself.
Though as a distro maintainer, we do have a sizeable issue with license proliferation. It really is a bit of a nightmare when two licenses are almost, but not completely, the same.
Thanks,
Gordon
r4216@g5: ask | 2006-01-24 23:12:21 -0800
merge license fix from trunk
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@603 958fd67b-6ff1-0310-b445-bb7760255be9
Patch by Hanno Hecker <hah@uu-x.de>.
Adds the RFC 1893 status codes to the messages which are returned to the
sending client.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@602 958fd67b-6ff1-0310-b445-bb7760255be9
By default no flags are set (old behaviour). Known flags for cleanup are
FLAG_FILTER, FLAG_BCC_OK and FLAG_MAP_OK, see POD for details.
Patch by: Hanno Hecker <hah@uu-x.de>
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@600 958fd67b-6ff1-0310-b445-bb7760255be9
* lib/Qpsmtpd/Connection.pm
Abstract out parameters which can be reused (e.g. TLS) or can be
set when creating the Connection object via start().
* plugins/tls
Simplify code to use $self->clone() construct and also suppress
IO::Socket::SSL debug noise, now that this is working.
* plugins/tls_cert
New file to automate creating self-signed certificates for TLS.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@597 958fd67b-6ff1-0310-b445-bb7760255be9
Use LOGNOTICE instead of LOGERROR when bailing early due to
non-multipart message.
Test clamd->ping() before scanning, and bail if it doesn't
answer (with an appropriate error).
Patch submitted by Dave Rolsky <autarch@urth.org>.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@583 958fd67b-6ff1-0310-b445-bb7760255be9
r588@jpeacock (orig r490): jpeacock | 2005-07-09 07:03:53 -0400
r547@jpeacock: jpeacock | 2005-07-02 07:20:17 -0400
Replace pithy comment with something more neutral.
Thanks Gordon Rowell <gordonr@gormand.com.au>
r548@jpeacock: jpeacock | 2005-07-02 07:24:21 -0400
Example patterns for badrcptto plugin - Gordon Rowell <gordonr@gormand.com.au>
r586@jpeacock: jpeacock | 2005-07-09 06:54:47 -0400
Don't use varlog() directly unless you are passing all parameters.
Don't try to log() anything during loading of logging plugins.
r587@jpeacock: jpeacock | 2005-07-09 06:59:57 -0400
Cannot use new-style hooking with logging plugins (yet).
r590@jpeacock (orig r491): jpeacock | 2005-07-10 06:56:55 -0400
r589@jpeacock: jpeacock | 2005-07-10 06:54:32 -0400
Track hooks as array and hash.
Re-revert changes to logging plugins to use new-style hooking.
logging/adaptive assumed that register() has been called before hook_logging.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@503 958fd67b-6ff1-0310-b445-bb7760255be9
The great plugin renaming in the name of inheritance and standardization commit.
1. new concept of standard hook_ names.
2. Plugin::init
3. renamed many subroutines in plugins (and cleaned up register subs)
4. updated README.plugins
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@479 958fd67b-6ff1-0310-b445-bb7760255be9
and save log lines <= min level. IIF a message is accepted for delivery,
then echo out the saved log lines (typically just FROM and TO) with the prefix
for multilog filtering into independent log files.
Update POD in logging/adaptive to describe changed behavior as well as give
an example log/run file to filter the messages accordingly.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@443 958fd67b-6ff1-0310-b445-bb7760255be9
Change plugins/dnsbl to permit AUTH'd or other relay clients even if IP
is on a blacklist.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@442 958fd67b-6ff1-0310-b445-bb7760255be9
Interfaces with Bruce Guenther's Credential Validation Module (CVM)
* plugins/auth/auth_cvm_unix_local
Only DENY if the credentials were accepted but incorrect (bad password?)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@432 958fd67b-6ff1-0310-b445-bb7760255be9
* plugins/check_badrcptto_patterns
Match bad RCPTO address with regex
* plugins/check_norelay
Carve out holes from larger relay blocks
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@431 958fd67b-6ff1-0310-b445-bb7760255be9
Create a single Qpsmtpd::TcpServer object in the parent process and
then rely on fork to let each child have it's own copy
* lib/Qpsmtpd/Plugin.pm
Add new pre-connection and post-connection hooks
* README.plugins
Document the above new hooks
* lib/Qpsmtpd.pm
No longer have local value for trace_level() the first time through, which
was masking the global value (due to stupid search/replace error).
Don't call log() from trace_level() since it is only ever called from
within the varlog() sub when no logging plugin is registered.
* plugins/dnsbl
Config line option to use DENY_DISCONNECT instead of DENY (since any IP
on a blacklist should not have a chance to send anything for now).
Add POD to document the new disconnect behavior
* lib/Qpsmtpd.pm
Compatibility changes so test files continue to work
* t/Test/Qpsmtpd.pm
Compatibility sub for core subs which call varlog() directly
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@428 958fd67b-6ff1-0310-b445-bb7760255be9
Fix some totally egregious spelling errors
* plugins/auth/auth_ldap_bind
New plugin to authenticate against an LDAP database
Thanks to Elliot Foster <elliotf@gratuitous.net>
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@404 958fd67b-6ff1-0310-b445-bb7760255be9
representation from the numeric (for logging purposes). Add new logging
plugin, logging/adaptive, which logs at different levels depending on
whether the message was accepted/rejected.
* lib/Qpsmtpd/Constants.pm
use hashes for storing return_codes and log_levels
export accessor methods to retrieve the text representations
* lib/Qpsmtpd.pm
Rename log_level() to trace_level() so as to not conflict with the same
name in Qpsmtpd::Constants.
Call return_code() to display the text form when logging
* plugins/logging/adaptive
Better documentation
Support named parameters and prefix
Call return_code() to display the text form when logging
* plugins/logging/warn
Include POD
* README.logging
First pass at documenting the logging plugin API
* config.sample/loglevel
New numbering scheme to map directly to syslog levels
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@401 958fd67b-6ff1-0310-b445-bb7760255be9
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
Correctly support alternate domain socket
Remove a tab that crept in
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@383 958fd67b-6ff1-0310-b445-bb7760255be9
Remember (belatedly) to add changes here
* MANIFEST
Add all new files to this list
* plugins/virus/clamdscan
New AV plugin to directly communicate with clamd daemon
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@378 958fd67b-6ff1-0310-b445-bb7760255be9
Scan temporary file directly now that the spooled file includes the
entire message
* plugins/virus/bitdefender - John Peacock
plugins/virus/hbedv - Hanno Hecker
New AV plugins
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@377 958fd67b-6ff1-0310-b445-bb7760255be9
Reword the POD to explain exactly how to chmod the directories to get
clamdscan to work within the spool directory (Thanks to Robin Bowes)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@373 958fd67b-6ff1-0310-b445-bb7760255be9