[Valvula] sql default limit per domain user in mquota

Francis Brosnan Blázquez francis.brosnan en aspl.es
Lun Abr 2 11:07:00 CEST 2018


Hello Kapetanakis.

Thanks for your interest. I haven't had enough time to look at the
change you propose and the state of mod-mquota, but my initial review
is that the module will require the following work:

- Add support for SQL (currently all quota configuration is done
through /etc/valvula/valvula.conf, <default-sending-quota> tag).

- This means that before adding multi database SQL access, first is
required a general module update to have SQL configurations located at
a MySQL database.

- Because of that, maybe a more generic approach can be implemented at
the very beginning, with a single database. That will improve a lot
usability for a system administrator (having several databases or
tables for the same thing is problematic).

- After that, a general update to mod-mquota must be applied because
current period selection is global (see __mod_mquota_current_period).
That will require rewriting it to make it support domain/user period
storage
(adding, possibly one or two hashes) and then, updating the rest of the
module where this is used (I've seen a couple of places that will
require a bit of work).

- Apart from that, module update **must** support previous
configuration so old installations keep working without any issue, so
users that want MySQL support for this module, and hence user/domain
level selection, can opt-in.

- Once finished, a full regression test is required to ensure it works
with global, domain and user limits, but also to check valgrind is fine
with it.

A bit work :-) 

Please, before investing your time, if you attempt to make this change
for it to be included into valvula's official repo, we will need a CLA.
If you are interested, please, let me know so I can request it.

Best Regards.


El lun, 26-03-2018 a las 14:30 +0300, Kapetanakis Giannis escribió:

> Hi,
> 
> I was wondering if the following change (not yet done) is interesting to your project.
> 
> Right now mod-mquota uses same limits for all domains.
> 
> I think it might be easy to make a change and add separate sql configuration per domain or even per user (in a domain).
> 
> I'm not talking about domain limits (all users) but specific user limits per domain or per user.
> 
> user1 en domain1.com: minute-limit=2, hour-limit=10, global-limit=100, etc
> domain1.com: minute-limit=10, hour-limit=100, global-limit=1000, etc
> domain2.com: minute-limit=20, hour-limit=200, global-limit=2000, etc
> 
> the plugin will check in a specific db table if the following exists:
> 
> a) check for user specific limits: db_sasl_user='user1 en domain1.com' -> return limits
> b) check for global domain limits: db_sasl_user='%GLOBAL%@domain1.com' -> return limits
> c) if nothing is found use default limits from config file
> 
> In advance the db limits can use the same label as in <limit label=/> to differentiate limits per time of day as in config.
> 
> If you agree on this I might find some time to do it since I need it in my setup.
> 
> Regards,
> 
> Giannis
> _______________________________________________
> Valvula mailing list
> Valvula en lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/valvula


-- 
Francis Brosnan Blázquez  -  ASPL
http://www.asplhosting.com/
http://www.aspl.es/
https://twitter.com/aspl_es
https://twitter.com/asplhosting
https://twitter.com/francisbrosnanb
https://es.linkedin.com/in/francis-brosnan-blázquez-1353a218

91 134 14 22 - 91 134 14 45 - 91 116 07 57
Av. Juan Carlos I 13, 2ºC, Torre Garena
28806 - Alcalá de Henares (España)

AVISO LEGAL
 
En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL).
 
ASPL garantiza que los datos serán tratados con la finalidad de mantener
las oportunas relaciones comerciales o promocionales con usted o la
entidad que usted representa. No obstante, usted puede ejercitar sus
derechos de acceso, rectificación, cancelación y oposición dispuestos en
la mencionada Ley Orgánica, notificándolo por escrito a ASPL -
Protección Datos, Av. Juan Carlos I 13, 2ºC, Alcalá de Henares
(Madrid).
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.aspl.es/pipermail/valvula/attachments/20180402/da7a96e8/attachment.html>


Más información sobre la lista de distribución Valvula