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
5381151d
Commit
5381151d
authored
7 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed return code for mail test.
parent
365a01ca
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
+7
-2
7 additions, 2 deletions
tests/test_email.py
with
7 additions
and
2 deletions
tests/test_email.py
+
7
−
2
View file @
5381151d
...
...
@@ -11,6 +11,7 @@ import random
import
time
import
imp
YELLOW
=
'
\033
[93m
'
GREEN
=
'
\033
[92m
'
RED
=
'
\033
[91m
'
DEF
=
'
\033
[0m
'
...
...
@@ -28,6 +29,10 @@ def print_color(txt, col):
print
(
'
%s%s%s
'
%
(
col
,
txt
,
DEF
))
def
print_yellow
(
txt
):
print_color
(
txt
,
YELLOW
)
def
print_red
(
txt
):
print_color
(
txt
,
RED
)
...
...
@@ -62,8 +67,8 @@ def check_relay():
with
open
(
'
/etc/mailname
'
,
'
r
'
)
as
f
:
d
=
f
.
read
().
strip
()
if
d
not
in
(
'
ubicast.tv
'
,
'
ubicast.eu
'
):
print_
red
(
'
/etc/mailname does not contain ubicast.eu or ubicast.tv, mails will probably not be received on ubicast mailing lists
'
)
return
2
print_
yellow
(
'
/etc/mailname does not contain ubicast.eu or ubicast.tv, mails will probably not be received on ubicast mailing lists
'
)
return
3
# check spf
status
,
output
=
subprocess
.
getstatusoutput
(
'
host -t TXT ubicast.eu
'
)
if
ip
not
in
output
:
...
...
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