You pass in the plugin (`this` from the hook call) instead of `conn`. Best way is to put your functions on `exports` and call them as methods. Then you always get the plugin as `this`.

> On Dec 24, 2013, at 6:37 PM, Matt Simerson <notifications@github.com> wrote:
> 
> In plugins/rcpt_to.qmail_deliverable.js:
> 
> > +
> > +exports.rcpt_to_qmd = function(next, connection, params) {
> > +    var rcpt = params[0];
> > +    var email = rcpt.address();
> > +
> > +    // TODO: this is a good place to validate email
> > +    // the perl Qmail::Deliverable client does a rfc2822 "atext" test
> > +    // but Haraka might have done this for us, by this point
> > +
> > +    this.logdebug("checking " + email );
> > +    return get_qmd_response(next,connection,email);
> > +}
> > +
> > +function get_qmd_response(next,conn,email) {
> > +    options.path = '/qd1/deliverable?' + email;
> > +    conn.logprotocol(conn, 'PATH: ' + options.path);
> How do I get it to log as a plugin name? If I use a string, then it still logs as [core]. 
> 
> —
> Reply to this email directly or view it on GitHub.