Re: [vchkpw] problem with open-smtp and ucspi-ssl

2004-10-14 Thread Andrea Riela
Hi guys,
my problem in a word is that:
when open my email client (whichever), I see my IP in open-smtp, and 
that sounds fine. But, after $RELAYCLEAR, my IP isn't in open-smtp 
(correct), but if I try to recheck my emails, I could download, but my 
IP isn't in open-smtp, that is the roaming is disable.

What I've to do? What I've to check?
I hope you could help me
Regards
Andrea


Re: [vchkpw] problem with open-smtp and ucspi-ssl

2004-10-14 Thread Andrea Riela
Andrea Riela wrote:
Hi guys,
my problem in a word is that:
when open my email client (whichever), I see my IP in open-smtp, and 
that sounds fine. But, after $RELAYCLEAR, my IP isn't in open-smtp 
(correct), but if I try to recheck my emails, I could download, but my 
IP isn't in open-smtp, that is the roaming is disable.

What I've to do? What I've to check?
I've reinstalled vpopmail-devel from port (I've freebsd 4.9), and for
about 1 hour it worked. Then, the same problem.
Probably a little bug? Or a mistake?
thank you for your support, and any suggestion
Regards
Andrea


Re: [vchkpw] problem with open-smtp and ucspi-ssl

2004-10-14 Thread Jiri Navratil
Hi,

I think, that you can download with correct name and password but not
to send messages if you are using IP address only (not smtp auth).

Jiri


14. j (tvrtek) v 08:58:23 CEST 2004, [EMAIL PROTECTED] napsal(a):
 Hi guys,
 
 my problem in a word is that:
 when open my email client (whichever), I see my IP in open-smtp, and 
 that sounds fine. But, after $RELAYCLEAR, my IP isn't in open-smtp 
 (correct), but if I try to recheck my emails, I could download, but my 
 IP isn't in open-smtp, that is the roaming is disable.
 
 What I've to do? What I've to check?
 
 I hope you could help me
 Regards
 Andrea


Re: [vchkpw] problem with open-smtp and ucspi-ssl

2004-10-14 Thread Andrea Riela
Jiri Navratil wrote:
Hi,
I think, that you can download with correct name and password but not
to send messages if you are using IP address only (not smtp auth).
nope, with roaming enabled I could make pop3-b4-smtp and imaps-b4-smtp
But my problem is: I could make that only the first time, after nothing
Thanks
Andrea


Re: [vchkpw] chkuser 2.0

2004-10-14 Thread Eric Ziegast
Rick Macdougall asked
 I didn't see anything in the docs or change logs specifically regarding
 the mysql connection problem that sometimes crops up with vpopmail.  Has
 this been addressed ?

Antonio Nati replied:
 Yes, chkuser 2.0 includes a new call, vauth_open(), that Rick Widmer told
 is in vpopmail CVS, and will be able to return the status of connection.

 As default this call is disabled, and should be enabled (uncommenting
 #define CHKUSER_ENABLE_VAUTH_OPEN in chkuser_settings.h) when this call is
 released.

Jeremy Kitchen added:
 as a suggestion, would it be possible to have a definition placed into
 vpopmail.h such as:
 #define HAVE_VAUTH_OPEN
 
 that way programs that link against vpopmail can support both methods
 without any user intervention, and also this way, if say perhaps
 the postgres code doesn't have vauth_open, and the mysql does, etc,
 so someone linking against it need not worry about it :)

While the current chkuser.c might compile fine against a vpopmail
install with Sybase or Postgres, it doesn't work for MySQL because
vauth_open is defined only in vpgsql.c and vsybase.c.

To get around this, I replaced the following line in chkuser.c:

if (vauth_open () == 0) {

with:

#ifdef USE_MYSQL
#ifdef MYSQL_REPLICATION
if (vauth_open_read () == 0) {
#else
if (vauth_open_update () == 0) {
#endif
#else
if (vauth_open () == 0) {
#endif

It seems to work fine for me.

It might make more sense for vpopmail to just create a generic
vauth_open_read function for each supported auth method so that
external modules like chkuser.c would be able to use the right
semantics without getting specific about the details.  Even in
the case of CDB (vcdb.c) the function would be defined as opening
the filehandle for reading the CDB file. ... just a thought.

--
Eric Ziegast


Re: [vchkpw] chkuser 2.0

2004-10-14 Thread tonix (Antonio Nati)
Eric,
we are waiting for the release of this feature, that should already be in CVS.
See this previous message:
Charles Sprickman wrote:
 Take a look at vpopmail CVS HEAD.  What I did was add a vauth_open() 
function in vmysql.c, and every other
 authentication back end that did not already have one.  It returns 0 if 
the database opens properly or some
 negative number if there was an error.

 I really think the right thing to do is make that change to vpopmail, 
then in the chkuser patch return a
 temporary failure if the database does not open properly.

Ciao,
Tonino
At 14/10/2004 14/10/2004 -0700, you wrote:
While the current chkuser.c might compile fine against a vpopmail
install with Sybase or Postgres, it doesn't work for MySQL because
vauth_open is defined only in vpgsql.c and vsybase.c.
To get around this, I replaced the following line in chkuser.c:
.


--
Eric Ziegast

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



Re: [vchkpw] chkuser 2.0

2004-10-14 Thread Dave Goodrich
Eric Ziegast wrote:
Rick Macdougall asked
I didn't see anything in the docs or change logs specifically regarding
the mysql connection problem that sometimes crops up with vpopmail.  Has
this been addressed ?
Antonio Nati replied:
Yes, chkuser 2.0 includes a new call, vauth_open(), that Rick Widmer told
is in vpopmail CVS, and will be able to return the status of connection.
As default this call is disabled, and should be enabled (uncommenting
#define CHKUSER_ENABLE_VAUTH_OPEN in chkuser_settings.h) when this call is
released.
Jeremy Kitchen added:
as a suggestion, would it be possible to have a definition placed into
vpopmail.h such as:
#define HAVE_VAUTH_OPEN
that way programs that link against vpopmail can support both methods
without any user intervention, and also this way, if say perhaps
the postgres code doesn't have vauth_open, and the mysql does, etc,
so someone linking against it need not worry about it :)
While the current chkuser.c might compile fine against a vpopmail
install with Sybase or Postgres, it doesn't work for MySQL because
vauth_open is defined only in vpgsql.c and vsybase.c.
To get around this, I replaced the following line in chkuser.c:
if (vauth_open () == 0) {
with:
#ifdef USE_MYSQL
#ifdef MYSQL_REPLICATION
if (vauth_open_read () == 0) {
#else
if (vauth_open_update () == 0) {
#endif
#else
if (vauth_open () == 0) {
#endif
It seems to work fine for me.
It might make more sense for vpopmail to just create a generic
vauth_open_read function for each supported auth method so that
external modules like chkuser.c would be able to use the right
semantics without getting specific about the details.  Even in
the case of CDB (vcdb.c) the function would be defined as opening
the filehandle for reading the CDB file. ... just a thought.
If I could put in my two cents here, If someone who knows the MySQL libs 
well enough to test the opening of a table, can they also add the proper 
closing of the table as well.

Several people, myself included, are still seeing problems with MySQL 
under a large useage. So far I have not been able to get to the cause of 
the problem other than to convince myself I have no network or MySQL 
issues. I don't know C well enough to add debug code or create a patch 
for this, but I am still having users who have to authenticate twice and 
the MySQL errors I record point to improper closing of the tables, 
causing a communication failure.

I can give details if interested, and I am willing to be the guinea pig 
and test the code.

DAve

--
Systems Administrator
http://www.tls.net
Get rid of Unwanted Emails...get TLS Spam Blocker!


[vchkpw] Safe closing of DB connections - it was Re: [vchkpw] chkuser 2.0

2004-10-14 Thread tonix (Antonio Nati)
At 14/10/2004 14/10/2004 -0500, you wrote:
Several people, myself included, are still seeing problems with MySQL 
under a large useage. So far I have not been able to get to the cause of 
the problem other than to convince myself I have no network or MySQL 
issues. I don't know C well enough to add debug code or create a patch for 
this, but I am still having users who have to authenticate twice and the 
MySQL errors I record point to improper closing of the tables, causing a 
communication failure.
I feel most of the critical closing routines (for any MySQL or DB or 
socket or file) should be chained using an atexit() function.

Calls chained using atexit are always called when program is exiting in the 
normal way (i.e. excluding some special SIG).

That would guarantee that ANY normal program will ALWAYS close opened 
connections.

It should be enought simple to implement such a control.
Each DB module could be coded like (sorry for the strange metacode used here):
static int dbopened = 0;
safeclosedb ()
{
  if (dbopened == 1) {
close (DB);
dbopened = 0;
  }
}
..
open (DB);
if ERROR {
go away
}
dbopened = 1;
atexit (safeclosedb)
...
...
...
close (DB);
dbopened = 0;
.
Ciao,
Tonino
I can give details if interested, and I am willing to be the guinea pig 
and test the code.

DAve

--
Systems Administrator
http://www.tls.net
Get rid of Unwanted Emails...get TLS Spam Blocker!

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