From: fbrehm Date: Tue, 14 Aug 2012 17:21:34 +0000 (+0200) Subject: saving uncommitted changes in /etc prior to emerge run X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=88b306587ff8fa54bb387fe4a220360af822bfe9;p=config%2Fsamara%2Fetc.git saving uncommitted changes in /etc prior to emerge run --- diff --git a/init.d/postfix b/init.d/postfix index b62bb7f..aecd8e7 100755 --- a/init.d/postfix +++ b/init.d/postfix @@ -1,48 +1,86 @@ #!/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 $? } diff --git a/postfix/main.cf b/postfix/main.cf index 8526cf2..60def99 100644 --- a/postfix/main.cf +++ b/postfix/main.cf @@ -39,7 +39,7 @@ command_directory = /usr/sbin # 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 @@ -458,7 +458,12 @@ unknown_local_recipient_reject_code = 550 # 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 @@ -635,7 +640,7 @@ setgid_group = postdrop # 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. # @@ -648,5 +653,6 @@ sample_directory = /etc/postfix # 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/ diff --git a/postfix/master.cf b/postfix/master.cf index be33f75..90ad69a 100644 --- a/postfix/master.cf +++ b/postfix/master.cf @@ -14,11 +14,13 @@ smtp inet n - n - - smtpd #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 @@ -38,9 +40,7 @@ flush unix n - n 1000? 0 flush 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