LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-02-2002, 06:20 PM   #1
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Rep: Reputation: 15
sendmail


I followed all the proper steps to install sendmail. I have a sendmail binary in /usr/sbin and my config file is in /ect/mail , but sendmail still won't run. I setup a user and group smmsp and set all the permissions properly. My system gives me this warning when I shutdown: WARNING: Mail Transfer Agent sendmail not installed. What is going on?? How do I start sendmail?
 
Old 03-02-2002, 08:12 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
It is started in the init scripts, what distro are you using?
 
Old 03-03-2002, 05:41 AM   #3
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
that's what I figured

Ya, that's what I figured, but there was no init script created for it on installation. How would I go about creating one? My distro is Caldera OpenLinux 2.4 I figured that there should be an init script in init.d on my system it is /etc/rc.d/init.d but nothing is there for it. I figured that maybe it was becuase the installation script couldn't find the init.d directory so I made a symlink /etc/init.d to my init.d directory and reinstalled, but it still didn't create any script for it.

Last edited by islandkid; 03-03-2002 at 05:44 AM.
 
Old 03-03-2002, 05:59 PM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
contents of /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/sendmail.cf
# pidfile: /var/run/sendmail.pid

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

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

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

# 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: "
/usr/bin/newaliases > /dev/null 2>&1
if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
make -C /etc/mail -q
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
daemon /usr/sbin/sendmail $([ "$DAEMON" = yes ] && echo -bd) \
$([ -n "$QUEUE" ] && echo -q$QUEUE)
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
return $RETVAL
}

stop() {
# Stop daemons.
echo -n $"Shutting down $prog: "
killproc sendmail
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/sendmail ]; then
stop
start
RETVAL=$?
fi
;;
status)
status sendmail
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

exit $RETVAL
--------------------------------------------------------------------------

contents of /etc/sysconfig/sendmail

DAEMON=yes
QUEUE=1h


--------------------------------------------------------------------------

you will need to link to the init.d/sendmail in your /rc2.d /rc3.d /rc4.d and rc5.d folders using a link named S80sendmail.

And a link to init.d/sendmail in your /rc1.d and rc6.d folders using a link named K30sendmail


these links will start sendmail in levels 2,3,4 and 5 and kill it in levels 1 and 6




these scripts are for redhat 7.2 so yours may need to be somewhat different paths or filenames.
 
Old 03-03-2002, 07:19 PM   #5
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
great thanks, but this mail script won't run for some reason. When I list it, it shows up black while the rest of the scripts in /etc/rc.d/init.d show up green and when I try to run it, it just gives me a 'bash: ./sendmail: Permission denied'

Last edited by islandkid; 03-03-2002 at 07:43 PM.
 
Old 03-03-2002, 08:20 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
it needs to be chmoded
mine is like this

ls -l /etc/rc.d/init.d/sendmail
-rwxr-xr-x 1 root root 1830 Aug 31 2001 /etc/rc.d/init.d/sendmail

chmod 755 filename
 
Old 03-03-2002, 09:55 PM   #7
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
it's working now thanks!
 
Old 03-03-2002, 09:55 PM   #8
islandkid
Member
 
Registered: Mar 2002
Location: Victoria, BC, Canada
Distribution: None (www.linuxfromscratch.org)
Posts: 103

Original Poster
Rep: Reputation: 15
Thumbs up

it's working now. thanks!
 
Old 03-03-2002, 10:21 PM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
your welcome
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail ignores my sendmail smarthost entry Paul_assheton Linux - General 1 03-17-2009 08:55 AM
FC4 and Sendmail - Cannot create sendmail.pem Balderayne Linux - Security 2 11-09-2005 03:55 PM
php+ sendmail no good - python + sendmail ok nephish Linux - Networking 1 10-07-2005 02:19 PM
Sendmail - RunAsUser=sendmail:mail/What files to i have to change ForumKid Linux - Security 45 01-18-2002 12:47 PM
sendmail (dont just ignore it 'cause its got sendmail in the subject :P) GnomeKing Linux - Networking 1 11-12-2001 10:57 PM


All times are GMT -5. The time now is 02:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration