Subject: qmail from pkgsrc
To: None <netbsd-help@netbsd.org>
From: Keith Mastin <kmastin@beechtree.ca>
List: netbsd-help
Date: 08/31/2002 18:12:50
Hello...

Installing qmail, going by the instructions in Life With Qmail.

If anyone has sucessfully installed qmail from the pkgsrc collection on 
1.5.2, I'de like to hear what your experiences were, and any gotchas. I 
looked through the archives with no luck on this.

There are files existing that the symlinks were supposed to create:

bash-2.05# ln -s .qmail-postmaster /var/qmail/alias/.qmail-mailer-daemon
ln: /var/qmail/alias/.qmail-mailer-daemon: File existsmail-mailer-daemon
(this is .qmail-mailer-daemon)

Also, although I don't have sendmail installed on this box, the 
/usr/sbin/sendmail file also exists, so I'm wondering if it wasn't 
installed by the pkgsrc.

There are no rc0.d etc, so this section of LWQ does not apply:
 ln -s /var/qmail/bin/qmailctl INITDIR/qmail
    ln -s ../init.d/qmail RCDIR/rc0.d/K30qmail
    ln -s ../init.d/qmail RCDIR/rc1.d/K30qmail
    ln -s ../init.d/qmail RCDIR/rc2.d/S80qmail
    ln -s ../init.d/qmail RCDIR/rc3.d/S80qmail
    ln -s ../init.d/qmail RCDIR/rc4.d/S80qmail
    ln -s ../init.d/qmail RCDIR/rc5.d/S80qmail
    ln -s ../init.d/qmail RCDIR/rc6.d/K30qmail

The first link already exists.
bash-2.05# ln -s /var/qmail/bin/qmailctl /etc/rc.d/qmail
ln: /etc/rc.d/qmail: File exists

I had a problem with /service, so I had to mkdir /service.

I created the qmailctl file and made the links. 

When I do qmailctl start, I get:
/usr/bin/qmailctl: 106: Syntax error: end of file unexpected (expecting 
";;")

bash-2.05# vi +106 /usr/bin/qmailctl
-c option, 1: Illegal address: only 105 lines in the file
Press Enter to continue: 

The last few lines of qmailctl:
 "Usage: $0 
{start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"
    exit 1
    ;;
esac

exit 0


...so I added ;; after Exit 0, and get:
bash-2.05# vi +107 /usr/bin/qmailctl
-c option, 1: Illegal address: only 106 lines in the file
Press Enter to continue:

... going around in circles here... I actualy played this game till line 
113 :), then undid all the ;;'s that I added.

... abandoning resolving the qmailctl file came back to haunt me:

bash-2.05# qmailctl stat
/usr/bin/qmailctl: 106: Syntax error: end of file unexpected (expecting 
";;")

The qmailctl file is still not working...

Trying a different approach.
When I do /etc/rc.d/qmail start, I get:
/etc/rc.d/qmail: WARNING: /var/qmail/control/me is not readable.

There is no me file in /var/qmail/control

I did this to solve it:

touch /var/qmail/control/me
/etc/rc.d/qmail start
bash-2.05# status: local 0/10 remote 0/20

Cannot yet telnet into the box on port 25:

[kmastin@spy kmastin]$ telnet 192.168.0.177 25
Trying 192.168.0.177...
telnet: connect to address 192.168.0.177: Connection refused

I might just forget about pkgsrc and install from sources. This isn't 
working.

Regards,
-- 
Keith Mastin       BeechTree Information Technology Services Inc.
137 Laird Drive    Toronto    M4G 3V5     http://www.beechtree.ca
  (416)696-6070      Fax(416)696-6072      kmastin@beechtree.ca