mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-01 23:57:05 +00:00
fix syntax errors
This commit is contained in:
parent
bd6f3a8b2b
commit
77c6a53f81
@ -328,7 +328,7 @@ def get_mail_users_ex(env, with_archived=False):
|
||||
#email = rec['maildrop'][0]
|
||||
email = rec['mail'][0]
|
||||
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]
|
||||
active_accounts.add(email)
|
||||
|
||||
@ -384,7 +384,7 @@ def get_mail_users_ex(env, with_archived=False):
|
||||
"privileges": [],
|
||||
"status": "inactive",
|
||||
"mailbox": mbox,
|
||||
"display_name": ""
|
||||
"display_name": "",
|
||||
"box_size": '?',
|
||||
"box_quota": '?',
|
||||
"percent": '?',
|
||||
|
@ -32,11 +32,13 @@
|
||||
</select>
|
||||
</div>
|
||||
<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>
|
||||
<input id="adduserDisplayName" class="form-control" type="text" placeholder="eg: John Smith">
|
||||
</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> </div>
|
||||
<button type="submit" class="btn btn-primary">Add User</button>
|
||||
@ -249,7 +251,7 @@ function do_add_user() {
|
||||
email: email,
|
||||
password: pw,
|
||||
privileges: privs,
|
||||
quota: quota
|
||||
quota: quota,
|
||||
display_name: display_name
|
||||
},
|
||||
function(r) {
|
||||
|
@ -85,9 +85,9 @@ fi
|
||||
if ! grep -q "quota_status_success = DUNNO" /etc/dovecot/conf.d/90-quota.conf; then
|
||||
cat > /etc/dovecot/conf.d/90-quota.conf << EOF;
|
||||
plugin {
|
||||
quota = maildir
|
||||
quota = maildir:User quota
|
||||
|
||||
quota_grace = 10%
|
||||
quota_grace = 10%%
|
||||
|
||||
quota_status_success = DUNNO
|
||||
quota_status_nouser = DUNNO
|
||||
|
@ -88,8 +88,9 @@ pass_attrs = maildrop=user
|
||||
# Post-login information specific to the user (eg. quotas). For
|
||||
# lmtp delivery, pass_filter is not used, and postfix has already
|
||||
# rewritten the envelope using the maildrop address.
|
||||
# %$ is expanded to mailboxQuota's value.
|
||||
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)
|
||||
iterate_filter = (objectClass=mailUser)
|
||||
|
Loading…
Reference in New Issue
Block a user