LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Adding SMTP AUTH to qmail (https://www.linuxquestions.org/questions/linux-software-2/adding-smtp-auth-to-qmail-260646/)

Apollo77 11-29-2004 04:18 PM

Adding SMTP AUTH to qmail
 
I have an email server that runs qmail. I am trying to add smtp auth to it according to this method:

http://wwww.suspectclass.com/~sgiffo...tp_auth.README

It's an interesting approach that avoids changes to qmail-smtpd.

To be honest, I do not really know what I am doing, but I have followed the instructions and installed the necessary software with no problems. However, I am having trouble modifying my run file for qmail-smtpd. I have tried several things, but the modified run file doesn't work. Here is what needs to be added on the exec line before qmail-smtpd:

smtp_auth \
checkpassword_nosu \
setuidgid qmaild \
smtpproxy \

And here is my normal run file for qmail-smtpd:
------------------
#!/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 2000000 \
/usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
rblsmtpd \
-r sbl-xbl.spamhaus.org \
/var/qmail/bin/qmail-smtpd 2>&1

------------------------
Can anyone suggest how I modify my run file?

Thanks,
Apollo

Apollo77 11-29-2004 04:20 PM

Whoops, got an extra character in that url. It should be:

http://www.suspectclass.com/~sgiffor...tp_auth.README

petterg 11-29-2004 04:59 PM

I got a patch for qmail-smtp-auth. Can't remember what it was called. Then the only change I had with config was the /var/qmail/control/conf-smtpd.
At the end I added this:
Code:

QMAIL_SMTP_AUTHHOST=$(<${QMAIL_CONTROLDIR}/me)
[ -z "${QMAIL_SMTP_POST}" ] && QMAIL_SMTP_POST=/bin/true
#QMAIL_SMTP_CHECKPASSWORD="/bin/cmd5checkpw"
QMAIL_SMTP_CHECKPASSWORD="/var/vpopmail/bin/vchkpw"
QMAIL_SMTP_POST="${QMAIL_SMTP_AUTHHOST} ${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP_POST}"

Basically what it does is to prepend
"mail.mydomain.com /var/vpopmail/bin/vchkpw /bin/true" to the QMAIL_SMTP_POST variable.

/var/vpopmail/bin/vchkpw is the binary that will check passwords. I use virtual domains - hence the vpopmail pwdcheck.

Here's the list of all patches in the qmail-1.03-r15 package for gentoo. I use all of this patches. You'll be comfortable with the syntax once you look at it.
http://gentoo-portage.com/ebuild?e=m....03-r15.ebuild


All times are GMT -5. The time now is 06:19 PM.