Commit Graph

167 Commits

Author SHA1 Message Date
Matt Sergeant
e1982f05d4 Fixed to use same subsystem as dnsbl plugin
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@581 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-28 19:07:56 +00:00
Matt Sergeant
8f7882d076 Finally a working version :-/
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@580 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-22 23:43:08 +00:00
Matt Sergeant
5994a79d9f Slight cleanup.
Support a finished() callback as the readable() thing didn't work.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@577 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-22 23:03:05 +00:00
Matt Sergeant
2af297f49c Fix for ignoring multiple dns returns
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@562 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-11 14:29:45 +00:00
Matt Sergeant
79ecf24218 Fix for tls enabling auth - this is kind of hacky, and I'd prefer to fix
this nastiness in the auth support instead. But this works for now.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@541 958fd67b-6ff1-0310-b445-bb7760255be9
2005-08-15 17:58:41 +00:00
Devin Carraway
8bb7cf67de Add a caution about using large wait times in check_earlytalker; some
superficial research suggests that some MTAs have unexpectedly short timeouts
waiting for SMTP greetings (default of 30sec for Exim4.5, most notably)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@534 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-30 07:19:17 +00:00
Matt Sergeant
72a3056e66 Default capabilities to an empty arrayref
Copy relay_client setting when cloning connection in tls


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@532 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 18:02:07 +00:00
Matt Sergeant
7edb1fd93a Fix "no pseudo hash" bug
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@515 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-18 12:50:35 +00:00
John Peacock
f096f293c1 Missed hook to data_post to add headers
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@513 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-18 11:10:11 +00:00
John Peacock
5f3c2dfa22 Missed hook to data_post to add headers
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@512 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-18 11:07:18 +00:00
Matt Sergeant
e100e3d67a Better fix for previous bug
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@499 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-12 21:59:30 +00:00
Matt Sergeant
9683016276 MERGE r386:r480 FROM https://svn.perl.org/qpsmtpd/branches/high_perf
High perf branch merge and fixes


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@496 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-11 19:10:49 +00:00
John Peacock
1f7ece38f2 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/trunk@491 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-10 10:56:55 +00:00
John Peacock
00c53652c9 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).


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@490 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-09 11:03:53 +00:00
Matt Sergeant
fac8cd7a30 TLS plugin
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@488 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-08 16:43:37 +00:00
Matt Sergeant
812771ad16 Don't use exists() on a method call.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@487 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-08 13:06:15 +00:00
Robert Spier
90daeb3786 r483@dog: rspier | 2005-07-06 21:17:00 -0700
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
2005-07-07 04:17:39 +00:00
Ask Bjørn Hansen
4f0c4d94a1 The unrecognized_command hook now understands the DENY_DISCONNECT return
and the DENY return is deprecated.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@473 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 21:52:45 +00:00
John Peacock
532ce30f64 Replace $ENV{RELAYCLIENT} with $connection->relay_client in last plugin.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@453 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-28 13:35:29 +00:00
Matt Sergeant
a4a62af847 Port to CONTINUATIONS style
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@449 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-23 12:27:38 +00:00
John Peacock
5b9f01b5e4 New AV plugin. Uses SOPHOS Antivirus via Sophie resident daemon.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@448 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-22 20:06:54 +00:00
Matt Sergeant
bc3f52a380 Push enable/disable read call into lib/Qpsmtpd.pm
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@445 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-22 18:25:16 +00:00
John Peacock
51b035ad62 Switch sense of adaptive logging. Immediately echo log lines <= max level
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
2005-06-22 14:42:09 +00:00
John Peacock
9664eb9469 Change remaining plugins to use LOGXXXX constants instead of bare numbers.
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
2005-06-22 14:08:57 +00:00
Matt Sergeant
cb047d9aa9 Timer support added to Danga::Socket
check_earlytalker updated to use timers
Few other code cleanups to make sure check-earlytalker is fully working


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@441 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-21 20:02:14 +00:00
Matt Sergeant
b906f67123 Ported to support Apache::Qpsmtpd
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@439 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-20 18:46:38 +00:00
Matt Sergeant
9ba9d68f72 check_loop plugin by Keith Ivey
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@438 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-20 14:56:36 +00:00
Matt Sergeant
a4517bdfa4 Continuation support
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@436 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-18 18:22:16 +00:00
Matt Sergeant
b323b33f60 More cleanup
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@433 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-15 20:34:34 +00:00
John Peacock
4360370e7e A new auth plugin by Gordon Rowell <gordonr@gormand.com.au>
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
2005-06-10 12:11:26 +00:00
John Peacock
8b50b6dd46 Two new plugins from Gordon Rowell <gordonr@gormand.com.au>
*   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
2005-06-09 16:36:43 +00:00
Matt Sergeant
9fbf25a708 More of the same.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@430 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-08 22:25:28 +00:00
Matt Sergeant
1f036fee90 Move the stats code purely into the plugin so that this can be extended
easier.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@429 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-08 22:24:00 +00:00
John Peacock
662003437d * qpsmtpd-forkserver
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
2005-05-25 20:07:58 +00:00
Matt Sergeant
8dad7435e5 Large number of patches from Brian Grossman to fix a number of bugs
Implement connection timeout


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@413 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-09 13:43:40 +00:00
Matt Sergeant
12d9fa8311 Fix deny incrementing to use proper variables
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@412 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-09 13:41:10 +00:00
Matt Sergeant
46cda05112 Much improved config server, especially the stats
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@410 958fd67b-6ff1-0310-b445-bb7760255be9
2005-04-28 21:38:43 +00:00
Matt Sergeant
a75f4a53e0 Fixes for early_talker under high_perf code
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@409 958fd67b-6ff1-0310-b445-bb7760255be9
2005-04-28 21:38:02 +00:00
John Peacock
270f9c9a70 * plugins/auth/auth_ldap_bind
Correct DECLINE to DECLINED


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@405 958fd67b-6ff1-0310-b445-bb7760255be9
2005-04-12 20:48:53 +00:00
John Peacock
58ded6369d * lib/Qpsmtpd/Auth.pm
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
2005-04-12 19:59:52 +00:00
John Peacock
1be0263025 * plugins/logging/adaptive
Skip empty log lines in both accept and reject case


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@403 958fd67b-6ff1-0310-b445-bb7760255be9
2005-04-06 18:34:02 +00:00
Matt Sergeant
bfe7e6cb63 Flat file auth plugin
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@402 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-30 20:50:34 +00:00
John Peacock
89fd516d8e Revamp Qpsmtpd::Constants so it is possible to retrieve the text
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
2005-03-29 20:15:53 +00:00
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
Ask Bjørn Hansen
aef508cb7b Don't check the HELO host for rfc-ignorant compliance (maybe this should be an option?)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@397 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-24 19:17:46 +00:00
Ask Bjørn Hansen
58f03e5787 tweaks to make it work with tcpserver
the check_earlytalker fix was entirely wrong


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@393 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-09 00:28:49 +00:00
Ask Bjørn Hansen
df1efdce73 use $self->can_read rather than $self->qp->can_read with high perf patch
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@392 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-09 00:20:32 +00:00
Matt Sergeant
93e0025aae Remove remnants of older name of this project :-)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@391 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-08 23:34:51 +00:00
Matt Sergeant
6495f41bb2 High perf versions of these plugins
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@389 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-08 22:58:09 +00:00
John Peacock
43f39a4538 * plugins/virus/clamdscan
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
2005-03-04 16:04:59 +00:00