RE: [vchkpw] Help needed with 5.7.1 rcpthosts problem

2003-11-22 Thread Shane Chrisp
Try changing the user that the qmail-smtpd is running as to the
vpopmail:vchkpw user.
If your running roaming users, the system wont have permissions to read the
cdb
as qmaild.

Shane

-Original Message-
From: Tom Williams [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 22 November 2003 11:37 PM
To: [EMAIL PROTECTED]
Subject: [vchkpw] Help needed with 5.7.1 rcpthosts problem


Hi!  I've got Qmail 1.03 and Vpopmail 5.3.28 running on a 
RedHat 9 Linux 
box.  I've got several virtual hosts defined through Vpopmail.  I can 
login via POP3 and read my mail, but I can't send any mail via SMTP 
since I get the 5.7.1 error which indicates the domain isn't in the 
rcpthosts file.

My /var/qmail/control/rcpthosts file does contain all of my virtual 
domains, so I don't get what the problem is.  I've got vpopmail 
configured to support roaming users and my 
/home/vpopmail/etc/open-smtp 
and /home/vpopmail/etc/tcp-smtp files (including the .cdb file) are 
present:

[EMAIL PROTECTED] control]# cd /home/vpopmail/etc
[EMAIL PROTECTED] etc]# dir -l
total 20
-rw-r--r--1 vpopmail vchkpw 25 Oct 18 11:11 inc_deps
-rw-r--r--1 vpopmail vchkpw 48 Oct 18 11:11 lib_deps
-rw-r--r--1 root root   57 Nov 21 19:47 open-smtp
-rw-r--r--1 root root0 Nov 21 19:47 open-smtp.lock
-rw-r--r--1 vpopmail vchkpw 73 Nov 21 00:46 tcp.smtp
-rw-r--r--1 root root 2170 Nov 21 00:48 tcp.smtp.cdb
[EMAIL PROTECTED] etc]#

I've got clearopensmtp scheduled to run hourly.

I've been scouring mailing list archives, FAQs, and just about 
anything 
else I could find to see if I could figure out what's going on.  I 
_have_ discovered I'm getting these messages in my 
/var/log/qmail/qmail-smtpd/current log:

@40003fbdd4ed23287ef4 tcpserver: fatal: unable to bind: address 
already used

So, I tried to figure out what was grabbing port 25, thus preventing 
qmail-smtpd from grabbing that port.  What I've discovered is 
for _some_ 
strange reason, when the /service/qmail-smtpd/run script runs, 
something 
goes wrong and tcpserver becomes a zombie and holds on to port 25:

6650 ?S  0:00 [tcpserver]
6684 ?S  0:00 /usr/local/bin/tcpserver -l 
mydomain.com -H -R 
0 pop3 /var/qmail/bin/qmail-popup mydomain.com 
/home/vpopmail/bin/vchkpw 
/var/qmail/bin/qmail-pop3d Maildir

[EMAIL PROTECTED] qmail-smtpd]# lsof -i :25
COMMANDPID   USER   FD   TYPE DEVICE SIZE NODE NAME
tcpserver 6650 qmaild3u  IPv4 404506   TCP *:smtp (LISTEN)
[EMAIL PROTECTED] qmail-smtpd]#


Here is my /server/qmail-smtpd/run file:

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
export PATH=/var/qmail/bin:/usr/local/bin:$PATH
exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -l mydomain.com -H -R -x 
/home/vpopmail/etc/tcp.smtp.cdb \
-u$QMAILDUID -g$NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd 21  
/dev/null
[EMAIL PROTECTED] qmail-smtpd]#

At this point, I'm totally stumped as to what could be wrong.  I can 
send mail when connecting through a Courier IMAP 2.1.2 server that's 
running (accessed via SquirrelMail) and I can receive messages 
via POP3 
but I just can't send messages from remote machines via SMTP.  I don't 
know if this is related to Vpopmail or Qmail, so I'm starting here. 

*Any* help that could be provided would be greatly appreciated. 

Thanks in advance for your help! 

Peace...

Tom







Re: [vchkpw] Help needed with 5.7.1 rcpthosts problem

2003-11-22 Thread Tom Collins
On Saturday, November 22, 2003, at 08:37  AM, Tom Williams wrote:
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
export PATH=/var/qmail/bin:/usr/local/bin:$PATH
exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -l mydomain.com -H -R -x 
/home/vpopmail/etc/tcp.smtp.cdb \
-u$QMAILDUID -g$NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd 21  
/dev/null
[EMAIL PROTECTED] qmail-smtpd]#
Your softlimit looks low.  I've used 6MB in the past (I currently use a 
huge number due to inefficient virus scanning by clamdmail).

You might need to manually kill the zombie process before trying to 
restart qmail.

If you're using the qmail SMTP AUTH patch, you're missing command-line 
options to qmail-smtpd.

--
Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/



Re: [vchkpw] Help needed with 5.7.1 rcpthosts problem

2003-11-22 Thread Tom Williams
Shane Chrisp wrote:

Try changing the user that the qmail-smtpd is running as to the
vpopmail:vchkpw user.
If your running roaming users, the system wont have permissions to read the
cdb
as qmaild.
Shane
 

Thanks for the tip.  I'll give that a try.  I would think with the 
/home/vpopmail/etc/tcp.smtp.cdb file having 744 permissions, qmail-smtpd 
would be able to access the file just fine.

I'll give it a whirl and see what happens!  :)  By the way, I've just 
noticed the /home/vpopmail/etc/tcp.smtp.cdb file isn't being 
automatically updated as clearopensmtp runs:

[EMAIL PROTECTED] qmail-smtpd]# dir -l /home/vpopmail/etc
total 20
-rw-r--r--1 vpopmail vchkpw 25 Oct 18 11:11 inc_deps
-rw-r--r--1 vpopmail vchkpw 48 Oct 18 11:11 lib_deps
-rw-r--r--1 root root   57 Nov 22 08:08 open-smtp
-rw-r--r--1 root root0 Nov 22 08:08 open-smtp.lock
-rw-r--r--1 vpopmail vchkpw 73 Nov 21 00:46 tcp.smtp
-rw-r--r--1 root root 2170 Nov 21 00:48 tcp.smtp.cdb
[EMAIL PROTECTED] qmail-smtpd]#
See how my open-smtp file is dated 11/22, yet tcp.smtp.cdb is dated 
11/21.  Does that mean things are more seriously hosed than I had thought?

Thanks...

Peace...

Tom



Re: [vchkpw] Help needed with 5.7.1 rcpthosts problem

2003-11-22 Thread Tom Williams
Tom Collins wrote:

On Saturday, November 22, 2003, at 08:37  AM, Tom Williams wrote:

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
export PATH=/var/qmail/bin:/usr/local/bin:$PATH
exec /usr/local/bin/softlimit -m 200 \
/usr/local/bin/tcpserver -l mydomain.com -H -R -x 
/home/vpopmail/etc/tcp.smtp.cdb \
-u$QMAILDUID -g$NOFILESGID 0 smtp /var/qmail/bin/qmail-smtpd 21  
/dev/null
[EMAIL PROTECTED] qmail-smtpd]#


Your softlimit looks low.  I've used 6MB in the past (I currently use 
a huge number due to inefficient virus scanning by clamdmail).

You might need to manually kill the zombie process before trying to 
restart qmail.

If you're using the qmail SMTP AUTH patch, you're missing command-line 
options to qmail-smtpd.

Thanks for the info.  I'll see about increasing the softlimit.   As for 
the zombies, this is what I've been doing.  I issue the 
/etc/init.d/qmail stop command to stop Qmail.  (I can post that script 
here if needed)  Then I remove the entries in /service/ and then I 
manually kill off any remaining tcpserver zombies and any remaining 
supervise qmail-smtpd or supervise qmail-pop3d process so there's 
NOTHING running except supervise and the related daemontools.

Then when I restore the contents of /service/, with this command:

# ln -s /var/qmail/supervise/* /service/

The tcpserver processes start up and I immediately get the qmail-smtpd problem as that tcpserver process becomes a zombie.  :(

I have NOT applied the qmail SMTP AUTH patch since I didn't know it existed.

I used Adam McKenna's HOWTO to install and configure qmail

http://www.flounder.net/qmail/qmail-howto.html

Thanks...

Peace...

Tom





Re: [vchkpw] Help needed with 5.7.1 rcpthosts problem

2003-11-22 Thread Tom Williams
Tom Williams wrote:

Hi!  I've got Qmail 1.03 and Vpopmail 5.3.28 running on a RedHat 9 
Linux box.  I've got several virtual hosts defined through Vpopmail.  
I can login via POP3 and read my mail, but I can't send any mail via 
SMTP since I get the 5.7.1 error which indicates the domain isn't in 
the rcpthosts file.

Ok, I've made some progress.  Here is what my 
/home/vpopmail/etc/tcp.smtp has in it:

[EMAIL PROTECTED] etc]# cat tcp.smtp
127.0.0.1:allow,RELAYCLIENT=
69.59.161.106:allow,RELAYCLIENT=
:allow
[EMAIL PROTECTED] etc]#
My rcpthosts file did NOT contain the domain of the e-mail address to 
which I was trying to send mail, per the man pages:

http://qmail.area.com/man/man8/qmail-smtpd.html

/rcpthosts/
Allowed RCPT domains.  If /rcpthosts/ is supplied,
*qmail-smtpd* will reject any envelope recipient address
with a domain not listed in /rcpthosts/.
Exception:  If the environment variable *RELAYCLIENT* is
set, *qmail-smtpd* will ignore /rcpthosts/, and will append
the value of *RELAYCLIENT* to each incoming recipient
address.
/rcpthosts/ may include wildcards:

heaven.af.mil
.heaven.af.mil
Envelope recipient addresses without @ signs are always
allowed through.
Ok, now since the RELAYCLIENT parameter in tcp.smtp IS set to null, why 
is rcpthosts still being checked by qmail-smtpd?  Maybe I should set 
RELAYCLIENT= in the /service/qmail-smtpd/run file?

Thanks

Peace...

Tom





Re: [vchkpw] Help needed with 5.7.1 rcpthosts problem

2003-11-22 Thread Tom Williams
Tom Williams wrote:

Tom Williams wrote:

Ok, I've changed my /service/qmail-smtpd/run file to set 
RELAYCLIENT= at the top and then export it and all is running just 
fine.  As for tcpserver appearing as a zombie, I'm guessing that's 
just how it appears in the process list.   It's working now, so I'm 
not worried about it.  :)

Thanks for the help!

Peace...

Tom

Ok, so that wasn't such a great idea as I've just configured an open 
relay.  :(  I've REMOVED this last config setting and have restarted the 
mail server so I NO LONGER have an open relay.  I guess the main problem 
is the RELAYCLIENT setting isn't being passed to qmail-smtpd so it knows 
to allow relaying for my roaming users.

Would it be worth upgrading to Vpopmail 5.3.30 at this point or revert 
to 5.2.2 instead?

Thanks...

Peace...

Tom




Re: [vchkpw] Help needed with 5.7.1 rcpthosts problem

2003-11-22 Thread Tom Williams
Tom Williams wrote:

Tom Williams wrote:

Ok, so that wasn't such a great idea as I've just configured an open 
relay.  :(  I've REMOVED this last config setting and have restarted 
the mail server so I NO LONGER have an open relay.  I guess the main 
problem is the RELAYCLIENT setting isn't being passed to qmail-smtpd 
so it knows to allow relaying for my roaming users.

Would it be worth upgrading to Vpopmail 5.3.30 at this point or revert 
to 5.2.2 instead?

Thanks...

Peace...

Tom

Thinking out loud like this can be helpful from time to time.  :)

I upgraded to vpopmail 5.3.30 and now /hoome/vpopmail/etc/tcp.smtp.cdb 
is getting updated when clearopensmtp runs so I DO NOT have an open 
relay and my roaming users are now working.  :)

Peace...

Tom