Re: [vchkpw] chkusr patch w/Vpopmail 5.4.5

2004-07-13 Thread Jeremy Kister
On Monday, July 12, 2004 11:00 PM, Nick Berry wrote:
 I am trying to implement the chkusr patch (which was good for vpopmail
 5.3), but I've come across the following error:
[...]
 *** Error code 1

after patching, did you modify the Makefile, as well ?
edit the Makefile, look for qmail-smtpd:, and after `cat socket.lib`, add
/home/vpopmail/lib/libvpopmail.a

(adjusting for you're vpopmail's home, of course)

you'll also need to look for qmail-smtpd.o:, and add
/home/vpopmail/include/vpopmail.h /home/vpopmail/include/vauth.h
before the ./compile qmail-smtpd.c

 Any suggestions?

if you're up for a bigger patch, and you see need for the functionality, you
can try the qmail-1.03.isp.patch, available at
http://jeremy.kister.net/code/qmail-1.03.isp.patch which includes chkusr.


Jeremy Kister
http://jeremy.kister.net/



Re: [vchkpw] chkusr patch w/Vpopmail 5.4.5

2004-07-13 Thread nick berry
Jeremy Kister wrote:
after patching, did you modify the Makefile, as well ?
edit the Makefile, look for qmail-smtpd:, and after `cat socket.lib`, add
/home/vpopmail/lib/libvpopmail.a
(adjusting for you're vpopmail's home, of course)
you'll also need to look for qmail-smtpd.o:, and add
/home/vpopmail/include/vpopmail.h /home/vpopmail/include/vauth.h
before the ./compile qmail-smtpd.c
Thanks Jeremy, that did the trick.  Just so this gets googled in case 
someone else has the same issue, here's a patch:
--- Makefile.patch  Tue Jul 13 07:43:55 2004
+++ MakefileMon Jun 15 03:53:16 1998
@@ -1542,8 +1542,7 @@
   received.o date822fmt.o now.o qmail.o cdb.a fd.a wait.a \
   datetime.a getln.a open.a sig.a case.a env.a stralloc.a \
   alloc.a substdio.a error.a str.a fs.a auto_qmail.o  `cat \
-   socket.lib` -lcrypt -lz -lm /usr/local/vpopmail/lib/libvpopmail.a \
-/usr/local/mysql/lib/mysql/libmysqlclient.a
+   socket.lib`

qmail-smtpd.0: \
qmail-smtpd.8
@@ -1554,9 +1553,7 @@
substdio.h alloc.h auto_qmail.h control.h received.h constmap.h \
error.h ipme.h ip.h ipalloc.h ip.h gen_alloc.h ip.h qmail.h \
substdio.h str.h fmt.h scan.h byte.h case.h env.h now.h datetime.h \
-exit.h rcpthosts.h timeoutread.h timeoutwrite.h commands.h \
-/usr/local/mysql/include/mysql/mysql.h \
-/usr/local/vpopmail/include/vpopmail.h /usr/local/vpopmail/include/vauth.h
+exit.h rcpthosts.h timeoutread.h timeoutwrite.h commands.h
   ./compile qmail-smtpd.c
qmail-start: \
if you're up for a bigger patch, and you see need for the 
functionality, you
can try the qmail-1.03.isp.patch, available at
http://jeremy.kister.net/code/qmail-1.03.isp.patch which includes chkusr.
I've heard of the patch and I'll take a better look at it.
Thanks for your help!


[vchkpw] chkusr patch w/Vpopmail 5.4.5

2004-07-12 Thread Nick Berry
I am trying to implement the chkusr patch (which was good for vpopmail
5.3), but I've come across the following error:

./load qmail-smtpd rcpthosts.o commands.o timeoutread.o  timeoutwrite.o
ip.o ipme.o ipalloc.o control.o constmap.o  received.o date822fmt.o
now.o qmail.o cdb.a fd.a wait.a  datetime.a getln.a open.a sig.a case.a
env.a stralloc.a  alloc.a substdio.a error.a str.a fs.a auto_qmail.o
`cat  socket.lib`
qmail-smtpd.o: In function `realrcpt_check':
qmail-smtpd.o(.text+0x95b): undefined reference to `default_domain'
qmail-smtpd.o(.text+0x9f8): undefined reference to `vget_real_domain'
qmail-smtpd.o(.text+0xa34): undefined reference to `vget_assign'
qmail-smtpd.o(.text+0xb1f): undefined reference to `vauth_getpw'
qmail-smtpd.o(.text+0xb4a): undefined reference to `valias_select'
*** Error code 1

I've searched through the archives and Google with no results regarding
Vpopmail 5.4.x.  I have tried adding -I/usr/local/vpopmail/include to
conf-cc even though qmail-smtpd.c includes vpopmail.h, vpopmail_config.h
and vauth.h (with full paths).

Any suggestions?

-nick


Re: [vchkpw] chkusr patch - false negatives

2004-05-12 Thread tonix (Antonio Nati)
Charles,

this is not a chkuser limit, but a vpopmail limit. vpopmail's vauth_getpw() 
does not check for the availability of the resource (that may be MySQL as 
LDAP), but simply returns something like 1/0 (pointer exists, pointer does 
not exist, despite of the reason why it does not exist).

You have the same problem in vdelivermail, if MySQL is down. You see 
chkuser because it is the first filter in the chain.

So I'm aware of this limit (I'm addressing this in version 2.0), and I'm 
going to add some code to check MySQL availability before calling vpopmail, 
but I can do it only for MySQl, not for LDAP, Oracle, Postgres, ecc.

I feel it would be nice if it could be developed another set of robust 
vpopmail calls.

All critical vpopmail (vauth_getpw() and a few else) could should have a 
general return status, stating if routine could work without 
resources/other limits.

For example if we could have

status = rvauth_getpw(...);
/*
status only reports if routine worked right, if resources are, ok, 
if routine could
make his job without external problems.
*/
if (status == VPOPMAIL_SUCCESS) {
.
/* here examine if user really exists */
} else {
/* say at SMTP to retry later */
}

it would be all more simple.

If vpopmail library keeps connections on between consecutives calls, it 
could be enought to add just one call to check resources availability, but 
this routine should be developed for all resources.

An example of this kind

status = vopenresources(...);
if (status == VPOPMAIL_SUCCESS) {
user = vauth_getpw(...);
.
} else {
/* say at SMTP to retry later */
}
I know this may be a long work, but I feel vpopmail has to improve a lot 
his robustness and reliability.

Tonino

At 11/05/2004 11/05/2004 -0400, you wrote:
Howdy,

I've seen a few people complaining that their mail is getting bounced.
Not good, needless to say.  On examing the bounces, I see that it's the
chkusr error message that the user does not exist.
At this point my best guess, by looking at overall server activity is that
this is happening when the machine really gets swamped (all incoming smtp
connections chewed up with spam runs - this server and a backup server).
I have mysql set to 500 max connections, and just bumped that up to 800.
I was surprised a bit by how chkusr behaves if the mysql server goes away
- rather than erring on the side of caution and trying to deliver the
mail, it bounces it.  I verified this on a test box.
FWIW, this is the Shupp chkusr patch, there's no version info in the
patch, but it looks like it was made 3/16/2003.
Is this how chkusr is supposed to operate?  If so, I need an
alternative, as most other parts of vpopmail survive a brief database
outage without dumping good mail.
Are there any other tested chkusr type patches out there?  Please share!

Thanks,

Charles

[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it  [EMAIL PROTECTED]



Re: [vchkpw] chkusr patch - false negatives

2004-05-12 Thread Rick Widmer


tonix (Antonio Nati) wrote:

I feel it would be nice if it could be developed another set of robust 
vpopmail calls.
What if you had vauth_open() which you can call early in the program. 
If it returns 0, you have a valid authentication connection and can 
expect later calls to work.  If it returns any other value it is the 
error returned trying to open the authentication database.

You don't have to call it, all the existing calls will open the database 
if they are called first.  (Like they already do.)  This gives you a way 
to check the authentication connection without retrieving any data.

Rick




Re: [vchkpw] chkusr patch - false negatives

2004-05-12 Thread tonix (Antonio Nati)
At 12/05/2004 12/05/2004 -0600, you wrote:


tonix (Antonio Nati) wrote:

I feel it would be nice if it could be developed another set of robust 
vpopmail calls.
What if you had vauth_open() which you can call early in the program. If 
it returns 0, you have a valid authentication connection and can expect 
later calls to work.  If it returns any other value it is the error 
returned trying to open the authentication database.
I'm using vpopmail 5.3.6, but the situation looks the same for following 
releases...

In 5.3.6 vauth_open() does not exists for MySQL, while it does exists for 
other libraries (but not LDAP).

The same call should exist for all type of connections, otherwise it is 
hard to use in a general way.

So this robust set I'm asking for should be (at first) available and 
coherent for all types of databases.

Tonino




[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it  [EMAIL PROTECTED]



Re: [vchkpw] chkusr patch - false negatives

2004-05-12 Thread Charles Sprickman
On Wed, 12 May 2004, tonix (Antonio Nati) wrote:

 You have the same problem in vdelivermail, if MySQL is down. You see
 chkuser because it is the first filter in the chain.

Unless I'm mistaken though, in this case the mail will simply go back in
the queue, it won't be lost, right?

Thanks,

Charles


 Tonino


 At 11/05/2004 11/05/2004 -0400, you wrote:
 Howdy,
 
 I've seen a few people complaining that their mail is getting bounced.
 Not good, needless to say.  On examing the bounces, I see that it's the
 chkusr error message that the user does not exist.
 
 At this point my best guess, by looking at overall server activity is that
 this is happening when the machine really gets swamped (all incoming smtp
 connections chewed up with spam runs - this server and a backup server).
 I have mysql set to 500 max connections, and just bumped that up to 800.
 
 I was surprised a bit by how chkusr behaves if the mysql server goes away
 - rather than erring on the side of caution and trying to deliver the
 mail, it bounces it.  I verified this on a test box.
 
 FWIW, this is the Shupp chkusr patch, there's no version info in the
 patch, but it looks like it was made 3/16/2003.
 
 Is this how chkusr is supposed to operate?  If so, I need an
 alternative, as most other parts of vpopmail survive a brief database
 outage without dumping good mail.
 
 Are there any other tested chkusr type patches out there?  Please share!
 
 Thanks,
 
 Charles

 
  [EMAIL PROTECTED]Interazioni di Antonio Nati
 http://www.interazioni.it  [EMAIL PROTECTED]
 




Re: [vchkpw] chkusr patch - false negatives

2004-05-12 Thread tonix (Antonio Nati)
At 12/05/2004 12/05/2004 -0400, you wrote:
On Wed, 12 May 2004, tonix (Antonio Nati) wrote:

 You have the same problem in vdelivermail, if MySQL is down. You see
 chkuser because it is the first filter in the chain.
Unless I'm mistaken though, in this case the mail will simply go back in
the queue, it won't be lost, right?
I can't swear, but I expect vdelivermail to check for the user, calling 
vauth_getpw() and having back a null pointer, and then rejecting the 
message because the user does not exist.

Exactly like it would do if chkuser would not exist.

Ciao,

Tonino

Thanks,

Charles


[EMAIL PROTECTED]Interazioni di Antonio Nati
   http://www.interazioni.it  [EMAIL PROTECTED]



Re: [vchkpw] chkusr patch - false negatives

2004-05-12 Thread Nick Harring
Charles Sprickman wrote:

Just following up on my own question a bit...

I'm trying to figure out how many mysql hits a single incoming message can
generate to arrive at a max_connections setting for mysql.
Worst case, I assume it would look like this:

-initial chkusr check (is it a valid address?)
-smtp-auth (possible if it's a local user sending to another)
-vdelivermail (look up where to deliver)
-spamc (if user has spamassassin enabled, prefs fetched via mysql)
Am I missing anything on the delivery side?
 

Potentially more calls to vuserinfo (like from a maildrop script to 
determine where the Maildir is) from later delivery pieces.

These obviously aren't all concurrent, but the hits are all pretty
rapid-fire.
So if I am allowing a max of 100 concurrent qmail-smtpd's, what would be a
safe number of concurrent mysql connections when the box is maxed out?
Multiply 100 by 2, 3, 4?
 

This isn't really the way to approach it. Look at what things can be 
running concurrently:
qmail-smtpd, qmail-local, vdelivermail, spamc. The qmail-local is 
controllable, which you then just multiply by 3 to account for the rapid 
fire nature.

For mail retrieval, I can measure a bit more easily...

Thanks,

Charles

 

Hope that helps,
Nick Harring


[vchkpw] chkusr patch - false negatives

2004-05-11 Thread Charles Sprickman
Howdy,

I've seen a few people complaining that their mail is getting bounced.
Not good, needless to say.  On examing the bounces, I see that it's the
chkusr error message that the user does not exist.

At this point my best guess, by looking at overall server activity is that
this is happening when the machine really gets swamped (all incoming smtp
connections chewed up with spam runs - this server and a backup server).
I have mysql set to 500 max connections, and just bumped that up to 800.

I was surprised a bit by how chkusr behaves if the mysql server goes away
- rather than erring on the side of caution and trying to deliver the
mail, it bounces it.  I verified this on a test box.

FWIW, this is the Shupp chkusr patch, there's no version info in the
patch, but it looks like it was made 3/16/2003.

Is this how chkusr is supposed to operate?  If so, I need an
alternative, as most other parts of vpopmail survive a brief database
outage without dumping good mail.

Are there any other tested chkusr type patches out there?  Please share!

Thanks,

Charles


Re: [vchkpw] chkusr patch - false negatives

2004-05-11 Thread Charles Sprickman
Just following up on my own question a bit...

I'm trying to figure out how many mysql hits a single incoming message can
generate to arrive at a max_connections setting for mysql.

Worst case, I assume it would look like this:

-initial chkusr check (is it a valid address?)
-smtp-auth (possible if it's a local user sending to another)
-vdelivermail (look up where to deliver)
-spamc (if user has spamassassin enabled, prefs fetched via mysql)

Am I missing anything on the delivery side?

These obviously aren't all concurrent, but the hits are all pretty
rapid-fire.

So if I am allowing a max of 100 concurrent qmail-smtpd's, what would be a
safe number of concurrent mysql connections when the box is maxed out?
Multiply 100 by 2, 3, 4?

For mail retrieval, I can measure a bit more easily...

Thanks,

Charles

On Tue, 11 May 2004, Charles Sprickman wrote:

 Howdy,

 I've seen a few people complaining that their mail is getting bounced.
 Not good, needless to say.  On examing the bounces, I see that it's the
 chkusr error message that the user does not exist.

 At this point my best guess, by looking at overall server activity is that
 this is happening when the machine really gets swamped (all incoming smtp
 connections chewed up with spam runs - this server and a backup server).
 I have mysql set to 500 max connections, and just bumped that up to 800.

 I was surprised a bit by how chkusr behaves if the mysql server goes away
 - rather than erring on the side of caution and trying to deliver the
 mail, it bounces it.  I verified this on a test box.

 FWIW, this is the Shupp chkusr patch, there's no version info in the
 patch, but it looks like it was made 3/16/2003.

 Is this how chkusr is supposed to operate?  If so, I need an
 alternative, as most other parts of vpopmail survive a brief database
 outage without dumping good mail.

 Are there any other tested chkusr type patches out there?  Please share!

 Thanks,

 Charles



Re: [vchkpw] chkusr patch

2003-06-17 Thread Jason 'XenoPhage' Frisvold
Try www.shupp.org ... He has the patch there with some instructions..

On Sun, 2003-06-15 at 22:19, David Bronson wrote:
 Hi all,
 
 I have just discovered qmail-smtpd-chkusr after several years of using
 vpopmail. I have applied the patch but don't quite understand the
 Makefile changes that are needed. Can someone share in more detail the
 changes that are needed to compile?
 
 Thank you in advance,
-- 
---
Jason 'XenoPhage' Frisvold
Engine / Technology Programmer
[EMAIL PROTECTED]
RedHat Certified - RHCE # 807302349405893
MySQL Core Certified - ID# 205982910
---
Something mysterious is formed, born in the silent void. Waiting alone
and unmoving, it is at once still and yet in constant motion. It is the
source of all programs. I do not know its name, so I will call it the
Tao of Programming.


signature.asc
Description: This is a digitally signed message part


Re: [vchkpw] chkusr patch

2003-06-17 Thread tonix (Antonio Nati)


Hi David,
this is my Makefile:

qmail-smtpd: \
load qmail-smtpd.o rcpthosts.o commands.o timeoutread.o \
timeoutwrite.o ip.o ipme.o ipalloc.o control.o constmap.o received.o
\
date822fmt.o now.o qmail.o cdb.a fd.a wait.a datetime.a getln.a \
open.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a str.a
\
fs.a auto_qmail.o socket.lib
 ./load qmail-smtpd rcpthosts.o
commands.o timeoutread.o \
 timeoutwrite.o ip.o ipme.o
ipalloc.o control.o constmap.o \
 received.o date822fmt.o now.o
qmail.o cdb.a fd.a wait.a \
 datetime.a getln.a open.a
sig.a case.a env.a stralloc.a \
 alloc.a substdio.a error.a
str.a fs.a auto_qmail.o \
 -lcrypt
/vpopmail/lib/libvpopmail.a \
 -L/mysql_root/lib/mysql
-lmysqlclient \
 `cat socket.lib`

In red you see the lines I've added for my case.
So, you MUST add crypt and vpopmail (check your vpopmail lib path) and
MySQL if you use MySQL, LDAP if you use LDAP, etc.
Ciao,
Tonino
At 15/06/03 15/06/03 -0400, David Bronson wrote:
Hi all,
I have just discovered qmail-smtpd-chkusr after several years of
using
vpopmail. I have applied the patch but don't quite understand the
Makefile changes that are needed. Can someone share in more detail
the
changes that are needed to compile?
Thank you in advance,
-- 
David Bronson




[EMAIL PROTECTED]
Interazioni di Antonio Nati 

http://www.interazioni.it
[EMAIL PROTECTED]






[vchkpw] chkusr patch

2003-06-15 Thread David Bronson
Hi all,

I have just discovered qmail-smtpd-chkusr after several years of using
vpopmail. I have applied the patch but don't quite understand the
Makefile changes that are needed. Can someone share in more detail the
changes that are needed to compile?

Thank you in advance,

-- 
David Bronson