Discussion:
Is there any example of a Qmail::Deliverable plugin
Reinhard Seifert
2015-01-21 11:18:00 UTC
Permalink
Hi,

first of all, thank you guys for developing/maintaining qpstmpd, really
a great piece of work.

I am a newbee qpstmpd user and also new to Perl... and also quite new to
qmail at that.

It took me some time to dpkg-reconfigure the debian package, but now it
is working excellent together with spamassassin.


I found the Qmail::Deliverable module for perl and installed it using
cpanminus.

But what now?

I looked at perldoc Qmail::Deliverable and found those code lines to use
in a qpstmpd plugin

<quote>
use Qmail::Deliverable ':all';

return DECLINED if not qmail_local $recip;
return DECLINED if deliverable $recip;
return DENY, "Who's that?";
</quote>

I pasted those lines into /usr/share/qpstmpd/plugins/check_deliverable
and added "check_deliverable" to the /etc/qpsmtpd/plugins config file.

But when restarting the service I get an error message complaining about
the $recip variable.

I tried to find an example plugin which utilizes Qmail::Deliverable, but
did not succeed.

Can anyone give me a hint or even provide a working plugin? Also welcome
are hints regarding the startup of the qmail-deliverabled daemon. Do I
need to start it and will the plugin know about the port?

Thanks,
Reinhard
Jared Johnson
2015-01-21 17:44:23 UTC
Permalink
Looks like this might do what you need:

https://github.com/smtpd/qpsmtpd/blob/72f1a7a9620b5d732749a2c84e71998113f5d1fc/plugins/qmail_deliverable

-Jared

________________________________________
From: Reinhard Seifert <***@currerius.com>
Sent: Wednesday, January 21, 2015 5:18 AM
To: ***@perl.org
Subject: Is there any example of a Qmail::Deliverable plugin

Hi,

first of all, thank you guys for developing/maintaining qpstmpd, really
a great piece of work.

I am a newbee qpstmpd user and also new to Perl... and also quite new to
qmail at that.

It took me some time to dpkg-reconfigure the debian package, but now it
is working excellent together with spamassassin.


I found the Qmail::Deliverable module for perl and installed it using
cpanminus.

But what now?

I looked at perldoc Qmail::Deliverable and found those code lines to use
in a qpstmpd plugin

<quote>
use Qmail::Deliverable ':all';

return DECLINED if not qmail_local $recip;
return DECLINED if deliverable $recip;
return DENY, "Who's that?";
</quote>

I pasted those lines into /usr/share/qpstmpd/plugins/check_deliverable
and added "check_deliverable" to the /etc/qpsmtpd/plugins config file.

But when restarting the service I get an error message complaining about
the $recip variable.

I tried to find an example plugin which utilizes Qmail::Deliverable, but
did not succeed.

Can anyone give me a hint or even provide a working plugin? Also welcome
are hints regarding the startup of the qmail-deliverabled daemon. Do I
need to start it and will the plugin know about the port?

Thanks,
Reinhard
Richard Siddall
2015-01-21 18:06:17 UTC
Permalink
Post by Reinhard Seifert
Can anyone give me a hint or even provide a working plugin? Also welcome
are hints regarding the startup of the qmail-deliverabled daemon. Do I
need to start it and will the plugin know about the port?
Thanks,
Reinhard
Hi Reinhard,

There's one in the Qmail::Deliverable package:
http://cpansearch.perl.org/src/JUERD/Qmail-Deliverable-1.07/qpsmtpd-plugin/qmail_deliverable

I haven't tried it. There's also a Debian init.d script in the package
at
http://cpansearch.perl.org/src/JUERD/Qmail-Deliverable-1.07/init.d/qmail-deliverabled

Richard.

Loading...