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
a8074ae3
Commit
a8074ae3
authored
Aug 19, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suppress some status output regarding new automatic aliases on first installation
parent
cfc4e6b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
mailconfig.py
management/mailconfig.py
+7
-6
firstuser.sh
setup/firstuser.sh
+1
-1
No files found.
management/mailconfig.py
View file @
a8074ae3
...
...
@@ -558,7 +558,8 @@ def kick(env, mail_result=None):
# Ensure every required alias exists.
existing_users
=
get_mail_users
(
env
)
existing_aliases
=
get_mail_aliases
(
env
)
existing_alias_records
=
get_mail_aliases
(
env
)
existing_aliases
=
set
(
a
for
a
,
*
_
in
existing_alias_records
)
# just first entry in tuple
required_aliases
=
get_required_aliases
(
env
)
def
ensure_admin_alias_exists
(
address
):
...
...
@@ -566,15 +567,15 @@ def kick(env, mail_result=None):
if
address
in
existing_users
:
return
# Does this alias exists?
for
a
,
*
_
in
existing_aliases
:
if
a
==
address
:
return
# If the alias already exists, we're good.
if
address
in
existing_aliases
:
return
# Doesn't exist.
administrator
=
get_system_administrator
(
env
)
if
address
==
administrator
:
return
# don't make an alias from the administrator to itself --- this alias must be created manually
add_mail_alias
(
address
,
administrator
,
""
,
env
,
do_kick
=
False
)
if
administrator
not
in
existing_aliases
:
return
# don't report the alias in output if the administrator alias isn't in yet -- this is a hack to supress confusing output on initial setup
results
.
append
(
"added alias
%
s (=>
%
s)
\n
"
%
(
address
,
administrator
))
for
address
in
required_aliases
:
...
...
@@ -582,7 +583,7 @@ def kick(env, mail_result=None):
# Remove auto-generated postmaster/admin on domains we no
# longer have any other email addresses for.
for
address
,
forwards_to
,
*
_
in
existing_alias
e
s
:
for
address
,
forwards_to
,
*
_
in
existing_alias
_record
s
:
user
,
domain
=
address
.
split
(
"@"
)
if
user
in
(
"postmaster"
,
"admin"
)
\
and
address
not
in
required_aliases
\
...
...
setup/firstuser.sh
View file @
a8074ae3
...
...
@@ -53,5 +53,5 @@ if [ -z "`tools/mail.py user`" ]; then
hide_output tools/mail.py user make-admin
$EMAIL_ADDR
# Create an alias to which we'll direct all automatically-created administrative aliases.
tools/mail.py
alias
add administrator@
$PRIMARY_HOSTNAME
$EMAIL_ADDR
tools/mail.py
alias
add administrator@
$PRIMARY_HOSTNAME
$EMAIL_ADDR
>
/dev/null
fi
\ No newline at end of file
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