Commit Graph

223 Commits

Author SHA1 Message Date
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
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
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
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