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-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
......
...@@ -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()
......
...@@ -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;
} }
<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>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!