Re: [vchkpw] SMTP AUTH USING QMAIL + VCHKPW

2003-12-02 Thread X-Istence
Hélio Rubens Kamogawa wrote:

Hi all!

I am implementing smtp authentication. I've alredy applied the patch on 

qmail, and configured my supervise with the following:

snip
 

As you can see, the qmailduid and nofilesgid are both set to vpopmail 
uid and gid. That is what allows me to authenticate users using vchkpw. 
But at the same time, my qmail-smtpd run as vpopmail. That's a problem, 
once vpopmail can't write log (qmaill:nofiles) neither on the queue 
(qmailq:qmail), generating log entries like:
 

snip

Regards,

Hélio Rubens Kamogawa
Central Server
http://www.centralserver.com.br
[EMAIL PROTECTED]
+55 41 324-1993
 

Since qmail-pop3d runs as root to be able to use vchkpw i just run 
qmail-smtpd as root as well. Not a whole lot that can be done, other 
than possibly running the entire vpopmail setup under the qmail gid and uid.

X




Re: [vchkpw] SMTP AUTH USING QMAIL + VCHKPW

2003-12-02 Thread Alex Martin
Hello,

Just wondering, did you read this FAQ for smtp-auth?
http://members.elysium.pl/brush/qmail-smtpd-auth/faq.html

Mainly, about changing the permissions for vchkpw like so:
# chmod 4755 ~vpopmail/bin/vchkpw
# chown root.root ~vpopmail/bin/vchkpw

Also, why is your qmail-smtpd running as user vpopmail?
(Maybe because you changed the user so that it could run vchkpw without changing
the vchkpw permissions. ;)

In all the qmail+vpopmail setup guides I have seen, the qmail-smtpd process runs
as the qmaild user.
Here is one of my servers:

nitro:~# more /service/qmail-smtpd/run
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
if [ -z $QMAILDUID -o -z $NOFILESGID -o -z $MAXSMTPD ]; then
echo QMAILDUID, NOFILESGID, or MAXSMTPD is unset in
echo /var/qmail/supervise/qmail-smtpd/run
exit 1
fi
exec /usr/local/bin/softlimit -m 400 \
/usr/local/bin/tcpserver -H -v -R -l \
nitro.something.com -x /etc/tcp.smtp.cdb -c $MAXSMTPD \
-u $QMAILDUID -g $NOFILESGID 0 smtp \
/var/qmail/bin/qmail-smtpd nitro.something.com \
/home/vpopmail/bin/vchkpw /bin/true 21
#EOF

I think this may solve your problem,

Alex Martin
http://www.rettc.com


- Original Message - 
From: Hélio Rubens Kamogawa [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 12:46 PM
Subject: [vchkpw] SMTP AUTH USING QMAIL + VCHKPW


Hi all!

I am implementing smtp authentication. I've alredy applied the patch on
qmail, and configured my supervise with the following:

#!/bin/sh

QMAILDUID=`id -u vpopmail`
NOFILESGID=`id -g vpopmail`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
QMAILQUEUE=`cat /var/qmail/control/defaultqmailqueue`
exec /usr/local/bin/softlimit -m 1000 \
/usr/local/bin/tcpserver -v -R -H -l 0 -x /var/vpopmail/etc/tcp.smtp.cdb
-c $MAXSMTPD \
-u $QMAILDUID -g $NOFILESGID 0 smtp \
/var/qmail/bin/qmail-smtpd my.domain /var/vpopmail/bin/vchkpw  /bin/true
21

As you can see, the qmailduid and nofilesgid are both set to vpopmail
uid and gid. That is what allows me to authenticate users using vchkpw.
But at the same time, my qmail-smtpd run as vpopmail. That's a problem,
once vpopmail can't write log (qmaill:nofiles) neither on the queue
(qmailq:qmail), generating log entries like:

@40003fcce6c2292c90c4 warning: unable to stat mess/19/19

Does anyone have alredy done something like this? Can you tell me if
there is a way to call vchkpw with the qmaild user?

Regards,

Hélio Rubens Kamogawa
Central Server
http://www.centralserver.com.br
[EMAIL PROTECTED]
+55 41 324-1993