Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncpython
/
srvcnf2
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit df3746f7
authored
Apr 08, 2018
by
vuj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0.1.8 Mail Info
1 parent
02293d69
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
16 deletions
CHANGELOG
web/mailsrv/mailcnf_posttools.py
web/static/style.css
web/templates/content_mailcnf_posttools.html
CHANGELOG
View file @
df3746f
2018-01-17 v0.1.8 Mail Info
2018-01-17 v0.1.7 Posttools Monitoring
2018-01-17 v0.1.7 Posttools Monitoring
2018-01-16 v0.1.6 Posttools Fix
2018-01-16 v0.1.6 Posttools Fix
2018-01-16 v0.1.5 Posttools
2018-01-16 v0.1.5 Posttools
...
...
web/mailsrv/mailcnf_posttools.py
View file @
df3746f
...
@@ -44,6 +44,9 @@ class mailcnf_posttools(ncauth_base):
...
@@ -44,6 +44,9 @@ class mailcnf_posttools(ncauth_base):
if
action
==
'postersupersend1'
:
if
action
==
'postersupersend1'
:
msg
=
self
.
postersupersend1
(
id
,
mailname
)
msg
=
self
.
postersupersend1
(
id
,
mailname
)
msglvl
=
"alert-info"
msglvl
=
"alert-info"
if
action
==
'postersupershow'
:
msg
=
'<h3>Inhalt der Mail</h3><pre>'
+
self
.
postersupershow
(
id
,
mailname
)
+
'</pre><h3>Ende der Mail</h3>'
msglvl
=
"alert-info"
loader
=
tornado
.
template
.
Loader
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../templates"
))
loader
=
tornado
.
template
.
Loader
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../templates"
))
navigation
=
loader
.
load
(
"navigation.html"
)
.
generate
(
nav
=
nav
)
navigation
=
loader
.
load
(
"navigation.html"
)
.
generate
(
nav
=
nav
)
subnavigation
=
loader
.
load
(
"subnav_"
+
module
+
"_"
+
mainfnc
+
".html"
)
.
generate
(
subnav
=
subnav
)
subnavigation
=
loader
.
load
(
"subnav_"
+
module
+
"_"
+
mainfnc
+
".html"
)
.
generate
(
subnav
=
subnav
)
...
@@ -104,6 +107,22 @@ class mailcnf_posttools(ncauth_base):
...
@@ -104,6 +107,22 @@ class mailcnf_posttools(ncauth_base):
p1
=
str
(
Popen
(
"/usr/sbin/postqueue -i "
+
str
(
id
)
,
stdout
=
PIPE
,
shell
=
True
)
.
communicate
()[
0
])
p1
=
str
(
Popen
(
"/usr/sbin/postqueue -i "
+
str
(
id
)
,
stdout
=
PIPE
,
shell
=
True
)
.
communicate
()[
0
])
return
"Nachricht "
+
str
(
id
)
+
" von "
+
str
(
mailname
)
+
" wird erneut versucht zu senden"
return
"Nachricht "
+
str
(
id
)
+
" von "
+
str
(
mailname
)
+
" wird erneut versucht zu senden"
def
postersupershow
(
self
,
id
,
mailname
=
''
):
#self.write("postsuper -d "+str(id)+" " )
old_dir
=
os
.
getcwd
()
os
.
chdir
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
""
)
)
os
.
chdir
(
'..'
)
p1
=
str
(
Popen
(
"/usr/sbin/postcat -q "
+
str
(
id
)
,
stdout
=
PIPE
,
shell
=
True
)
.
communicate
()[
0
])
thatLine
=
p1
.
replace
(
'
\\
n'
,
'<br />'
)
thatLine
=
thatLine
.
replace
(
'b
\'
'
,
'<br>'
)
thatLine
=
thatLine
.
replace
(
'
\'
'
,
''
)
print
(
str
(
thatLine
))
return
thatLine
#return "Nachricht "+str(id)+" von "+str(mailname)+" wird erneut versucht zu senden"
def
checklogin
(
self
,
number
):
def
checklogin
(
self
,
number
):
#self.write("postsuper -d "+str(id)+" " )
#self.write("postsuper -d "+str(id)+" " )
old_dir
=
os
.
getcwd
()
old_dir
=
os
.
getcwd
()
...
@@ -115,4 +134,4 @@ class mailcnf_posttools(ncauth_base):
...
@@ -115,4 +134,4 @@ class mailcnf_posttools(ncauth_base):
thatLine
=
thatLine
.
replace
(
'
\'
'
,
''
)
thatLine
=
thatLine
.
replace
(
'
\'
'
,
''
)
return
thatLine
return
thatLine
\ No newline at end of file
web/static/style.css
View file @
df3746f
...
@@ -227,7 +227,8 @@ margin:6px;
...
@@ -227,7 +227,8 @@ margin:6px;
.mailbutton1
,
.mailbutton1
,
.mailbutton2
.mailbutton2
,
.mailbutton3
{
{
width
:
45%
;
width
:
45%
;
margin
:
5px
;
margin
:
5px
;
...
@@ -243,6 +244,10 @@ margin:6px;
...
@@ -243,6 +244,10 @@ margin:6px;
float
:
right
;
float
:
right
;
}
}
.mailbutton3
{
float
:
right
;
}
.mailbuttoncontainer
{
.mailbuttoncontainer
{
height
:
25px
;
height
:
25px
;
}
}
\ No newline at end of file
web/templates/content_mailcnf_posttools.html
View file @
df3746f
<br><br>
<div
class=
"alert-info"
style=
"alert"
>
postque -q
</div>
<br>
<div>
{% raw mailstuff %}
</div>
<br>
<br>
<div
class=
"alert-info"
style=
"alert"
>
Aktionen postsuper -d $ID / postqueue -i $ID
</div>
<div
class=
"alert-info"
style=
"alert"
>
Aktionen postsuper -d $ID / postqueue -i $ID
</div>
<br>
<br>
...
@@ -35,11 +26,32 @@
...
@@ -35,11 +26,32 @@
<button
type=
"submit"
class=
"btn btn-info btn-block btn-xs"
>
Versuche zu senden {% raw entry[0] %} {% raw entry[1] %}
</button>
<button
type=
"submit"
class=
"btn btn-info btn-block btn-xs"
>
Versuche zu senden {% raw entry[0] %} {% raw entry[1] %}
</button>
</form>
</form>
</div><div
class=
"mailbutton3"
>
<form
action=
"/mailcnf/posttools"
method=
"POST"
>
<input
type=
"hidden"
size=
"70"
name=
"fnc"
value=
"mailcnf"
>
<input
type=
"hidden"
value=
"posttools"
size=
"70"
name=
"mainfnc"
class=
"'"
>
<input
type=
"hidden"
value=
"about"
size=
"70"
name=
"module"
class=
"'"
>
<input
type=
"hidden"
value=
"postersupershow"
size=
"70"
name=
"action"
class=
"'"
>
<input
type=
"hidden"
value=
"{% raw entry[0] %}"
size=
"70"
name=
"id"
class=
"'"
>
<input
type=
"hidden"
value=
"{% raw entry[1] %}"
size=
"70"
name=
"mailname"
class=
"'"
>
<button
type=
"submit"
class=
"btn btn-primary btn-block btn-xs"
>
Zeigen {% raw entry[0] %}
</button>
</form>
</div>
</div>
</div>
</div>
<br>
<br>
{% end %}
{% end %}
<br><br>
<div
class=
"alert-info"
style=
"alert"
>
postqueue -q
</div>
<br>
<div>
{% raw mailstuff %}
</div>
<br><br>
<br><br>
<br><br>
<br><br>
<br><br>
<div
class=
"alert-info"
style=
"alert"
>
häufigste Anmeldungen
</div>
<div
class=
"alert-info"
style=
"alert"
>
häufigste Anmeldungen
</div>
...
@@ -49,4 +61,4 @@
...
@@ -49,4 +61,4 @@
</div>
</div>
<br><br>
<br><br>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment