John Peacock wrote:
> David Sparks wrote:
> 
>>Is there a preferred way to get the config dir?  To call config_dir() I
>> seem to need to "use Qpsmtpd;" in my plugin and call it via
>>Qpsmtpd::configdir().
> 
> 
> Perhaps you could tell us what you intend to accomplish, rather than just
> teasing us with a series of concentric circles around your real question. ;-)

Sorry for any confusion, its basically a rehash of this:

http://www.nntp.perl.org/group/perl.qpsmtpd/3150

I've decided I wanted to remove my private yaml config patch so I have
been experimenting with hook_config().  However I think its simpler to
just get the config dir and load the config from a private sub.


Background: I have several hundred lines of yaml config that map
user/host names at connect/mail/rcpt time to specific actions.  The
action is immediate reject/tempfail or deferred by adding an entry to
notes(); queue plugins use the notes entries to write the message with
some metadata (ie envelope information to relay the msg).

Yaml doesn't seem to have been a popular choice -- I guess I should look
into CDB and the tied hash.

>       my $configdir = $self->qp->config_dir();

Works like a charm!

Thanks,

ds

Reply via email to