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
9c5f5645
Commit
9c5f5645
authored
7 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Changed messages in postfix test (refs
#24224
).
parent
eaa6a0cd
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
tests/test_email.py
+8
-4
8 additions, 4 deletions
tests/test_email.py
with
8 additions
and
4 deletions
tests/test_email.py
+
8
−
4
View file @
9c5f5645
...
@@ -43,13 +43,17 @@ def print_green(txt):
...
@@ -43,13 +43,17 @@ def print_green(txt):
def
check_listening_port
():
def
check_listening_port
():
# check that postfix listens the port 25 correctly
# check that postfix listens the port 25 correctly
status
,
out
=
subprocess
.
getstatusoutput
(
'
netstat -pant | grep master | grep
127.0.0.1
:25
'
)
status
,
out
=
subprocess
.
getstatusoutput
(
'
netstat -pant | grep master | grep
"
:25
"
'
)
if
status
!=
0
:
if
status
!=
0
:
print_red
(
'
The port 25 is not listened by postfix
"
master
"
process.
'
)
print_red
(
'
The port 25 is not listened by postfix
"
master
"
process.
'
)
return
1
return
1
else
:
print_green
(
'
Postfix
"
master
"
process is listening port 25 correctly.
'
)
print_green
(
'
Postfix is listening port 25 correctly.
'
)
if
'
127.0.0.1:25
'
not
in
out
:
return
0
print_red
(
'
Postfix
"
master
"
process is not listening address 127.0.0.1, please check postfix configuration.
'
)
print
(
'
Postfix should listen address 127.0.0.1 to be sure that this server cannot be used as an SMTP relay by external services.
'
)
return
1
print_green
(
'
Postfix
"
master
"
process is listening address 127.0.0.1 correctly.
'
)
return
0
def
check_relay
():
def
check_relay
():
...
...
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