On Sun, 2006-10-12 at 16:15 -0500, Guy Hulbert wrote:
> I guess I will turn auth_vpopmail_sql into a template and write a script
> to modify the template according to what the user wants.  The output of
> the script can be named in any way that works ... there are some notes
> in it about "configuration" anyway, iirc.

I see now that this is silly.

I realized after I sent it that there is already a configuration
mechanism to use and I've read through the code so that I understand how
it works.

So next, I'm wondering how to run a plugin standalone ... but of course,
there is the 't' directory.

I see that there are not many examples yet ...

I want to create a plugin, 'auth_dbi', which will normally require a
configuration file eg:

auth_dbi_config
---------------
driver  Pg
dbname  dovecot
dbuser  dovecot
dbpass  <CENSORED>
pwquery SELECT password FROM passwords WHERE user = ? AND domain = ?

One could put defaults in the code but they are unlikely to be useful.

I also need a sensible way to specify a test_username and test_password.

Questions etc:

 1. Config files are read just once on startup or are they read
 every time the plugin is called ? [ Sorry if this is a silly
 question but I can't tell from staring at the code. ]

 2. make test in branch .03x is broken ...

 3. perl Makefile.PL says:

        Checking if your kit is complete...
        Warning: the following files are missing in your kit:
                META.yml
        Please inform the author.

 4. Running tests standalone dies ... ok, this works:

    PERLLIB=lib perl t/plugin_tests.t

 5. The above dies in qpsmtpd-03x with:

        You said to run 0 tests at t/plugin_tests.t line 8.
        # Looks like your test died before it could output anything.

I guess I can figure out what to do from here ... 

 6. How should a misconfigured plugin behave?  I'll look at
auth_vpopmail_sql to start, I guess.

        
-- 
--gh


Reply via email to