1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-03 00:07:05 +00:00

fix syntax errors

This commit is contained in:
downtownallday 2024-09-07 10:47:31 -04:00
parent bd6f3a8b2b
commit 77c6a53f81
4 changed files with 11 additions and 8 deletions

View File

@ -328,7 +328,7 @@ def get_mail_users_ex(env, with_archived=False):
#email = rec['maildrop'][0] #email = rec['maildrop'][0]
email = rec['mail'][0] email = rec['mail'][0]
privileges = rec['mailaccess'] privileges = rec['mailaccess']
quota = rec['mailboxQuota'][0] if len(rec['mailboxQuota']>0) else '0' quota = rec['mailboxQuota'][0] if len(rec['mailboxQuota'])>0 else '0'
display_name = rec['cn'][0] display_name = rec['cn'][0]
active_accounts.add(email) active_accounts.add(email)
@ -384,7 +384,7 @@ def get_mail_users_ex(env, with_archived=False):
"privileges": [], "privileges": [],
"status": "inactive", "status": "inactive",
"mailbox": mbox, "mailbox": mbox,
"display_name": "" "display_name": "",
"box_size": '?', "box_size": '?',
"box_quota": '?', "box_quota": '?',
"percent": '?', "percent": '?',

View File

@ -32,11 +32,13 @@
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="sr-only" for="adduserQuota">Quota</label>
<input type="text" class="form-control" id="adduserQuota" placeholder="Quota" style="width:5em;" value="0">
<div>Display Name</div> <div>Display Name</div>
<input id="adduserDisplayName" class="form-control" type="text" placeholder="eg: John Smith"> <input id="adduserDisplayName" class="form-control" type="text" placeholder="eg: John Smith">
</div> </div>
<div class="form-group">
<div>Quota</div>
<input type="text" class="form-control" id="adduserQuota" placeholder="Quota" style="width:5em;" value="0">
</div>
<div class="text-center"> <div class="text-center">
<div>&nbsp;</div> <div>&nbsp;</div>
<button type="submit" class="btn btn-primary">Add User</button> <button type="submit" class="btn btn-primary">Add User</button>
@ -249,7 +251,7 @@ function do_add_user() {
email: email, email: email,
password: pw, password: pw,
privileges: privs, privileges: privs,
quota: quota quota: quota,
display_name: display_name display_name: display_name
}, },
function(r) { function(r) {

View File

@ -85,9 +85,9 @@ fi
if ! grep -q "quota_status_success = DUNNO" /etc/dovecot/conf.d/90-quota.conf; then if ! grep -q "quota_status_success = DUNNO" /etc/dovecot/conf.d/90-quota.conf; then
cat > /etc/dovecot/conf.d/90-quota.conf << EOF; cat > /etc/dovecot/conf.d/90-quota.conf << EOF;
plugin { plugin {
quota = maildir quota = maildir:User quota
quota_grace = 10% quota_grace = 10%%
quota_status_success = DUNNO quota_status_success = DUNNO
quota_status_nouser = DUNNO quota_status_nouser = DUNNO

View File

@ -88,8 +88,9 @@ pass_attrs = maildrop=user
# Post-login information specific to the user (eg. quotas). For # Post-login information specific to the user (eg. quotas). For
# lmtp delivery, pass_filter is not used, and postfix has already # lmtp delivery, pass_filter is not used, and postfix has already
# rewritten the envelope using the maildrop address. # rewritten the envelope using the maildrop address.
# %$ is expanded to mailboxQuota's value.
user_filter = (&(objectClass=mailUser)(|(mail=%u)(maildrop=%u))) user_filter = (&(objectClass=mailUser)(|(mail=%u)(maildrop=%u)))
user_attrs = maildrop=user mailboxQuota=quota_rule=*:bytes=%\$ user_attrs = maildrop=user,mailboxQuota=quota_rule=*:bytes=%\$
# Account iteration for various dovecot tools (doveadm) # Account iteration for various dovecot tools (doveadm)
iterate_filter = (objectClass=mailUser) iterate_filter = (objectClass=mailUser)