Commit Graph

529 Commits

Author SHA1 Message Date
Matt Sergeant
b1c9101bfa A few pollserver bug fixes
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@726 958fd67b-6ff1-0310-b445-bb7760255be9
2007-03-19 21:13:17 +00:00
Ask Bjørn Hansen
e6ee4c486b Correct header parsing of "space only" lines (Joerg Meyer)
(issue #11 - http://code.google.com/p/smtpd/issues/detail?id=11 )


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@722 958fd67b-6ff1-0310-b445-bb7760255be9
2007-03-15 06:13:18 +00:00
John Peacock
76d3fe44db Correct way to support check_earlytalker with PollServer.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@712 958fd67b-6ff1-0310-b445-bb7760255be9
2007-02-07 22:25:44 +00:00
John Peacock
fea300ed2e Add authenticated method to base Qpsmtpd object.
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
2007-02-07 21:49:45 +00:00
Matt Sergeant
30a1c71efc More qpsmtpd-async merges
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@707 958fd67b-6ff1-0310-b445-bb7760255be9
2007-02-02 23:47:26 +00:00
Matt Sergeant
be67f02dd8 Fix tests (idea from Guy Hulbert, with tweak from me).
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@706 958fd67b-6ff1-0310-b445-bb7760255be9
2007-01-11 23:52:51 +00:00
Robert Spier
02edd1a32a mct noticed that we weren't properly testing for ESMTP.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@704 958fd67b-6ff1-0310-b445-bb7760255be9
2007-01-06 20:22:01 +00:00
Robert Spier
a30506e9b6 RFC3848 support for ESMTP.
Heavily based on:
From: Nick Leverton <nj@leverton.org>
To: qpsmtpd@perl.org
Subject: SMTPA
Date: Thu, 4 Jan 2007 12:08:16 +0000
Message-Id: <200701041208.17018@leverton.icritical.com>



git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@703 958fd67b-6ff1-0310-b445-bb7760255be9
2007-01-06 06:58:08 +00:00
Hanno Hecker
d54a960f9a undo r700 (skip plugin)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@701 958fd67b-6ff1-0310-b445-bb7760255be9
2007-01-01 12:47:46 +00:00
Hanno Hecker
39a9271213 New "skip plugin API" + example plugin skip_plugins, see perldoc
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
2006-12-31 11:07:32 +00:00
Hanno Hecker
6eefa97016 some fixes from Michael C. Toren:
- Treat DENY(|SOFT)_DISCONNECT from connect hooks the same as DENY(|SOFT)
 - only append ESMTP to smtpgreeting if it's not already in there
 - Qpsmtpd::SMTP::fault(): parsing now unambigous and just first "word" of $0
see also http://www.nntp.perl.org/group/perl.qpsmtpd/5905


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@699 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-25 10:12:54 +00:00
Hanno Hecker
ad541f6207 Qpsmtpd::Transaction: add body_fh(), body_length() and data_size(),
depreceated body_size()


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@689 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-16 11:56:48 +00:00
Peter J. Holzer
469c01a1f4 Increased log level of SMTP commands and responses to LOGINFO.
These may be useful during normal operations.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@685 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-16 10:01:50 +00:00
Peter J. Holzer
c581b10628 Reduce the log level of the "running plugin" message to LOGDEBUG.
The mere fact that a plugin was called is only useful for debugging.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@684 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-16 09:56:09 +00:00
Peter J. Holzer
d2c79e9736 Added support for (x)inetd.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@681 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-16 09:30:32 +00:00
Matt Sergeant
5fea527ba4 Remove debug print
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@680 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-08 20:55:47 +00:00
Matt Sergeant
2b709d664c Async qpsmtpd (still entirely compatible with non-async version)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@679 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-08 19:46:18 +00:00
Matt Sergeant
0449fbfb50 Fix a showstopper of a bug in Command.pm which meant all commands would be parsed wrong
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@678 958fd67b-6ff1-0310-b445-bb7760255be9
2006-12-08 19:37:47 +00:00
Matt Sergeant
e299135526 Initial work for continuations (and thus the async server).
(intention is to check bits in that don't break anything, so we can
always return to a stable base)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@676 958fd67b-6ff1-0310-b445-bb7760255be9
2006-11-30 22:10:55 +00:00
John Peacock
b7f468404b Fixup qpsmtpd-prefork, et al, to correctly load Constants.
Make child process pretty name optional for qpsmtpd-prefork.
Ignore rather than crash for uninstalled plugins.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@675 958fd67b-6ff1-0310-b445-bb7760255be9
2006-11-22 16:30:37 +00:00
Devin Carraway
ecb24ef131 Fix use of the default plugin dir path in the logging startup when no
plugin_dir is configured.  Slightly worsens duplication of code with
plugin_dir() to continue avoiding infinite recursion.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@674 958fd67b-6ff1-0310-b445-bb7760255be9
2006-11-08 10:25:45 +00:00
Devin Carraway
af5f025b51 (Working) support for multiple plugin directories, with a fix from Nick
Leverton <nj|@|leverton.org>.  The inner _load_plugins() routine is changed to
load only a single plugin given a search path, and the (two) calls to it pass
in the configured list of plugin dirs.  The non-module case of _load_plugin()
simply loops on the plugin dir list until a matching plugin file is found;
the first match stops the search for that plugin, regardless of success or
failure in loading it.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@671 958fd67b-6ff1-0310-b445-bb7760255be9
2006-11-05 09:54:03 +00:00
John Peacock
0786b60699 Script to generate Qpsmtpd::Postfix::Constants from the Postfix source.
From Hanno Hecker (tweaks by John Peacock).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@669 958fd67b-6ff1-0310-b445-bb7760255be9
2006-11-01 02:28:41 +00:00
John Peacock
86e202d19e Add program to extract Postfix constants from source files and generate
Qpsmtpd::Postfix::Constants (to be used by postfix-queue).
Patch by Hanno Hecker.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@668 958fd67b-6ff1-0310-b445-bb7760255be9
2006-11-01 02:08:30 +00:00
John Peacock
6c3dc88f37 Buffer output of Qpsmtpd::TcpServer::respond() for broken clients who don't
follow RFC's for multiline responses.
Patch from Brian Szymanski <ski-qpsmtpd@allafrica.com>

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@664 958fd67b-6ff1-0310-b445-bb7760255be9
2006-10-04 13:49:49 +00:00
John Peacock
a7a3031440 OK, really, this time the capitalization for AUTH mechanisms is correct.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@662 958fd67b-6ff1-0310-b445-bb7760255be9
2006-09-24 14:55:48 +00:00
John Peacock
9028958307 Fix careless capitalization error
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@661 958fd67b-6ff1-0310-b445-bb7760255be9
2006-09-24 00:53:01 +00:00
John Peacock
d218bfea82 Correctly handle the case where a given AUTH mechanism is requested by a
[stupid] MUA, but isn't implemented with existing auth plugins.  Based on
patch from Brian Szymanski.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@660 958fd67b-6ff1-0310-b445-bb7760255be9
2006-09-22 15:31:28 +00:00
John Peacock
3837fabc9f Ask and ye shall receive
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@659 958fd67b-6ff1-0310-b445-bb7760255be9
2006-09-14 19:48:37 +00:00
Matt Sergeant
6a8111b6f6 Removed - CPAN version now very much up to date with this
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@658 958fd67b-6ff1-0310-b445-bb7760255be9
2006-08-29 16:51:34 +00:00
Ask Bjørn Hansen
6ef0bf27c7 r4175@embla: ask | 2006-08-28 01:17:10 +0200
Experimental IPv6 support (forkserver only). (Mike Williams)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@657 958fd67b-6ff1-0310-b445-bb7760255be9
2006-08-27 23:17:33 +00:00
Matt Sergeant
b000e35bf9 More fields work
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@649 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-28 23:27:40 +00:00
Ask Bjørn Hansen
bf2419df33 r3744@embla: ask | 2006-06-28 13:04:50 -0700
Support "module" plugins ("My::Plugin" in the config/plugins file)
 


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@648 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-28 20:05:04 +00:00
Matt Sergeant
bcbe52f2f8 stats plugin doesn't have a register() function any more (Brian Grossman)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@646 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-27 20:28:36 +00:00
John Peacock
25d9fe85a8 Two patches from Robin Johnson:
Add SSL encryption method to FROM: header line.
Add new tls_before_auth configuration to hide AUTH until TLS is established.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@645 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-22 14:48:48 +00:00
Matt Sergeant
5ff2ef7cac fields patch from Brian Grossman
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@644 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-20 14:39:52 +00:00
Matt Sergeant
f31d18c6cd Simplify qpsmtpd script (remove inetd and forking server)
Greatly simplify Danga::Client due to no more need for line mode client
Update to latest Danga::Socket
Fix check_earlytalker to use new API
Fix Danga::DNS to use new API


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@643 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-20 13:51:32 +00:00
Ask Bjørn Hansen
b3bc12e587 r3599@embla: ask | 2006-06-15 17:15:06 -0700
Fix "help" command when there's no "smtpgreeting" configured (the default)
   (Thanks to Thomas Ogrisegg)
 


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@642 958fd67b-6ff1-0310-b445-bb7760255be9
2006-06-16 00:15:03 +00:00
John Peacock
67dc86e255 New pre-forking qpsmtpd daemon, courtesy of Lars Roland at SoftScan.
Initial load with minor tweaks by John Peacock.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@639 958fd67b-6ff1-0310-b445-bb7760255be9
2006-05-31 20:54:03 +00:00
John Peacock
508be70d26 ne is for strings, != is for numbers (Leonardo Helman)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@636 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-26 15:31:03 +00:00
John Peacock
af93447e78 Redo AUTH PLAIN and AUTH LOGIN correctly(?) this time. (Michael Holzt)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@634 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-24 15:48:24 +00:00
John Peacock
ff4e92bb4e Resolve ticket #38806 (Inadequate validation of authentication data)
Charlie Brady.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@633 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-07 19:21:10 +00:00
John Peacock
7c6cbdd000 Move the Qpsmtpd::Auth POD to a top-level README to be more obvious.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@632 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-07 19:06:39 +00:00
John Peacock
8fcb46177b Add Qpsmtpd::Command to gather all parsing logic in one place (Hanno
Hecker)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@631 958fd67b-6ff1-0310-b445-bb7760255be9
2006-04-07 18:58:02 +00:00
John Peacock
b89a6d9e4c * plugins/queue/smtp-forward
s/register/init/ to match new plugin style (jpeacock)

* lib/Qpsmtpd/Address.pm
  t/qpsmtpd-address.t
    Ill-formed addresses should return null not partial garbage.
    Resolves https://rt.perl.org/rt3/Ticket/Display.html?id=38746
    Patch by Hanno Hecker.

* plugins/virus/clamav
    Clamav alternate config file.
    Resolves https://rt.perl.org/rt3/Ticket/Display.html?id=38736
    Patch by Robin Bowes.

* lib/Qpsmtpd/SMTP.pm
  lib/Qpsmtpd.pm
    Return multiline responses from plugins.
    Resolves https://rt.perl.org/rt3/Ticket/Display.html?id=38741
    Patch by Charlie Brady.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@630 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-20 16:47:05 +00:00
John Peacock
3aa64debd8 remove way too agressive blocking of DENY'd servers
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@628 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-06 21:33:46 +00:00
John Peacock
bd19ded5a2 Need to cover situation where there are *no* hooks. Should we actually return
OK from run_hooks() in the case where no hooks are there to fire?

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@627 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-01 17:25:51 +00:00
John Peacock
82a32ed558 Automatically disconnect DENY'd server if it doesn't go willingly.
Implement queue_pre and queue_post hooks.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@626 958fd67b-6ff1-0310-b445-bb7760255be9
2006-03-01 16:46:55 +00:00
Ask Bjørn Hansen
3f8ab06a36 r4523@g5: ask | 2006-02-27 13:42:54 -0800
Improve Qpsmtpd::Transaction documentation (Fred Moyer)


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@622 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-27 21:43:08 +00:00
Ask Bjørn Hansen
351f0b7f7f r4521@g5: ask | 2006-02-27 13:41:09 -0800
set the version to 0.33-dev


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@620 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-27 21:43:00 +00:00
Ask Bjørn Hansen
d8d7b7a407 r4445@g5: ask | 2006-02-17 11:00:12 -0800
prepare for 0.32 -- plan release for next thursday
 r4446@g5:  ask | 2006-02-17 11:00:48 -0800
 tag 0.32rc1


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@615 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-17 19:02:02 +00:00
John Peacock
3574e75cd1 Better handling of <> in address comparisons
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@614 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-07 18:42:16 +00:00
John Peacock
6f145149ae Apparently, I never tested TLS and AUTH at the same time. It turns out
that you have to explicitely read from <STDIN> in order for IO::Socket::SSL
to correctly translate the data (i.e. reading from <> isn't sufficient).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@612 958fd67b-6ff1-0310-b445-bb7760255be9
2006-02-07 02:03:00 +00:00
John Peacock
347e5d328f Oops, forgot to remove all traces of Qmsptmd::Auth while I was at it.
Also made auth_vpopmail_sql be quieter about problems authenticating.

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@607 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-27 17:16:13 +00:00
John Peacock
29d739b009 Rename Qpsmtpd::Auth to README.authentication.
Replace tabs with spaces in a few plugins.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@606 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-26 21:36:34 +00:00
John Peacock
654179e8c8 Working AUTH support in PollServer mode. All AUTH code moved to
SMTP.pm (the Auth.pm POD will get renamed to README.authentication).


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@605 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-26 21:31:05 +00:00
John Peacock
1d0f889d3c Support for RFC 1893 - Enhanced Mail System Status Codes
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
2006-01-25 02:59:31 +00:00
John Peacock
d228f9c11d this patch enables the configurable flags for the postfix-queue plugin.
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
2006-01-11 16:48:08 +00:00
John Peacock
c0920346e5 the pre-connection and post-connection hooks are not working in
qpsmtpd-forkserver. This patch merges Peter's patch (with the possibilty
to DENY/DENSOFT the connection) and my first attempt. The --max-from-ip
check was moved from core to the hosts_allow plugin. 

Patch by: Hanno Hecker <hah@uu-x.de>

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@599 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-11 16:21:08 +00:00
John Peacock
7c1c9ef01b Fix problems with tls and relay_client.
Merge r597 from branches/0.3x

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@598 958fd67b-6ff1-0310-b445-bb7760255be9
2006-01-05 02:21:32 +00:00
John Peacock
bfcd620a83 Fix problems with tls and relay_client.
* 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
2006-01-05 02:12:46 +00:00
Matt Sergeant
1c2009764f Don't trap $self in the closure (causes circular refs and never gets freed)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@596 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-31 14:53:50 +00:00
Matt Sergeant
99e0455fa4 Fix long standing bug of returning 1 not DONE
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@594 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-30 19:49:38 +00:00
Matt Sergeant
67a6787625 Get alarm/timeout from a param
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@593 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-30 19:46:33 +00:00
Matt Sergeant
9c8df69be1 Fix caching bug with PTR records
Attempt to fix callback occurring immediately by calling it via AddTimer


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@590 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-30 19:35:10 +00:00
John Peacock
7cc114edd5 Eliminate the creeping use of warn() in favor of log() and make
more use of the "fd:#" code everywhere.

* lib/Qpsmtpd.pm
    Default log method use '$self->fd()' instead of '$self->{fd}'.
    Include a sub fd() method for inheritance purposes.

* lib/Qpsmtpd/PollServer.pm
    Inherit log() from Qpsmtpd.pm (via SMTP.pm).

* lib/Qpsmtpd/Plugin.pm
    Appropriate code allow plugins to inherit fd().

* plugins/dnsbl
    Use log() instead of warn().

* plugins/logging/adaptive
  plugins/logging/warn
    Include the 'fd:#' to the log line if defined.

* qpsmtpd
    Reorder things slightly so we can use log().

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@589 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-30 17:03:14 +00:00
John Peacock
2535e77293 Merge branches/0.3x back to trunk.
Too many individual changes to document.  Trust me... ;-)

Lightly tested (i.e. it accepts and delivers mail with minimal plugins).

NOTES/LIMITATIONS: 
logging/adaptive currently eats some log messages.
auth_vpopmail_sql is currently broken (needs continuations?).
'make test' fails in dnsbl (no Test::Qpsmtpd::input_sock() method).


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@588 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-22 21:30:53 +00:00
Matt Sergeant
5910aa7292 Fix log bustage ($coworker)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@586 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-14 01:21:20 +00:00
Matt Sergeant
cc45e9a576 Prevent logging plugins from entering an infinite loop (use {_transaction}
rather than ->transaction() when passing to hook)
Merge some other changes from 0.31.1 branch


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@582 958fd67b-6ff1-0310-b445-bb7760255be9
2005-12-02 02:35:14 +00:00
Matt Sergeant
dfe9dda454 Don't run continuation if config
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@579 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-22 23:22:48 +00:00
Matt Sergeant
f5efe92bea Forgot pseudo hash entry
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@578 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-22 23:04:06 +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
Ask Bjørn Hansen
27975f5cee r6471@embla: ask | 2005-11-18 01:37:48 -0800
version 0.31.1


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@574 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-18 09:43:01 +00:00
Matt Sergeant
8454ed40bc With PollServer, I get several unrecognized commands before the disconnect
from plugins/count_unrecognized_commands kicks in.

Several buffered lines are read and processed by
Danga::Client::process_read_buf() without checking if the socket was
closed.  The attached patch seems to fix it.
-- Brian Grossman


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@571 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-16 15:04:37 +00:00
Ask Bjørn Hansen
440068cf5c Update Changes file
Fix typo in README.plugins

prepare for 0.31 to be released wednesday


git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@564 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-14 09:05:46 +00:00
Matt Sergeant
a46a0345d5 Fix for removed pseudo hash
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@563 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-13 23:46:03 +00:00
Matt Sergeant
a405e64e1c Allow any type of query
Refactor some repeated code


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@561 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-11 14:28:47 +00:00
John Peacock
8a18bb00a1 * lib/Qpsmtpd/Address.pm
RFC-2821 Section 4.5.1 specifically requires <postmaster> (without
    domain name) as a legal RCPT TO: address.

* t/qpsmtpd-address.t
    Test the above.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@560 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-08 18:18:02 +00:00
John Peacock
37ec3b151e * lib/Qpsmtpd/Address.pm
Add POD to describe how to use the objects.  Make the addr_cmp 
    method private (no need to expose it).

* t/qpsmtpd-address.t
    Include tests of overloaded comparison, including sorting.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@559 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-02 18:48:32 +00:00
John Peacock
3b09cc25d7 * lib/Qpsmtpd/Address.pm
Don't overload '<=>' operator casually.  Swap host/user portion
    when comparing (makes it easy to sort by domain).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@558 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-01 15:14:48 +00:00
John Peacock
7bc7916bda * lib/Qpsmtpd/Address.pm
Since we are already overloading stringify, we might as well
    overload comparisons as well (this may be too simplistic a test).

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@557 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-31 17:51:11 +00:00
John Peacock
5959cc1c32 * lib/Qpsmtpd/Auth.pm
lib/Qpsmtpd/SMTP.pm
    Take the AUTH method and put it in SMTP.pm where it belongs.

* lib/Qpsmtpd.pm
  lib/Qpsmtpd/Plugin.pm
    Expose the auth_user/auth_mechanism property to plugin writers.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@556 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-31 17:12:37 +00:00
Matt Sergeant
0a397e74a9 Support all resolvers in resolv.conf, and issue retries on errors the same
way gethostbyname() does.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@555 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-26 19:09:04 +00:00
John Peacock
e67bbed2ac * lib/Qpsmtpd/Transaction.pm
Doh!  I should flush() not close(), since other code assume the handle
    is still active.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@554 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-20 18:47:28 +00:00
John Peacock
a8b6956d81 * lib/Qpsmtpd/Transaction.pm
Fix fairly egregious error.  If the size_threashold is smaller than
    the body while writing, the file handle would be closed prematurely.
    Ouch.  I don't like it here from a stylistic point of view, but at 
    least it will actually work now.

git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@553 958fd67b-6ff1-0310-b445-bb7760255be9
2005-10-20 02:10:32 +00:00
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
4a6f5dd2f0 Merge r529 from 0.31 branch (explicit config dir via $QPSMTPD_CONFIG).
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@539 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-31 08:48:04 +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
Matt Sergeant
9d6faa39cb Migrate transaction(), reset_transaction() and connection() up to Qpsmtpd.pm
Minor bug fix for auth capability


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@533 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-29 18:05:08 +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
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
Matt Sergeant
006f129c21 Merge in a bunch of changes from Bradfitz's Danga::Socket 1.40-1.43
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@519 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-19 15:37:14 +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
John Peacock
43aef48532 Correctly handle the case where smtpgreeting exists (append ESMTP) as well as
the case where it doesn't (display original Qpsmtpd greeting). 

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@511 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-18 00:36:49 +00:00
Matt Sergeant
e8a9828e4e Notice /var/qmail/control dir (Joe Schaefer)
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@510 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-15 21:15:44 +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
3096164159 Support smtpgreeting file from qmail/control
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@508 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-15 10:35:23 +00:00
Matt Sergeant
2ca6e9d192 MERGE 503:505 FROM https://svn.perl.org/qpsmtpd/branches/0.31
Fix test failures due to hook renames
Fix redefined warnings due to hook renames


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@507 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-14 13:31:07 +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
54cff7af40 When setting OtherFds, always make it an addition to what's already set
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@498 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-12 20:40:32 +00:00
Matt Sergeant
e407e8b470 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@497 958fd67b-6ff1-0310-b445-bb7760255be9
2005-07-11 19:11:11 +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
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
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
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
1f98f22376 Fix for when pipelining occurs we need to shift the pre-read data back onto
the socket and let the socket loop come back to this socket's data later.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@451 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-23 21:11:54 +00:00
Matt Sergeant
a268ec079a Make _respond methods work when only one value is returned
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@450 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-23 21:05:44 +00:00
Matt Sergeant
6047477c11 Get rid of horrible ticker() stuff and replace with AddTimer calls
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@447 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-22 19:40:57 +00:00
Matt Sergeant
be6b0e203c Fix a number of duh's in new code
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@446 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-22 18:56:58 +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
Matt Sergeant
5853c3a011 Cleanup Timer code
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@444 958fd67b-6ff1-0310-b445-bb7760255be9
2005-06-22 18:24:34 +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
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
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
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
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
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
42e49d493a Don't set an alarm if in connect mode.
Make fault() not return anything otherwise we get a "1" output in the stream


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@426 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-23 14:17:43 +00:00
Matt Sergeant
56451a722f First, since EventLoop goes off and does other things, any PostLoopCallback
can signal "our" EventLoop to return.  To ensure we wait the full time, we
must loop around until the end condition is truly satisfied.



git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@425 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-23 13:06:08 +00:00
Matt Sergeant
3b9c5b69fd Move PLC managment into close() and call close() in DESTROY
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@424 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-23 12:59:57 +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
Matt Sergeant
ec9ddc09d2 Fix for in-memory code copying headers twice
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@422 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-20 12:39:05 +00:00
Matt Sergeant
62aebd2a3e Make number of accepts we perform lower if MAXCONNIP is used
Make connection hook get called after we do all the accept()s


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@420 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-17 11:48:02 +00:00
Matt Sergeant
e3a5d6c3c6 Make post loop callbacks a local var so we don't have to iterate through as
much


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@419 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-12 23:04:53 +00:00
Matt Sergeant
37c96a1773 Cache the hooks
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@418 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-12 22:08:37 +00:00
Matt Sergeant
e743c5903c Cache the peer_ip
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@417 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-12 22:08:20 +00:00
Matt Sergeant
c0c5078f82 Fix warning
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@416 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-12 12:58:13 +00:00
Matt Sergeant
726128aef6 Fixed typo in post_loop_callback name
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@414 958fd67b-6ff1-0310-b445-bb7760255be9
2005-05-09 13:49:40 +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
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
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
cefae57394 Call PostEventLoop at end of Epoll event loop (same as poll() and kqueue)
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@408 958fd67b-6ff1-0310-b445-bb7760255be9
2005-04-28 21:37:01 +00:00
Matt Sergeant
536e1723c1 Added rudimentary configuration server when running in non-forking poll mode
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@407 958fd67b-6ff1-0310-b445-bb7760255be9
2005-04-26 02:46:45 +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
ed4e06bcd2 Fix timeout code kicking in when PTR result is blank domain
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@396 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-11 20:09:30 +00:00
Matt Sergeant
41e13e7454 body_write patches from Brian Grossman
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@395 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-10 18:19:27 +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
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
Matt Sergeant
8588a066d2 Fix strictness
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@390 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-08 23:32:25 +00:00
Matt Sergeant
b5b3950ef9 Main initial work on poll server.
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@388 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-08 22:52:23 +00:00
Matt Sergeant
3922235bcf Import Danga libraries. This is a bit evil but we'll just have to track them
from the Danga project. This way we get something stable that we know works,
plus nobody has to go and track down other libraries.

Note that only Danga::Socket is (C) Danga. Everything else is original code
and (C) Matt Sergeant.


git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@387 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-08 19:59:45 +00:00
Matt Sergeant
12ae226ad7 high performance branch
git-svn-id: https://svn.perl.org/qpsmtpd/branches/high_perf@386 958fd67b-6ff1-0310-b445-bb7760255be9
2005-03-08 19:56:15 +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
Robert Spier
b2b7602d32 must export variable
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@242 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-11 06:12:16 +00:00
Robert Spier
971b696ffa forgot another place to put DENYSOFTHARD
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@241 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-11 06:11:27 +00:00
Robert Spier
48d753ca25 add DENYSOFTHARD status
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@240 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-11 06:06:30 +00:00
Matt Sergeant
2892df687a Cleanup docs to look nicer under perldoc
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@238 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-07 18:48:52 +00:00
Matt Sergeant
4375b45289 Docs
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@237 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-07 18:48:13 +00:00
Ask Bjørn Hansen
3db688e52c 0.28
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@235 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-05 10:09:30 +00:00
Ask Bjørn Hansen
a9f0538bcc Don't keep adding ip addresses to the process status line ($0) when running under PPerl.
Include the date and time the session started in the process status line.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@233 958fd67b-6ff1-0310-b445-bb7760255be9
2004-06-05 10:06:44 +00:00
Ask Bjørn Hansen
bbc36670f7 + Create temp files with permissions 0600 (thanks to Robert James Kaes again)
+
+  Fix warning in check_badrcptto plugin (Thanks to Robert James Kaes)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@230 958fd67b-6ff1-0310-b445-bb7760255be9
2004-04-21 12:42:45 +00:00
Matt Sergeant
3d2feb8953 Forgot to add in Constants here for logging
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@226 958fd67b-6ff1-0310-b445-bb7760255be9
2004-03-14 22:35:51 +00:00
Matt Sergeant
9c700b18e1 New for 0.28: Log levels and $Include for config/plugins
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@217 958fd67b-6ff1-0310-b445-bb7760255be9
2004-03-05 12:46:24 +00:00
Ask Bjørn Hansen
f59721ed1b start on 0.28-dev ...
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@216 958fd67b-6ff1-0310-b445-bb7760255be9
2004-03-05 09:26:36 +00:00
Ask Bjørn Hansen
6e3ebe8ea3 0.27.0
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@214 958fd67b-6ff1-0310-b445-bb7760255be9
2004-03-05 09:17:38 +00:00
Ask Bjørn Hansen
22523ead2d reject bare carriage-returns in addition to the bare line-feeds
(based on a patch from Robert James Kaes, thanks!)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@209 958fd67b-6ff1-0310-b445-bb7760255be9
2004-03-04 04:30:02 +00:00
Ask Bjørn Hansen
9523d55cd7 reset_transaction is called after disconnect plugins are called so
the Transaction objects DESTROY method is called. (Thanks to Robert
  James Kaes <rjkaes@flarenet.com>)


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@207 958fd67b-6ff1-0310-b445-bb7760255be9
2004-02-24 10:31:12 +00:00
Ask Bjørn Hansen
5abf363c34 Added Postfix queue plugin thanks to Peter J Holzer!
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@205 958fd67b-6ff1-0310-b445-bb7760255be9
2004-02-19 10:55:36 +00:00
Ask Bjørn Hansen
dfb763acdf don't call exit from the SMTP object, call the disconnect method instead
minor tweaks


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@203 958fd67b-6ff1-0310-b445-bb7760255be9
2004-02-13 13:10:18 +00:00
Matt Sergeant
c567f3726a Support DENYHARD as response to RCPT
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@198 958fd67b-6ff1-0310-b445-bb7760255be9
2003-12-03 20:58:30 +00:00
Matt Sergeant
c4903199ff DENYHARD - allows you to DENY with a disconnect
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@196 958fd67b-6ff1-0310-b445-bb7760255be9
2003-12-03 08:07:36 +00:00
Matt Sergeant
c1aa3ddb8a Override log function to use fileno(client) as pid will always be the same
Don't use exit() in response to bad LF end of DATA


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@195 958fd67b-6ff1-0310-b445-bb7760255be9
2003-11-19 23:01:43 +00:00
Matt Sergeant
b55eae7e36 unset indata{} after DATA is finished.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@192 958fd67b-6ff1-0310-b445-bb7760255be9
2003-11-06 15:41:03 +00:00
Matt Sergeant
c2fb24c4e4 Split received header so it doesn't exceed 78 chars
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@191 958fd67b-6ff1-0310-b445-bb7760255be9
2003-11-04 22:52:49 +00:00