LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Boot slow in starting sendmail (https://www.linuxquestions.org/questions/fedora-35/boot-slow-in-starting-sendmail-577507/)

shsir 08-16-2007 06:00 AM

Boot slow in starting sendmail
 
When I boot my fc7 every time. Coming to Starting sendmail and will stay here several minutes. What can I do to reduce the boot time.

Lenard 08-16-2007 06:23 AM

Are you using sendmail??? if not then; chkconfig --levels 345 sendmail off

artiomix 08-16-2007 10:16 AM

Do you use sendmail as an SMTP server? If not, just remove it at all by command:

su -c 'yum remove sendmail -y'

shsir 08-17-2007 12:10 AM

Thanks Lenard. Now it's OK.I use
Code:

chkconfig --levels 345 sendmail off
sendmail is off at starting. And I think when I want to use it again,I can use
Code:

chkconfig --levels 345 sendmail on

shsir 08-17-2007 01:11 AM

Advance,I want to know why the sendmail is so slow, I open the bash script : /etc/rc.d/init.d/sendmail ,like this
Code:

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/sbin/selinuxenabled ] && /usr/sbin/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
}

I find every time it will do make,
Code:

        if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
          make all -C /etc/mail -s > /dev/null

I think it's the reason of boot slow. I can't sure the script is good one but it's fedora 7 default. Can we change it better and make boot faster?

Lenard 08-17-2007 06:54 AM

Once sendmail is configured it is fast, unless you are running an email server you do not need it.
Many desktop and laptop users do not need or use it., but if your interested then visit;

http://tldp.org/

And review documentation like:
Quote:

Mail-Administrator-HOWTO, The Linux Electronic Mail Administrator HOWTO

Updated: Jan 2000. Describes the setup, care and feeding of Electronic Mail (e-mail) under Linux. Primarily intended for administrators.

Mail-Queue, Linux Mail-Queue mini-HOWTO

Updated: Dec 2001. Configuration changes necessary to make sendmail deliver local mail now; while stashing remote mail in the queue until "I Say So".

Mail-User-HOWTO, The Linux Mail User HOWTO

Updated: Feb 2003. An introduction to the world of electronic mail (email) under Linux. Focuses on user-level issues and typical configurations for Linux home and small-business machines connected to the net via an ISP.

livetoday 08-17-2007 07:06 AM

I faced this problem once and it is resolved once I put the hostname entry in /etc/hosts file alongwith the system IP. The issue was occuring due to incorrect hostname resolution.

Quote:

Originally Posted by Lenard (Post 2861867)
Once sendmail is configured it is fast, unless you are running an email server you do not need it.
Many desktop and laptop users do not need or use it., but if your interested then visit;

http://tldp.org/

And review documentation like:


unSpawn 08-17-2007 07:28 AM

Quote:

Originally Posted by livetoday (Post 2861872)
I faced this problem once and it is resolved once I put the hostname entry in /etc/hosts file alongwith the system IP. The issue was occuring due to incorrect hostname resolution.

True, it's real classic and always the first file to look at when it won't start quickly.

shsir 08-17-2007 10:27 AM

Yes, I opened the file /etc/hosts. Then I found one line
Code:

192.168.0.10 myhost
It is added before by myself when I configed my network. I added '#' at the header. Now sendmail start quickly.

Thanks everyone!


All times are GMT -5. The time now is 08:56 PM.