Commit df3746f7 by vuj

v0.1.8 Mail Info

1 parent 02293d69
2018-01-17 v0.1.8 Mail Info
2018-01-17 v0.1.7 Posttools Monitoring
2018-01-16 v0.1.6 Posttools Fix
2018-01-16 v0.1.5 Posttools
......
......@@ -44,6 +44,9 @@ class mailcnf_posttools(ncauth_base):
if action == 'postersupersend1':
msg = self.postersupersend1(id,mailname)
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"))
navigation=loader.load("navigation.html").generate(nav=nav)
subnavigation=loader.load("subnav_"+module+"_"+mainfnc+".html").generate(subnav=subnav)
......@@ -104,6 +107,22 @@ class mailcnf_posttools(ncauth_base):
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"
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):
#self.write("postsuper -d "+str(id)+" " )
old_dir = os.getcwd()
......@@ -115,4 +134,4 @@ class mailcnf_posttools(ncauth_base):
thatLine = thatLine.replace('\'', '')
return thatLine
\ No newline at end of file
......@@ -227,7 +227,8 @@ margin:6px;
.mailbutton1,
.mailbutton2
.mailbutton2,
.mailbutton3
{
width:45%;
margin:5px;
......@@ -243,6 +244,10 @@ margin:6px;
float: right;
}
.mailbutton3{
float: right;
}
.mailbuttoncontainer{
height:25px;
}
\ No newline at end of file
}
<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>
<br>
......@@ -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>
</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>
<br>
{% end %}
<br><br>
<div class="alert-info" style="alert">postqueue -q</div>
<br>
<div>
{% raw mailstuff %}
</div>
<br><br>
<br><br>
<br><br>
<div class="alert-info" style="alert">häufigste Anmeldungen</div>
......@@ -49,4 +61,4 @@
</div>
<br><br>
\ No newline at end of file
<br><br>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!