Newer
Older
'''
import os
import subprocess
import sys
if not os.path.exists('/etc/postfix'):
print('Postfix dir does not exists, please install postfix.')
# check that postfix listens the port 25 correctly
status, out = subprocess.getstatusoutput('netstat -pant | grep master | grep 127.0.0.1:25')
print('The port 25 is not listened by any process.')
sys.exit(1)
print('Postfix listening port: OK.')