It's a longshot that anyone can help with this, but here goes. Sorry it's so longwinded.
I've been trying various ways to add SMTP authentication to my email server running qmail. I do not want a solution (patch or otherwise) that risks breaking my current qmail setup because it works great and I don't want it to be down. I had earlier posted for help on an SMTP proxy server solution, but I could not get it to work. So, yesterday I ran across Mailfront. This looks like a cool program. It basically provides a drop-in replacement for qmail-smtp, called smtpfront-qmail . Authentication is provided by a package called cvm . Anyways, with some fiddling I finally managed to get smtpfront-qmail working. If the client does not authenticate, it works just like qmail-smtp by disallowing relaying except FROM local addresses or TO hosts in the rcpthosts file. However, with smtpfront-qmail, if the client successfully authenticates, they are able to relay freely.
Here's my problem. Mailfront works with several mail clients I have tested, but I cannot get it to work with Openwebmail (version 2.30). When I try to send an email I get a message saying "Open WebMail Error: Couldn't open SMTP server 127.0.0.1:25!" . I get this message whether or not I have authentication turned on or off in Openwebmail (it should work both ways since Openwebmail is running locally (same box) as smtpfront-qmail/Mailfront/qmail). Openwebmail supports only PLAIN authentication and that's what I am using. I have a username and password in OWM's smtpauth.conf file. Interestingly, I know OWM is hitting smtpfront-qmail because I get a message like this in my smtpd logs on failed send attempts (this example is an email sent locally):
tcpserver: status: 0/20
tcpserver: status: 1/20
tcpserver: pid 14092 from 127.0.0.1
tcpserver: ok 14092 0:
127.0.0.1:25 localhost:127.0.0.1::34640
smtpfront-qmail[14092]: bytes in: 19 bytes out: 94
tcpserver: end 14092 status 0
tcpserver: status: 0/20
BTW,
A message sent successfully with smtpfront-qmail/Mailfront looks like this (not OWM, some other client):
tcpserver: status: 1/20
tcpserver: pid 2506 from 66.123.123.123
tcpserver: ok 2506 0:
192.168.0.10:25 some.domain.com:66.123.123.123::54137
smtpfront-qmail[2506]: MAIL FROM:<me@mydomain.com> SIZE=1618
smtpfront-qmail[2506]: RCPT TO:<you@yourdomain.com>
smtpfront-qmail[2506]: Accepted message qp 2507 bytes 1060
smtpfront-qmail[2506]: bytes in: 1052 bytes out: 212
tcpserver: end 2506 status 0
tcpserver: status: 0/20
Here's what a successful regular qmail-smtpd message sent with OWM looks like:
tcpserver: status: 0/20
tcpserver: status: 1/20
tcpserver: pid 1208 from 24.157.207.77
tcpserver: ok 1208 0:
192.168.0.10:25 somedomain.com:some ip address::some port
tcpserver: end 1208 status 0
tcpserver: status: 0/20
The only difference I see between the OWM failure (using smtpfront-qmail) and the OWM success (using qmail-smtpd) is the address of the outgoing server marked in red. But both 127.0.0.1 and 192.168.0.10 are local -- I don't see what difference that would make. Maybe that's a clue to the problem, but I do not know the solution.
Here's my new smtpfront-qmail run script (works with many clients except for sending with Open Webmail):
#!/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 $0: QMAILDUID, NOFILESGID, or MAXSMTPD is unset
exit 1
fi
exec \
/usr/local/bin/envdir /etc/smtpfront \
/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/smtpfront-qmail 2>&1
And here's my regular qmail-smtpd run script (works with all mail clients):
#!/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
Wow, this post is so long probably nobody will read it. Anyways, if anyone by chance can help, great. When I solve this I will post the solution. Many posts like this one have helped me in the past.
Thanks,
Apollo
PS. I cannot find good clear documentation on Mailfront. It looks like a great package. Author is Bruce Guenter. You'll find it at
http://untroubled.org/mailfront/ The site's own documentation assumes you have quite a high level of understanding -- more than I have. I did manage to sort it out in the end, but I still have this nagging OWM send problem. Not sure if the problem is OWM or Mailfront.