Re: mail confusion

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

 



On Mon, 2005-11-07 at 23:47 -0600, Robert Nichols wrote: 
> Jay Moore wrote:
> > Bottom Line: Having found this trove of knowledge, I *think* my best
> > course of action is to fix (right after I find it) the sendmail startup
> > to remove the "-bd" option, 
> 
> Fine.  Just don't bother others with complaints when mail within your
> own system (e.g., mail from cron jobs, mail from logwatch, etc.)
> just sits in /var/spool/clientmqueue and is never delivered. 

!?! Are you saying that running sendmail without "-bd" will cause this?

According to the "sendmail Cookbook", "-bd" should not be used except
for mail servers. Ref Chap. 10, "Securing sendmail". 

> FWIW, sendmail is a service started by 'init' in run levels 2-5.  The
> files and links controlling that are in /etc/rc.d/init.d and
> /etc/rc.d/rc?.d .  Unless you've changed the default setup, sendmail
> accept connections only from 127.0.0.1 .

As I stated previously, I have *not* changed my default setup for
running sendmail. And pardon my bitching, but why the f**k do I have to
hack a shell script to change the startup behavior? IMHO, this is BFU.
Here's what I find in /etc/rc.d/init.d/sendmail... how would you suggest
I change this?

[jamoore@aria ~]$ cat /etc/rc.d/init.d/sendmail
#!/bin/bash
#
# sendmail      This shell script takes care of starting and stopping
#               sendmail.
#
# chkconfig: 2345 80 30
# description: Sendmail is a Mail Transport Agent, which is the program
\
#              that moves mail from one machine to another.
# processname: sendmail
# config: /etc/mail/sendmail.cf
# pidfile: /var/run/sendmail.pid

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

# Source networking configuration.
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network

# Source sendmail configureation.
if [ -f /etc/sysconfig/sendmail ] ; then
        . /etc/sysconfig/sendmail
else
        DAEMON=no
        QUEUE=1h
fi
[ -z "$SMQUEUE" ] && SMQUEUE="$QUEUE"
[ -z "$SMQUEUE" ] && SMQUEUE=1h

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

[ -f /usr/sbin/sendmail ] || exit 0

RETVAL=0
prog="sendmail"

start() {
        # Start daemons.

        echo -n $"Starting $prog: "
        if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
          make all -C /etc/mail -s > /dev/null
        else
          for i in virtusertable access domaintable mailertable ; do
            if [ -f /etc/mail/$i ] ; then
                makemap hash /etc/mail/$i < /etc/mail/$i
            fi
          done
        fi
        /usr/bin/newaliases > /dev/null 2>&1
        daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd) \
                        $([ -n "$QUEUE" ] && echo -q$QUEUE)
$SENDMAIL_OPTARG
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail

        if ! test -f /var/run/sm-client.pid ; then
        echo -n $"Starting sm-client: "
        touch /var/run/sm-client.pid
        chown smmsp:smmsp /var/run/sm-client.pid
        if [ -x /usr/bin/selinuxenabled ] && /usr/bin/selinuxenabled;
then
            /sbin/restorecon /var/run/sm-client.pid
        fi
        daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac
\
                        -q $SMQUEUE $SENDMAIL_OPTARG
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client
        fi

        return $RETVAL
}


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux