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

2009-01-11 Thread Jared Johnson
Robert Spier wrote: What's the goal of this? It also needs some documentation or examples. The idea is to allow plugins to do something like: for my $rcpt ($transaction->recipients) { do_stuff() if $spam_score > $rcpt->config('spam_threshold'); } IOW, per-user prefs. This is the first,

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] 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

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

2009-01-09 Thread Jared Johnson
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 future; at any rate, it gets the job done pretty nicely. This patch will only be useful for people who d