Hi,
wenn Du folgenden Code-Schnipsel in Deine custom.lua (/usr/lib/liveconfig/lua/custom.lua) einfügst und danach Liveconfig oder den lcclient neu startest, legt er die Limits (in diesem Beispiel 30 Mails pro 10 Minuten) automatisch mit dem Postfach an:
---------------------------------------------------------------
orig_dovecot_addMailbox = dovecot.addMailbox
orig_dovecot_delMailbox = dovecot.deleteMailbox
function dovecot.addMailbox(cfg, opts, data)
addr = data.name .. "@" .. data.domain
-- Postfach bei lcpolicyd anlegen
os.execute("/usr/lib/liveconfig/lcpolicyd set " .. addr .. " 10 30")
-- Original-Funktion aufrufen
return orig_dovecot_addMailbox(cfg, opts, data)
end
function dovecot.deleteMailbox(cfg, opts, data)
addr = data.name .. "@" .. data.domain
-- Postfach bei lcpolicyd entfernen
os.execute("/usr/lib/liveconfig/lcpolicyd delete " .. addr)
-- Original-Funktion aufrufen
return orig_dovecot_delMailbox(cfg, opts, data)
end
----------------------------------------------
Gruß Ralf