I have patched my qmail to use the qmail-smtpd-chkusr functionality (on rcpt
to: check to see if a user exists on the mail server and if the user doesn't
send a 550).

I have tested the functionality of qmail-smtpd (compiled with this patch and
a couple others) and it works when I run it from the command line.

My problem is when I run it from the tcpserver/supervise script the
functionality doesn't work.

I have managed to get it working by altering the -u and -g on the tcpserver
command line to be root. When I do that it works flawlessly. It also works
if I set the uid to root and set the gid to qmaild.

My question (and I suppose directed at tonix):

How can I get this to run with the proper user and group permissions of
qmaild?

Here are some of the details of my installation.

/usr/bin/id -g qmaild
81
cat /etc/group |grep 81
qnofiles:*:81:

./supervise/smtp/run

#!/bin/sh
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
QMAILUID=0
#NOFILESGID=0
#QMAILUID=`/usr/bin/id -u qmaild`
NOFILESGID=`/usr/bin/id -g qmaild`

exec softlimit -m 8000000 tcpserver -v -c 384 -p -R -x
/usr/home/vpopmail/etc/tcp.smtp.cdb -u $QMAILUID -g $NOFILESGID 0 25
rblsmtpd -b -r relays.osirusoft.com -r relays.ordb.org fixcrio qmail-smtpd
mail.ala.net /usr/home/vpopmail/bin/vchkpw /usr/bin/true 2>&1

permissions on qmail-smtpd:
-rwxr-xr-x  1 root    qmail  128528 Jun  5 16:26 qmail-smtpd

I am assuming it has something to do with the setuid that the patch does,
but I am unsure.

Any pointers?

Tom Walsh
Network Admin
http://www.ala.net/



Reply via email to