#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 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.4 2011/10/24 12:52:32 eras Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/postfix/files/postfix.rc6.2.7,v 1.2 2012/03/07 10:27:37 eras 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
+extra_started_commands="reload abort flush"
+description_reload="Re-read configuration files. Running processes terminate at their earliest convenience."
+description_abort="Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately."
+description_flush="Force delivery: attempt to deliver every message in the deferred mail queue."
+
+# Please read http://www.postfix.org/MULTI_INSTANCE_README.html for multi instance support
CONF_DIR="/etc/postfix"
CONF_OPT="${SVCNAME##*.}"
if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then
CONF_DIR="${CONF_DIR}.${CONF_OPT}"
fi
-
-extra_started_commands="reload"
+if [ "${CONF_DIR}" = "/etc/postfix" ]; then
+ CONF_PARAM=""
+ CONF_MESSAGE=""
+else
+ CONF_PARAM="-c ${CONF_DIR}"
+ CONF_MESSAGE="(${CONF_DIR})"
+fi
depend() {
- use logger dns ypbind amavisd mysql postgresql antivirus postfix_greylist net saslauthd
+ use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd
if [ "${SVCNAME}" = "postfix" ]; then
provide mta
fi
}
start() {
- ebegin "Starting postfix (${CONF_DIR})"
+ if [ ! -z "${CONF_PARAM}" ]; then
+ einfo "Please consider updating your config for postmulti support."
+ fi
+ ebegin "Starting postfix ${CONF_MESSAGE}"
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
+ /usr/sbin/postfix ${CONF_PARAM} start >/dev/null 2>&1
eend $?
}
stop() {
- ebegin "Stopping postfix (${CONF_DIR})"
- /usr/sbin/postfix -c ${CONF_DIR} stop >/dev/null 2>&1
- eend $?
+ ebegin "Stopping postfix ${CONF_MESSAGE}"
+ /usr/sbin/postfix ${CONF_PARAM} stop >/dev/null 2>&1
+ eend
+}
+
+status() {
+ local _retval
+ einfon ""
+ /usr/sbin/postfix ${CONF_PARAM} status
+ _retval=$?
+ if [ x${_retval} = 'x0' ]; then
+ mark_service_started "${SVCNAME}"
+ eend 0
+ else
+ mark_service_stopped "${SVCNAME}"
+ eend 3
+ fi
}
reload() {
- ebegin "Reloading postfix (${CONF_DIR})"
- /usr/sbin/postfix -c ${CONF_DIR} reload >/dev/null 2>&1
+ ebegin "Reloading postfix ${CONF_MESSAGE}"
+ /usr/sbin/postfix ${CONF_PARAM} reload >/dev/null 2>&1
+ eend $?
+}
+
+abort() {
+ ebegin "Aborting postfix ${CONF_MESSAGE}"
+
+ if service_started "${SVCNAME}"; then
+ mark_service_stopped "${SVCNAME}"
+ fi
+ /usr/sbin/postfix ${CONF_PARAM} abort >/dev/null 2>&1
+ eend $?
+}
+
+flush() {
+ ebegin "Flushing postfix ${CONF_MESSAGE}"
+ /usr/sbin/postfix ${CONF_PARAM} flush >/dev/null 2>&1
eend $?
}
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
-daemon_directory = /usr/lib64/postfix
+daemon_directory = /usr/libexec/postfix
# The data_directory parameter specifies the location of Postfix-writable
# data files (caches, random numbers). This directory must be owned
# the main.cf file, otherwise the SMTP server will reject mail for
# non-UNIX accounts with "User unknown in local recipient table".
#
-#mailbox_transport = lmtp:unix:/file/name
+# Cyrus IMAP over LMTP. Specify ``lmtpunix cmd="lmtpd"
+# listen="/var/imap/socket/lmtp" prefork=0'' in cyrus.conf.
+#mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
+#
+# Cyrus IMAP via command line. Uncomment the "cyrus...pipe" and
+# subsequent line in master.cf.
#mailbox_transport = cyrus
# The fallback_transport specifies the optional transport in master.cf
# html_directory: The location of the Postfix HTML documentation.
#
-html_directory = /usr/share/doc/postfix-2.8.9/html
+html_directory = /usr/share/doc/postfix-2.9.3/html
# manpage_directory: The location of the Postfix on-line manual pages.
#
# readme_directory: The location of the Postfix README files.
#
-readme_directory = /usr/share/doc/postfix-2.8.9/readme
+readme_directory = /usr/share/doc/postfix-2.9.3/readme
+inet_protocols = ipv4
home_mailbox = .maildir/
#dnsblog unix - - n - 0 dnsblog
#tlsproxy unix - - n - 0 tlsproxy
#submission inet n - n - - smtpd
+# -o syslog_name=postfix/submission
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - n - - smtpd
+# -o syslog_name=postfix/smtps
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
-# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
- -o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error