LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-01-2004, 01:52 PM   #1
Apollo77
Member
 
Registered: Feb 2003
Location: Toronto
Distribution: RH8 / FC1 / Gentoo / Debian / FreeBSD / Centos / Ubuntu
Posts: 182

Rep: Reputation: 35
Open Webmail / Mailfront / smtpfront-qmail / qmail-smtpd


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.
 
Old 12-06-2004, 10:38 AM   #2
Apollo77
Member
 
Registered: Feb 2003
Location: Toronto
Distribution: RH8 / FC1 / Gentoo / Debian / FreeBSD / Centos / Ubuntu
Posts: 182

Original Poster
Rep: Reputation: 35
Problem solved. Open Webmail didn't like this line in my run script:

/usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb \

Specifically it didn't like the value of 0 for the -l option. The tcpserver man pages indicate 0 is a valid and common value. Anyways I changed the line to this:

/usr/local/bin/tcpserver -v -R -l 127.0.0.1 -x /etc/tcp.smtp.cdb \

... and now it works with OWM.
 
Old 01-20-2009, 03:33 AM   #3
sunil_saini81
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
qmail-smtp logs

hello all


these are the logs of qmail-smtp/log


@400000004940d7ef2e9ae68c tcpserver: ok 4180 tiplmail2:127.0.0.1:900 :127.0.0.1::41892
@400000004940d7f40c47d25c tcpserver: end 4180 status 0
@400000004940d7f40c47da2c tcpserver: status: 0/40


i want tp format my logs in the following format.


@400000004940e10c367b2e84 tcpserver: status: 2/40
@400000004940e10c367b4dc4 tcpserver: pid 23952 from 202.33.96.24
@400000004940e10d14c8c33c tcpserver: ok 23952 tiplmail:192.168.10.45:25 inet-tsb5.toshiba.co.jp:202.33.96.24::37684
@400000004940e10e38285d9c Accept::RCPT::Rcpthosts_Rcptto: P:ESMTP S:202.33.96.24:inet-tsb5.toshiba.co.jp H:imx2.toshiba.co.jp F:david_low@tea.toshiba.co.jp T:arun.kumar@toshiba-india.com
@400000004940e10e38286954 Accept::RCPT::Rcpthosts_Rcptto: P:ESMTP S:202.33.96.24:inet-tsb5.toshiba.co.jp H:imx2.toshiba.co.jp F:david_low@tea.toshiba.co.jp T:yutaka.shinji@toshiba-india.com


Please help

i have worked out too much on this problem .

qmail-smtp log ile are default according to qmailrocks website


Please help me


thanks in advance
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qmail /service/qmail-send: unable to open supervise mangueJOE Linux - Networking 20 04-19-2016 11:27 PM
Need help with /var/qmail/supervise/qmail-smtpd/run coolamit78 Linux - Networking 4 02-02-2012 10:50 AM
qmail +qmail-qfilter + qmail-scanner-queue+qmail-user-masq.pl problem countcobolt Linux - Networking 0 07-08-2004 11:29 AM
Configuring qmail-smtpd tveiga Linux - Software 1 01-16-2004 03:17 PM
qmail help: where is the run script for qmail-smtpd? IceNineJon Linux - Software 2 12-03-2002 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration