postfix added and ver. bump to 3.1.0
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
if not os.path.exists("/etc/mail/aliases.db"):
|
||||
os.system("/usr/bin/newaliases")
|
||||
|
||||
os.system("/bin/chown root:postdrop /usr/sbin/postdrop")
|
||||
os.system("/bin/chown root:postdrop /usr/sbin/postqueue")
|
||||
os.system("/bin/chown root:mail /var/spool/mail")
|
||||
os.system("/bin/chown postfix:postfix /var/lib/postfix")
|
||||
os.system("/bin/chmod 02711 /usr/sbin/postdrop")
|
||||
os.system("/bin/chmod 02711 /usr/sbin/postqueue")
|
||||
os.system("/bin/chmod 0755 /var/spool/mail")
|
||||
os.system("/bin/chmod 0600 /etc/postfix/saslpass")
|
||||
os.system("/usr/sbin/postfix check")
|
||||
@@ -0,0 +1,24 @@
|
||||
from comar.service import *
|
||||
|
||||
serviceType = "server"
|
||||
serviceDesc = _({"en": "Postfix Mail Server",
|
||||
"tr": "Postfix E-Posta Sunucusu"})
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
startService(command="/usr/sbin/postfix",
|
||||
args="start",
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(command="/usr/sbin/postfix",
|
||||
args="stop",
|
||||
donotify=True)
|
||||
|
||||
def reload():
|
||||
stopService(command="/usr/sbin/postfix",
|
||||
args="reload")
|
||||
|
||||
def status():
|
||||
return isServiceRunning(command="/usr/lib/postfix/master")
|
||||
Reference in New Issue
Block a user