Hi users, > On Friday, August 07, 2015 03:25:43 PM Belloni, Davide wrote: > > I'm trying to limit email in postfix with policyd using AccessControl > and Quotas modules. > > The logic that I want to implement is the following: > - postfix smtpd_recipient_restrictions checks first with policyd > (check_policy_service) and after reject - postfix > smtpd_end_of_data_restrictions checks only with policyd > (check_policy_service) > - policyd has access control for permitted sender/recipient and > relative policies with verdict "OK" (used in > smtpd_recipient_restrictions) - policyd has quotas limits on sender > or ip and relative policies with verdict "reject" (used in > smtpd_end_of_data_restrictions)> > > This doesn't work for the following reasons: > - AccessControl has module priority of 90 > - Quotas has module priority of 50 > - AccessControl in RCPT protocol_state returns PROTO_OK with response > 'OK' and CBP_STOP (so Quotas never inserts the tracking information) > > I've seen some bugs about Quotas module related with perl 5.10 (that i > have installed on CentOS6),
I am not aware of any issues currently affecting policyd, can you be more
specific?
> but simply applying the following patch I
> obtain what I want:
>
>
> --- /usr/local/lib/cbpolicyd-2.1/cbp/modules/Quotas.pm 2015-08-07
> 14:20:00.000000000 +0200 +++
> /usr/local/lib/cbpolicyd-2.1/cbp/modules/Quotas.pm 2015-08-07
> 14:19:53.000000000 +0200 @@ -32,7 +32,7 @@
>
> # User plugin info
> our $pluginInfo = {
>
> name => "Quotas Plugin",
>
> - priority => 50,
> + priority => 95,
>
> init => \&init,
> request_process => \&check,
> cleanup => \&cleanup,
>
> Can I've introduced some bugs or malfunctions with the patch above?
> Are there better methods to achieve what I want?
Looks perfectly fine to me.
-N
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Users mailing list [email protected] http://lists.policyd.org/mailman/listinfo/users_lists.policyd.org
