Initial revision
darcs-hash:20000521125243-92525-6092ab1d3efe6df9898549afb0aa3c7d43983e8b.gz
This commit is contained in:
commit
f1d3de9de7
26 changed files with 621 additions and 0 deletions
24
sendmail-vit-il
Executable file
24
sendmail-vit-il
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- Python -*-
|
||||
|
||||
# teste si notre sendmail fonctionne encore.
|
||||
|
||||
from socket import *
|
||||
import sys
|
||||
|
||||
OK = 0
|
||||
|
||||
host = "localhost"
|
||||
if len(sys.argv) > 1:
|
||||
host = sys.argv[1]
|
||||
|
||||
s = socket(AF_INET,SOCK_STREAM)
|
||||
try:
|
||||
s.connect(host,25)
|
||||
data = s.recv(3)
|
||||
OK = ("220" == data)
|
||||
s.close()
|
||||
except:
|
||||
OK = 0
|
||||
|
||||
sys.exit(not OK)
|
Loading…
Add table
Add a link
Reference in a new issue