Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
b66dac00
You need to sign in or sign up before continuing.
Commit
b66dac00
authored
5 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed log messages in postfix setup
parent
59036730
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
2.Common_services/1.Postfix/0_setup.py
+6
-3
6 additions, 3 deletions
2.Common_services/1.Postfix/0_setup.py
with
6 additions
and
3 deletions
2.Common_services/1.Postfix/0_setup.py
+
6
−
3
View file @
b66dac00
...
...
@@ -36,8 +36,8 @@ def setup(interactive=True):
])
# Configure mail sender
sender
=
utils
.
get_conf
(
'
EMAIL_SENDER
'
,
''
).
strip
(
'
\t
@
'
)
if
sender
.
count
(
'
@
'
)
!=
1
:
utils
.
log
(
'
Invalid sender address:
"
%s
"
(one
"
@
"
must be in the sender address).
'
)
if
sender
and
sender
.
count
(
'
@
'
)
!=
1
:
utils
.
log
(
'
Invalid sender address:
"
%s
"
(one
"
@
"
must be in the sender address).
'
%
sender
)
sender
=
None
if
not
sender
and
hostname
:
if
utils
.
get_conf
(
'
MS_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
mediaserver
'
):
...
...
@@ -46,7 +46,10 @@ def setup(interactive=True):
sender
=
'
%s@%s
'
%
(
hostname
,
utils
.
get_conf
(
'
CM_SERVER_NAME
'
))
elif
utils
.
get_conf
(
'
MONITOR_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
monitor
'
):
sender
=
'
%s@%s
'
%
(
hostname
,
utils
.
get_conf
(
'
MONITOR_SERVER_NAME
'
))
if
sender
:
if
not
sender
:
utils
.
warning
(
'
No sender address found.
'
)
else
:
utils
.
log
(
'
Sender address is
"
%s
"
.
'
%
sender
)
cmds
.
extend
([
'
rm -f /etc/postfix/generic
'
,
'
echo
"
root@localhost %s
"
>> /etc/postfix/generic
'
%
sender
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment