[PATCH] Make remote_host available in hook_pre_connection

2009-01-10 Thread Jared Johnson
Just one more... I've found it useful to have remote_host available in my pre-conection plugin (specifically for enforcing concurrency limits specified in a rule based on host patterns). Attached is the patch I have applied to make this possible. Now I'm off to bed! -Jared Index: qpsmtpd-f

Re: [PATCH] config() method for Qpsmtpd::Address objects

2009-01-10 Thread Jared Johnson
I noticed the previous iteration of this patch would allow cached global config values to override per-recipient config values. The attached patch adds the following change to avoid this: --- lib/Qpsmtpd.pm (revision 967) +++ lib/Qpsmtpd.pm (working copy) @@ -142,7 +142,7 @@ my ($self, $c

Re: [PATCH] Add 'address notes'

2009-01-10 Thread Matt Sergeant
On Fri, 09 Jan 2009 22:00:36 -0600, Jared Johnson wrote: > Most notably for Address:host(), user(), > notes() and Connection::notes(), Transaction::notes(): it changes the > 'set' version of these get/set methods to return $self. This makes it > possible to do things like: > > $rcpt->user('jaredj

Re: [PATCH] Add 'address notes'

2009-01-10 Thread Jared Johnson
I can't say I don't hope you're overruled, as I personally enjoy using that syntax all over the place and would be happy to submit patches to have the rest of QP act that way :) Nevertheless, here's another variant that retains the previous behavior, but with the more standard/one-line-shorter

Re: [PATCH] Add 'address notes'

2009-01-10 Thread Robert Spier
Matt Sergeant wrote: > > On Fri, 09 Jan 2009 22:00:36 -0600, Jared Johnson wrote: > > Most notably for Address:host(), user(), > > notes() and Connection::notes(), Transaction::notes(): it changes the > > 'set' version of these get/set methods to return $self. This makes it > > possible to do t

Re: [PATCH] Make remote_host available in hook_pre_connection

2009-01-10 Thread Robert Spier
What's the point of this? If you need the hostname in the pre-connect hook you can look it up there from the IP address which you already have. Also, what about async? -R Jared Johnson wrote: > > Just one more... > > I've found it useful to have remote_host available in my pre-conection >

Re: [PATCH] config() method for Qpsmtpd::Address objects

2009-01-10 Thread Robert Spier
What's the goal of this? It also needs some documentation or examples. Jared Johnson wrote: > > Adding a config method for Qpsmtpd::Address objects turned out to be > relatively straightforward. I was reluctant to subclass Qpsmtpd, but > this actually seems like it could be useful in the futu

Re: [PATCH] Deprecate DECLINED with NEXT

2009-01-10 Thread Robert Spier
While I agree that 'DECLINED' is confusing, 'NEXT' isn't terribly clear either. I think I'd just stick with the status quo. You get used to it pretty quick. -R Jared Johnson wrote: > > A number of my associates who have had occasion to review my QP plugin > code have been perplexed by our

Re: [PATCH] Deprecate DECLINED with NEXT

2009-01-10 Thread Ask Bjørn Hansen
On Jan 10, 2009, at 21:55, Robert Spier wrote: While I agree that 'DECLINED' is confusing, 'NEXT' isn't terribly clear either. Blame the Apache 1.x API -- that was the API I knew best in ~2001, so it got emulated ... I think I'd just stick with the status quo. You get used to it pretty