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
788c7d50
Commit
788c7d50
authored
5 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed postfix smtp_generic_maps usage | refs
#29119
parent
b2248367
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
2.Common_services/1.Postfix/0_setup.py
+6
-4
6 additions, 4 deletions
2.Common_services/1.Postfix/0_setup.py
2.Common_services/1.Postfix/main.cf
+1
-1
1 addition, 1 deletion
2.Common_services/1.Postfix/main.cf
with
7 additions
and
5 deletions
2.Common_services/1.Postfix/0_setup.py
+
6
−
4
View file @
788c7d50
...
...
@@ -37,19 +37,21 @@ def setup(interactive=True):
# Configure mail sender
sender
=
utils
.
get_conf
(
'
EMAIL_SENDER
'
,
''
)
sender_domain
=
sender
.
split
(
'
@
'
)[
-
1
]
if
sender_domain
:
if
sender_domain
==
'
ubicast.eu
'
and
utils
.
get_conf
(
'
MS_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
mediaserver
'
):
if
not
sender_domain
:
if
utils
.
get_conf
(
'
MS_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
mediaserver
'
):
sender_domain
=
utils
.
get_conf
(
'
MS_SERVER_NAME
'
)
if
sender_domain
==
'
ubicast.eu
'
and
utils
.
get_conf
(
'
CM_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
mirismanager
'
):
el
if
utils
.
get_conf
(
'
CM_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
mirismanager
'
):
sender_domain
=
utils
.
get_conf
(
'
CM_SERVER_NAME
'
)
if
sender_domain
==
'
ubicast.eu
'
and
utils
.
get_conf
(
'
MONITOR_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
monitor
'
):
el
if
utils
.
get_conf
(
'
MONITOR_SERVER_NAME
'
,
''
)
not
in
(
''
,
'
monitor
'
):
sender_domain
=
utils
.
get_conf
(
'
MONITOR_SERVER_NAME
'
)
if
sender_domain
:
cmds
.
extend
([
'
rm -f /etc/postfix/generic
'
,
'
echo
"
root@localhost %s@%s
"
>> /etc/postfix/generic
'
%
(
hostname
,
sender_domain
),
'
echo
"
root@%s %s@%s
"
>> /etc/postfix/generic
'
%
(
hostname
,
hostname
,
sender_domain
),
'
echo
"
@%s %s@%s
"
>> /etc/postfix/generic
'
%
(
hostname
,
hostname
,
sender_domain
),
'
postmap hash:/etc/postfix/generic
'
,
'
sed -i
"
s/#smtp_generic_maps/smtp_generic_maps/
"
/etc/postfix/main.cf
'
,
])
cmds
.
append
(
'
service postfix restart
'
)
utils
.
run_commands
(
cmds
)
...
...
This diff is collapsed.
Click to expand it.
2.Common_services/1.Postfix/main.cf
+
1
−
1
View file @
788c7d50
...
...
@@ -35,4 +35,4 @@ inet_protocols = ipv4
default_transport = smtp
relay_transport = smtp
disable_vrfy_command = yes
smtp_generic_maps = hash:/etc/postfix/generic
#
smtp_generic_maps = hash:/etc/postfix/generic
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