Commit Graph

250 Commits

Author SHA1 Message Date
John Peacock
e6efda626f * lib/Qpsmtpd/Address.pm
Convert objects to hash.  Neuter parse() to wrapper around new().
    Add overload stringify to $obj->format().

* t/qpsmtpd-address.t
    Remove tests specific to parse().  Add test for overloaded "".

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@552 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-10 15:49:50 +00:00
John Peacock
b808a139cf * lib/Qpsmtpd/Transaction.pm
IO::File is buffering the message, so that the AV software doesn't get a
  a chance to scan anything when size_threshold > 0.

* qpsmtpd
  Apparently no one is running tcpserver any longer, since it wasn't loading
  the plugins anymore.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@550 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-23 19:16:37 +00:00
John Peacock
4b3fdf50bd * lib/Qpsmtpd.pm
By default, spool all messages to disk.

* config.sample/size_threshold
  Provide minimal explanation for how to avoid spooling small messages.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@549 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-22 17:29:13 +00:00
John Peacock
29ac60322e * lib/Qpsmtpd.pm
Rename config file from memory_threshold to size_threshold to track the
  internal usage.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@548 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-22 17:19:47 +00:00
John Peacock
9cbf206a4a * lib/Qpsmtpd/TcpServer.pm
Don't try to load the plugins if they are already loaded.

* lib/Qpsmtpd/Transaction.pm
  Get the size_threshold by inheritance.
  Extract the spooling of the body as a new sub.
  Always spool the body when calling body_filename().
  Compare the body_size to the cached size_threshold.

* lib/Qpsmtpd.pm
  Cache the size_threshold and provide an accessor method.

* qpsmtpd-forkserver
  Initialize both the spool_dir and size_threshold caches before forking.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@547 958fd67b-6ff1-0310-b445-bb7760255be9
2005-09-22 17:14:20 +00:00
Devin Carraway
6f23c46e93 Generalize '$include' support from plugin configuration to cover all config
calls.  Add circular-reference checking.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@537 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-31 05:54:36 +00:00
Devin Carraway
deb3380d06 Apply slight variation on patch from Peter Holzer to allow specification of
an explicit $QPSMTPD_CONFIG variable to specify where the config lives,
overriding $QMAIL/control and /var/qmail/control if set.  The usual "last
location with the file wins" rule still applies.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@529 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 08:05:42 +00:00
John Peacock
58f7129ada [merge from trunk] Use qmail/control/smtpdgreeting if it exists, otherwise
show the original qpsmtpd greeting (with version information).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@518 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-19 14:20:05 +00:00
Matt Sergeant
162cf7d132 Notice /var/qmail/control dir (Joe Schaefer)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@509 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-15 21:13:49 +00:00
John Peacock
3707751b42 This fixes the redefined warnings.
All plugins don't have register() any more, but they all have plugin_name().

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@505 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-14 11:05:11 +00:00
John Peacock
35f45f208b These changes to trunk were missed when 0.31 was branched.
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
2005-07-14 02:31:01 +00:00
Matt Sergeant
8c018d75ac Pass args to unrecognized_command
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@494 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-11 12:24:26 +00:00
Matt Sergeant
8a3c3c40b0 tls support
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@489 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-08 16:50:24 +00:00
Matt Sergeant
c78dad0a3b Revert to proper versions
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v031@481 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-07 20:10:03 +00:00
Matt Sergeant
a1324b5ddb Version 0.31 branch
git-svn-id: https://svn.perl.org/qpsmtpd/branches/v031@480 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-07 19:48:19 +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
254b4fd2b2 return 500 rather than 521 for DENY in the unrecognized_command hook
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@478 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 22:22:29 +00:00
Matt Sergeant
c3562e256d Allow DENY to be returned from unrecognised_command again
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@476 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 22:16:08 +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
Matt Sergeant
d48cd2e37e No idea what that was doing in there...
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@472 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 20:36:02 +00:00
Matt Sergeant
71f6fc1dff Fix plugin docs to reflect reality
Re-order plugin docs to appear in the order things generally get called
Fix SMTP.pm to reflect what's documented in README.plugins :-)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@471 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-06 20:30:14 +00:00
Ask Bjørn Hansen
df5a2e9d95 bump version to 0.31-dev
From: 	  hjp@hjp.at
	Subject: 	PATCH: Return 421 if we are going to disconnect
	Date: 	July 3, 2005 1:23:21 PM PDT
	To: 	  qpsmtpd@perl.org

RFC 2821 says we should return 421, if we disconnect, not 450 or 451.

	hp



git-svn-id: https://svn.perl.org/qpsmtpd/trunk@459 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-04 14:39:29 +00:00
Ask Bjørn Hansen
3b7bfe9bce update the MANIFEST
various small tweaks

the README really could use some updating; yikes!


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@457 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-02 02:08:37 +00:00
Ask Bjørn Hansen
9eda52cd2c update changes file for 0.30.
bump version number.

plan to release this on tuesday


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@455 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-02 00:20:21 +00:00
Matt Sergeant
b54c8ec46c Use flatten code instead of the over complex bucket manipulation
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@440 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-20 21:03:41 +00:00
Matt Sergeant
014efa87c4 Don't delete the buckets
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@437 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-18 18:58:30 +00:00
Matt Sergeant
8b85efcfe8 There's a hole in my bucket, dear Liza, dear Liza.
There's a hole in my bucket, dear Liza, a hole.

Go fix it, dear Henry, dear Henry, dear Henry.
Go fix it, dear Henry, dear Henry, fix it.

With what shall I fix it, dear Liza ... with what?
With a patch from Joe Schaefer, dear Henry ... with a patch.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@434 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-17 13:33:57 +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
25f2b302d7 Enforce stricture
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@427 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-25 16:36:14 +00:00
Matt Sergeant
26c40f989b Fix for in-memory code writing headers twice
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@423 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-20 12:39:29 +00:00
Ask Bjørn Hansen
6ca4bc388c Fix off-by-one line numbers in warnings from plugins (thanks to
Brian Grossman).

  update changes file with all (?) changes since 0.29


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@411 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-05 07:44:34 +00:00
John Peacock
a5b362f9ff * lib/Qpsmtpd.pm
Remove needless restriction on temp_file()


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@406 958fd67b-6ff1-0310-b445-bb7760255be9
2005-04-18 14:40:33 +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
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
Matt Sergeant
172fee0798 Fix for corruption problem under Apache
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@400 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-27 17:54:35 +00:00
John Peacock
f72647a44c * lib/Qpsmtpd.pm
(_load_plugins): split plugin_line using awk style "magic" whitespace


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@399 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-25 12:30:37 +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
Matt Sergeant
6ecc991a20 body_write patches from Brian Grossman
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@394 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-10 18:18:28 +00:00
Matt Sergeant
321622f0aa Store mail in memory up to a certain threshold (default 10k).
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@385 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-08 18:09:49 +00:00
Ask Bjørn Hansen
3c5d0d93e4 bump version number up
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@384 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-04 19:18:30 +00:00
Ask Bjørn Hansen
db546fe91c prepare 0.29
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@379 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-03 02:30:16 +00:00
John Peacock
ec7aff1415 * lib/Qpsmtpd.pm
Use package lexical to cache spool dir location instead of storing in
    Transaction or other high level object


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@376 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-01 14:33:26 +00:00
John Peacock
f82dffe5ce * lib/Qpsmtpd/SMTP.pm
Copy all lines of incoming message to spool file and keep track of
    where the body lines started (ease use of inplace scanning for
    viruses).

*   lib/Qpsmtpd/Transaction.pm
    New function body_start() to get/set the body in spool file
    Tweak body_resetpos() and body_getline() to use body_start instead of 0


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@375 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-01 14:31:25 +00:00
John Peacock
e503c04ed2 * lib/Qpsmtpd/SMTP.pm
Require a domain/address be given in HELO or EHLO command


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@374 958fd67b-6ff1-0310-b445-bb7760255be9
2005-02-25 16:18:08 +00:00
John Peacock
bb36c60b6a Abstracted spool_dir creation and added temp_file() and temp_dir() subs to
make it easier for plugins to manage temporary workspace.  Also add POD and
tests for the new functions.  Still need to add tests to the temp_*() calls
from a plugin.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@369 958fd67b-6ff1-0310-b445-bb7760255be9
2005-02-22 02:47:39 +00:00
Ask Bjørn Hansen
d0b9558ce9 APR::Bucket API changed...
From: peter[at]boku.net (Peter Eisch)
Message-ID: <BE3F8D10.1C451%peter[at]boku.net>
Subject: Apache::Qpsmptd.pm patch
Date: Mon, 21 Feb 2005 13:05:20 -0600


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@367 958fd67b-6ff1-0310-b445-bb7760255be9
2005-02-21 21:48:45 +00:00
John Peacock
31a8e7d438 Lets the data hook handle missing envelope sender/recipient,
then falls back to the builtin 503 response (Brian Gross)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@359 958fd67b-6ff1-0310-b445-bb7760255be9
2005-01-30 17:40:11 +00:00
Matt Sergeant
d26797c6d2 Make the original string available in the Connection notes
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@357 958fd67b-6ff1-0310-b445-bb7760255be9
2005-01-30 05:40:24 +00:00
John Peacock
c840a1d04f Changes by jpeacock@cpan.org (John Peacock)
o plugins/check_badmailfromto
    - New plugin in the style of check_badmailfrom, which matches a pair
      of FROM/TO and makes it seem like the recipient's address no longer
      exists (but only from the matching sender's point of view).  Useful
      for stalkers and other harassment cases.

o plugins/dns_whitelist_soft
    - New plugin to provide a DNS-based whitelist (good for distributed
      sites).

o various files
    - Replaced tab character with 8 spaces and adjusted line breaks for
      better readability.

Changes by mct@toren.net (Michael C. Toren)

o lib/Qpsmtpd/SMTP.pm

    - Assumes a MAIL FROM value of "<#@[]>" (utilized by qmail to
      indicate a null sender when generating a doublebounce message)
      is equivalent to "<>".  Previously qpsmtpd complained that the
      value could not be parsed.

    - Adds LOGIN to the default list of supported auth mechanisms.
      The documentation in Auth.pm indicated that auth-login was not
      currently supported due to lack of functionality, however I can
      confirm that LOGIN appears to work fine as tested by using msmtp
      (http://msmtp.sourceforge.net/).  Are there any indications that
      LOGIN support is actually broken in the current implementation?

    - Removes the "X-Qpsmtpd-Auth: True" header appended when a message
      has been sent by an authenticated user.  One problem with such a
      header is that it's impossible to say which SMTP hop added it,
      and it provides no information which could be used to backtrack
      the transaction.  I grepped through my mail archives a bit
      looking for how other MTAs handled the problem, and decided it
      would be best to place this information in the Received: header:

        Received: from remotehost (HELO remotehost) (192.168.42.42)
          (smtp-auth username foo, mechanism cram-md5)
          by mail.netisland.net (qpsmtpd/0.28) with ESMTP; <date>


o lib/Qpsmtpd/Auth.pm:

    - Documentation update for the arguments passed to an auth
      handler; previously the $mechanism argument was not mentioned,
      which threw off the argument offsets.

    - Documentation update for auth-login removing the warning
      that auth-login is not currently supported due to lack of
      functionality.

    - Fix to execute a generic auth hook when a more specific
      auth-$mechanism hook does not exist.  (Previously posted
      to the list last week.)

    - Upon authentication, sets $session->{_auth_user} and
      $session->{_auth_mechanism} so that SMTP.pm can include them
      in the Received: header.


o plugins/queue/qmail-queue

    - Added a timestamp and the qmail-queue qp identifier to the
      "Queued!" 250 message, for compatibility with qmail-smtpd, which
      can be very useful for tracking message delivery from machine to
      machine.  For example, the new 250 message might be:

        250 Queued! 1105927468 qp 3210 <1105927457@netisland.net>

      qmail-smtpd returns:

        250 ok 1106546213 qp 7129

      Additionally, for consistency angle brackets are placed around
      the Message-ID displayed in the 250 if they were missing in the
      message header.


o plugins/check_badmailfrom:

    - Changed the error message from "Mail from $bad not accepted
      here" to "sorry, your envelope sender is in my badmailfrom
      list", for compatibility with qmail-smtpd.  I didn't see any
      reason to share with the sender the value of $bad, especially
      for situations where the sender was rejected resulting from a
      wildcard.


o plugins/check_earlytalker:
o plugins/require_resolvable_fromhost:

    - No longer checks for earlytalkers or resolvable senders if the
      connection note "whitelistclient" is set, which is nice for
      helping backup MX hosts empty their queue faster.


o plugins/count_unrecognized_commands:

    - Return code changed from DENY_DISCONNECT, which isn't valid in
      an unrecognized_command hook, to DENY, which in this context
      drops the connection anyway.  (Previously posted to the list
      last week.)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@356 958fd67b-6ff1-0310-b445-bb7760255be9
2005-01-28 03:30:50 +00:00
Robert Spier
0a2fc866de - logging tweaks..
- move some things to more appropriate levels
   - make 'running plugin' more interesting


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@348 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-27 06:46:21 +00:00
Robert Spier
1670530a1a more logging
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@347 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-27 06:41:06 +00:00
Robert Spier
e10bb78cd3 - modify some comments about timeouts
- remove extraneous pid's from log messages


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@346 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-27 06:38:32 +00:00
Robert Spier
ebcb01a54f Subject: [PATCH] Use timeoutsmtpd as well as timeout
from Justin Erenkrantz and John Peacock


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@344 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-25 19:50:18 +00:00
Matt Sergeant
09531ad70c To balance out with the rcpt logging diff'd against the CVS version
(peter@boku.net)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@343 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-22 20:50:57 +00:00
Matt Sergeant
bfd609fb32 Fix timeout config warnings.
Fix alarm not being reset at end of while loop


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@342 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-19 08:44:24 +00:00
Matt Sergeant
4c44510191 Move plugin compile code into the Plugin module
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@341 958fd67b-6ff1-0310-b445-bb7760255be9
2004-11-18 19:47:10 +00:00
Matt Sergeant
e2bb53901d Connection handler for mod_perl/apache 2.0
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@334 958fd67b-6ff1-0310-b445-bb7760255be9
2004-10-12 07:39:04 +00:00
John Peacock
f6b01fb36b * lib/Qpsmtpd/Address.pm
Change subdomain regex to match single character subdomains
     (Robert Spier)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@332 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-24 18:56:35 +00:00
John Peacock
b5ef3d3add Couple of minor cleanups
*    lib/Qpsmtpd/Transaction.pm
     Forgot to nuke POD for deprecated relaying()

*    plugins/auth/auth_vpopmail_sql
     Log who actually AUTHenticated

*    plugins/virus/uvscan
     Don't need to unlink the file (Qpsmtpd will take care of it)
     Log the machine that did the actual Antivirus scanning


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@329 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-23 18:54:58 +00:00
John Peacock
03455aff9a Add username for AUTH success/failure log entry
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@328 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-23 16:14:56 +00:00
John Peacock
b9646eef75 Remove the $transaction->relaying() code completely
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@327 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-23 13:51:09 +00:00
John Peacock
f92e99bd9c * plugins/check_relay
*   plugins/rcpt_ok
    Split check_relay into two plugins

*   config/plugins
    Reorder plugins to take advantage of the new check_relay

*   lib/Qpsmtpd/Connection.pm
    Add support for relay_client() method

*   lib/Qpsmtpd/SMTP.pm
    Copy connection relay settings to transaction object when created

*   lib/Qpsmtpd/Auth.pm
    Use the connection->relay_client() instead of setting an env var


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@326 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-22 16:01:16 +00:00
Matt Sergeant
11c12711ee Fix deny plugin which stopped working.
Call deny plugin for _DISCONNECT constants.
Make Plugin.pm %hooks a global rather than lexical so we can do evil things later.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@320 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-19 18:49:05 +00:00
Matt Sergeant
d86da9f944 Make recipients a setter too
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@319 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-16 10:46:38 +00:00
Matt Sergeant
8c37005161 Use a method for getting a line, so we can subclass it.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@316 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-14 05:48:39 +00:00
Matt Sergeant
9224e436bb Plugin testing framework.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@313 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-08 16:26:33 +00:00
Robert Spier
0b16ec9418 plugin wrapping:
replace wrap_plugin implementation with
  isa_plugin inheritance based implementation


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@312 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-08 05:14:10 +00:00
Robert Spier
fb3f0b4604 Matt says wipe it!
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@311 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-07 15:08:26 +00:00
Robert Spier
fd1cf0b9b0 Qpsmtpd::TCPServer will handle calling load_plugins. We *really* only
want to call it once per process.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@310 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-07 05:50:36 +00:00
Robert Spier
ec5e23a28a Allow for multiple instances of a single plugin by using plugin:0
notation


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@308 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-07 05:35:16 +00:00
Robert Spier
96d66b8d46 Add the wrap_plugin function to allow for plugin wrapping
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@307 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-07 05:07:20 +00:00
Robert Spier
4d4baac96e Nick Leverton noticed I left out a very important 'ref'. Thanks Nick!
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@306 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-06 17:36:57 +00:00
Matt Sergeant
606519b06c Fix for hooks not running with previous patch, caused by qpsmtpd objects not
asking each plugin to register. There is slightly more overhead this way,
but it feels more correct, and we can fix the overhead later in a more clean
way.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@300 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-05 16:28:08 +00:00
Robert Spier
ee1017a1a4 VRFY plugin support
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@298 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-05 04:30:21 +00:00
Robert Spier
5128bd0718 new plugin output tracking
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@296 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-04 03:16:10 +00:00
Robert Spier
bdd20fed4d indentation and whitespace cleanup
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@295 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-04 00:57:16 +00:00
Robert Spier
e8bf8286fc reindent undef check
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@294 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-04 00:51:02 +00:00
Matt Sergeant
9d94f4d96a Pass extra "stuff" to HELO/EHLO callbacks
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@293 958fd67b-6ff1-0310-b445-bb7760255be9
2004-09-01 05:56:52 +00:00
Matt Sergeant
e6e2091ee0 Attempt to clean up circular refs problems
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@292 958fd67b-6ff1-0310-b445-bb7760255be9
2004-08-31 01:58:57 +00:00
Robert Spier
e1785b1923 More accessors
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@290 958fd67b-6ff1-0310-b445-bb7760255be9
2004-08-29 07:53:15 +00:00
Devin Carraway
15c90f04fa Log the connecting client hostname/address, rather than waiting for the
SMTP greeting.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@283 958fd67b-6ff1-0310-b445-bb7760255be9
2004-08-01 06:56:33 +00:00
Matt Sergeant
a204827d0c Fix for AUTH PLAIN from Michael Holzt <kju@fqdn.org>
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@280 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-29 14:40:32 +00:00
Ask Bjørn Hansen
42719a179f support NULL envelopes again (doh, typo of the week :-) )
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@278 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-20 12:46:20 +00:00
Ask Bjørn Hansen
e27534048c Improve error messages from the Postfix module (Erik I. Bols�,
<knan at mo.himolde.no>)

make the maildir plugin record who the message was to (needs some improvements
still)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@277 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-19 11:08:15 +00:00
Ask Bjørn Hansen
a979f8344f fix the CDB support so we can work without it (but with a big warning)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@275 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-18 11:02:08 +00:00
Ask Bjørn Hansen
b9dca51d2a fix minor warning introduced with the data hook
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@270 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-16 09:44:39 +00:00
Matt Sergeant
c60710e871 Add a hook for the DATA command
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@269 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-16 07:27:26 +00:00
Robert Spier
de9a7fa02a Message-ID: <40F6EB78.1010107@rowman.com>
From: John Peacock <jpeacock@rowman.com>

Yeah, I was just noticing how odd it was that FROM was always logged
but TO wasn't logged at all.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@268 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-16 05:06:43 +00:00
Robert Spier
bd8cfde4c1 From: John Peacock <jpeacock@rowman.com>
To: qpsmtpd@perl.org
Subject: [PATCH] Another helper function to Qsmtpd::Transaction
Message-ID: <20040714143407.32740.qmail@onion.perl.org>
Date: Wed, 14 Jul 2004 10:34:25 -0400

The AV scanner plugin I am currently using (uvscan) requires the
attached patch so that it can scan the existing temp file, rather than
making a copy just for the scan.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@267 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-16 05:04:25 +00:00
Ask Bjørn Hansen
f31e4b1b6b 100% test coverage of Qpsmtpd::Address
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@265 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-16 02:51:39 +00:00
Ask Bjørn Hansen
86c887fd59 take out spurious warning
improve address parsing a bit to make it easier to add parsing of MAIL
FROM extensions


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@263 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-16 02:22:11 +00:00
Ask Bjørn Hansen
db15fbf9ad add the Qpsmtpd::Address module (oops!)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@262 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-15 22:52:53 +00:00
Ask Bjørn Hansen
87323ed62e Mail::Address does RFC822 addresses, we need SMTP addresses.
Replace Mail::Address with Peter J. Holzer's Qpsmtpd::Address module.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@261 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-14 23:58:47 +00:00
Matt Sergeant
fd8fcde7c0 Don't allow AUTH under HELO (rfc 821) connections
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@258 958fd67b-6ff1-0310-b445-bb7760255be9
2004-07-05 09:24:59 +00:00
Matt Sergeant
011f44e11d Auth changes (John Peacock with minor modifications by baud)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@252 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-29 21:45:35 +00:00
Devin Carraway
ae24115d06 When spool_dir has improper permissions, mention what spool_dir is set to.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@250 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-28 00:00:51 +00:00
Devin Carraway
0f35f241b7 When creation of spool_dir fails, report what dir it was trying to make.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@249 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-27 23:39:32 +00:00
Matt Sergeant
8d07a36fcc Add a relaying() method to the transaction
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@247 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-16 20:28:57 +00:00
Robert Spier
ac9dd50928 DENY_DISCONNECT and DENYSOFT_DISCONNECT instead of *HARD
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@245 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-14 22:25:52 +00:00
Matt Sergeant
0e5b4e63ec Add unshift parameter to register_hook, allowing you to put the hook at the
start of the queue


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@244 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-11 20:01:17 +00:00