Bluehost.com Web Hosting $6.95

Re: Worried about Postfix startup (new install)

This is a discussion on Re: Worried about Postfix startup (new install) within the mailing.postfix.users forums, part of the Mail Servers and Related category; dalive@flashmail.com (DALive Editor) writes: > I just installed Postfix, I had erased my pervious Sendmail rpm > installtion ...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-04-2004
Simon J Mudd
 
Posts: n/a
Default Re: Worried about Postfix startup (new install)

dalive@flashmail.com (DALive Editor) writes:

> I just installed Postfix, I had erased my pervious Sendmail rpm
> installtion to the best of my knowledge. The init.d startup script for
> Sendmal stayed behind. I installed Postfix from source,
> successfully. I later shutdown my server, before I even really started
> palyin with postfix. On bootup I realise that Postfix is running,
> becuase the root has mail. '$ service sendmail start' works. However
> '$ service sendmail stop' does not. Can anyone explain to me how
> Postfix got started? And also where can I find a sample Postfix init.d
> startup script. I may have missed reference to one in that INSTALL
> file if there was any such reference.


The enclosed file is what is included in my rpm. It should do what you
want. Install it as /etc/rc.d/init.d/postfix and works on rh5-9 and
other distributions.

#!/bin/sh
#
# postfix Postfix Mail Transfer Agent
#
# chkconfig: 2345 80 30
# description: Postfix is a Mail Transport Agent, which is the program \
# that moves mail from one machine to another.
# processname: master
# pidfile: /var/spool/postfix/pid/master.pid
# config: /etc/postfix/main.cf
# config: /etc/postfix/master.cf
#
# $Revision: 2.1.2.1 $
#
# Written by Package Author: Simon J Mudd <sjmudd@pobox.com>
# 25/02/99: Mostly s/sendmail/postfix/g by John A. Martin <jam@jamux.com>
# 23/11/00: Changes & suggestions by Ajay Ramaswamy <ajayr@bigfoot.com>
# 20/01/01: Changes to fall in line with RedHat 7.0 style
# 23/02/01: Fix a few untidy problems with help from Daniel Roesen.

# Source function library.
.. /etc/rc.d/init.d/functions

# Source networking configuration.
.. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -x /usr/sbin/postfix ] || exit 0
[ -d /etc/postfix ] || exit 0
[ -d /var/spool/postfix ] || exit 0

RETVAL=0

start() {
# Start daemons.
echo -n "Starting postfix: "
/usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/postfix
echo
return $RETVAL
}

stop() {
# Stop daemons.
echo -n "Shutting down postfix: "
/usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/postfix
echo
return $RETVAL
}

reload() {
echo -n "Reloading postfix: "
/usr/sbin/postfix reload 2>/dev/null 1>&2 && success || failure
RETVAL=$?
echo
return $RETVAL
}

restart() {
stop
start
}

abort() {
/usr/sbin/postfix abort 2>/dev/null 1>&2 && success || failure
return $?
}

flush() {
/usr/sbin/postfix flush 2>/dev/null 1>&2 && success || failure
return $?
}

check() {
/usr/sbin/postfix check 2>/dev/null 1>&2 && success || failure
return $?
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
abort)
abort
;;
flush)
flush
;;
check)
check
;;
status)
status master
;;
condrestart)
# don't use /var/lock/subsys/postfix, check for postfix running directly
daemon_directory=$(postconf -h daemon_directory)
$daemon_directory/master -t 2>/dev/null && : || restart
;;
*)
echo "Usage: postfix {start|stop|restart|reload|abort|flush|check|statu s|condrestart}"
exit 1
esac

exit $?
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:34 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0