[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding additional postfix server to init daemon



On Thu, 2006-11-30 at 18:23 -0800, Adam D wrote:
> I just have created additional postfix servers on the mail server and
> would like to add the additional configs into the init daemon but
> looking at the scrip from LaMont Jones I am not able to decipher where
> to put the additional servers.  I have an old script which is shorter
> and does not have a lot of the extra codes as the newest one.  
> 
> Does anyone have an idea as to add additional postfix servers?  I am a
> bit perplexed.
> 
> Thanks,
> 
> -Adam
> 

Do I understand you correctly that you're running two (or more)
instances of postfix?

This is what I use on Sarge for two instances.  It's easily expandable
to handle more.  You'll see the config dir for the second instance
is /etc/postfix-out:

#!/bin/sh
#
# Start or stop TWO Postfix Instances
# Assumes first instance config files are in /etc/postfix
# and second instance files are in /etc/postfix-out
#
# For Debian Linux 3.0.
#

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/postfix
NAME=Postfix

case "$1" in
    start)
        echo -n "Starting mail transport agent: Postfix"

        $DAEMON start 2>&1 |
                (grep -v 'starting the Postfix' 1>&2 || /bin/true)
        echo "."
        echo -n "Starting mail transport agent: Postfix-out"

        $DAEMON -c /etc/postfix-out start 2>&1 |
                (grep -v 'starting the Postfix' 1>&2 || /bin/true)
        echo "."
    ;;

    stop)
        echo -n "Stopping mail transport agent: Postfix"
        $DAEMON stop 2>&1 |
                (grep -v 'stopping the Postfix' 1>&2 || /bin/true)
        echo "."
        echo -n "Stopping mail transport agent: Postfix-out"
        $DAEMON -c /etc/postfix-out stop 2>&1 |
                (grep -v 'stopping the Postfix' 1>&2 || /bin/true)
        echo "."
    ;;

    restart)
        $0 stop
        $0 start
    ;;
    *)
        echo "Usage: /etc/init.d/postfix {start|stop|restart}"
        exit 1
    ;;
esac

exit 0



Reply to: