Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

qmail/sendmail help

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
I have installed qmail. I am using the book "Running qmail" along the way. I am now finding this error when I boot up:

Code:
Nov 25 05:12:46 scout sendmail: sendmail: usage: sendmail [ -t ] [ -fsender ] [ -Fname ] [ -bp ] [ -bs ] [ arg ... ]
Nov 25 05:12:46 scout sendmail: sendmail startup failed

Any ideas as to why I am getting this error?

Even better, how can I fix it?

Thanks.
 
I believe qmail says to uninstall sendmail before you build it. The two may be getting into a little tiff.
 
They were working until I did this:

Code:
mv /usr/sbin/sendmail /usr/sbin/sendmail.original
mv /usr/lib/sendmail /usr/lib/sendmail.original

then:

Code:
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

By the book, this is done so you can go back to sendmail if you decide to later.
 
It looks like you're making a symbolic link to a file that has been moved (renamed actually). The ln command requires that the target exists. Did you check to see if the link was created properly? And did you setup sendmail so it doesn't load at boot up?
 
I have now uninstalled sendmail using rpm -e --nodeps sendmail

Here is the problem now (not verbatim --I can't find anything in the logs):

Code:
Starting keytable...
/etc/rc.d/rc3.d/S81qmail:Permission denied

Permissions are correct, root is owner.
 
Look at /etc/rc.d/rc3.d/s81qmail and see if it's a symbolic link. If it is, check permissions. Try starting qmail as root. If it starts ok, then the problem is with xinetd or what ever is calling qmail not having permission to execute it. If all checks out ok, I would check to see what owner AND group qmail needs to run under. Check the directory properties also. If one doesn't have permission for the directory, it doesn't matter how the file permissions are set.
 
Now on boot, I get an error to the effect of "unexpected error at line 14... stop..."

Is there anything wrong with my startup script (from the SAMS book, Running qmail):

Code:
#!/bin/sh

PATH=/var/qmail/bin
export PATH

#Check that qmail is loaded
[ -f /var/qmail/bin/qmail-start ] || exit 0

case "$1" in
  start)
        echo -n "Starting qmail..."
        daemon /var/qmail/rc

  stop)
        echo -n "Stopping qmail..."
        killall qmail-send

  restart)
        $0 stop
        $0 start

  *)
        echo -n "Usage: $0 {start|stop|restart}"
        exit 1
esac

exit 0
 
It's very hard for me to tell. The font on my display is for the birds and I'm not much of a shell script kinda guy. However, Here's how it looks to me. After the shabang it sets the path to the qmail executable. Then it loads qmail or exits with zero if it fails. The 'case' gets ignored for the time being because '$1' doesn't have a value yet. Then it is supposed to prompt you for a choice of start , stop or restart. When you enter your answer, '$1" now has a value and it does 'case'. If you choose restart, it simply does both stop and start. If you answer anything but start stop or restart, it drops to the default '*' which prompts you with the choices again. Here's the rub. The script is trying to do 'restart' and when it comes to '$0 stop' it doesn't know what to do. This is where my stupidity comes in. If I couldn't figure out the problem with the script. I would just type the 2 lines that start it at the command line. For example: '/var/qmail/bin/qmail-start' and 'daemon /var/qmail/rc'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top