Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
2be373fd
Commit
2be373fd
authored
Feb 28, 2016
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #727 from yodax/userlist
Allow files in /home/user-data/mail/mailboxes
parents
f9ca440c
057903a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
mailconfig.py
management/mailconfig.py
+14
-13
No files found.
management/mailconfig.py
View file @
2be373fd
...
@@ -137,19 +137,20 @@ def get_mail_users_ex(env, with_archived=False, with_slow_info=False):
...
@@ -137,19 +137,20 @@ def get_mail_users_ex(env, with_archived=False, with_slow_info=False):
if
with_archived
:
if
with_archived
:
root
=
os
.
path
.
join
(
env
[
'STORAGE_ROOT'
],
'mail/mailboxes'
)
root
=
os
.
path
.
join
(
env
[
'STORAGE_ROOT'
],
'mail/mailboxes'
)
for
domain
in
os
.
listdir
(
root
):
for
domain
in
os
.
listdir
(
root
):
for
user
in
os
.
listdir
(
os
.
path
.
join
(
root
,
domain
)):
if
os
.
path
.
isdir
(
os
.
path
.
join
(
root
,
domain
)):
email
=
user
+
"@"
+
domain
for
user
in
os
.
listdir
(
os
.
path
.
join
(
root
,
domain
)):
mbox
=
os
.
path
.
join
(
root
,
domain
,
user
)
email
=
user
+
"@"
+
domain
if
email
in
active_accounts
:
continue
mbox
=
os
.
path
.
join
(
root
,
domain
,
user
)
user
=
{
if
email
in
active_accounts
:
continue
"email"
:
email
,
user
=
{
"privileges"
:
""
,
"email"
:
email
,
"status"
:
"inactive"
,
"privileges"
:
""
,
"mailbox"
:
mbox
,
"status"
:
"inactive"
,
}
"mailbox"
:
mbox
,
users
.
append
(
user
)
}
if
with_slow_info
:
users
.
append
(
user
)
user
[
"mailbox_size"
]
=
utils
.
du
(
mbox
)
if
with_slow_info
:
user
[
"mailbox_size"
]
=
utils
.
du
(
mbox
)
# Group by domain.
# Group by domain.
domains
=
{
}
domains
=
{
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment