Commit Graph

234 Commits

Author SHA1 Message Date
Matt Sergeant
5994a79d9f Slight cleanup.
Support a finished() callback as the readable() thing didn't work.


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@577 958fd67b-6ff1-0310-b445-bb7760255be9
2005-11-22 23:03:05 +00:00
Matt Sergeant
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
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
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
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
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
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
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
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