diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-02-01 14:08:27 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-02-01 14:08:27 +0000 |
commit | d068780ad69f8067582d2b98a3a9e630f6417453 (patch) | |
tree | b9ae4777572f7be17766b863890256d49a529d3f /extra/postfix/postfix.initd | |
parent | 73ccd8e83c26f7082bb2a4594f3887d482a8b71a (diff) | |
download | aports-d068780ad69f8067582d2b98a3a9e630f6417453.tar.bz2 aports-d068780ad69f8067582d2b98a3a9e630f6417453.tar.xz |
extra/postfix: new aport
Secure and fast drop-in replacement for Sendmail (MTA)
http://www.postfix.org/
Diffstat (limited to 'extra/postfix/postfix.initd')
-rw-r--r-- | extra/postfix/postfix.initd | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/extra/postfix/postfix.initd b/extra/postfix/postfix.initd new file mode 100644 index 00000000..b2396b3a --- /dev/null +++ b/extra/postfix/postfix.initd @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6.2.5,v 1.3 2008/08/18 14:18:40 falco Exp $ + +# If you plan to simultaneously use several Postfix instances, don't forget +# to specify your alternate_config_directories variable in your main main.cf file. +# Then make a symlink from /etc/init.d/postfix to /etc/init.d/postfix.alt, +# prepare your new /etc/postfix.alt environment, and at least change these working paths: +# queue_directory = /var/spool/postfix.alt +# data_directory = /var/lib/postfix.alt + +CONF_DIR="/etc/postfix" +CONF_OPT="${SVCNAME##*.}" +if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then + CONF_DIR="${CONF_DIR}.${CONF_OPT}" +fi + +opts="${opts} reload" + +depend() { + use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd + if [ "${SVCNAME}" = "postfix" ]; then + provide mta + fi +} + +start() { + ebegin "Starting postfix (${CONF_DIR})" + if [ ! -d ${CONF_DIR} ]; then + eend 1 "${CONF_DIR} does not exist" + return 1 + fi + /usr/sbin/postfix -c ${CONF_DIR} start >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping postfix (${CONF_DIR})" + /usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1 + eend $? +} + +reload() { + ebegin "Reloading postfix (${CONF_DIR})" + /usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1 + eend $? +} |