Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Dan Peterson

On Wed, May 12, 1999 at 02:30:28PM -0400, Scott Schwartz wrote:
> Lars Uffmann <[EMAIL PROTECTED]> writes:
> | To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN.
> 
> Or, it can be called from a trivial wrapper that does the dup for it.

actually, what about a syslog solution? i tried adding a syslog()
call to checkpassword, but when i did that it stopped working for some
reason (compiled fine, but authorization failed for everyone). i just want
something similar to cucipop logging...for successful connects, it shows the
username, how many messages they have (and size), and how many they
downloaded during their POP session. that would be cool!

-dan

`--- dan peterson [ [EMAIL PROTECTED] ] http://erinyes.net
 `-- network engineer, digitaldune networks -- yuma, az
  `- (520) 344-1110 -- http://www.digitaldune.net



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Scott Schwartz

Lars Uffmann <[EMAIL PROTECTED]> writes:
| To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN.

Or, it can be called from a trivial wrapper that does the dup for it.



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Balazs Nagy

On Wed, 12 May 1999, Lars Uffmann wrote:

> Balazs Nagy wrote:
> 
> > Why DJB put this line in? If you run this program from command line,
> > 0,1,2 are open.  If you run from inetd, it dups 2 and 1 fom 0 (eg. 2 is
> > alive). Tcpserver does a good emulation of command line.  I don't know
> > why this line exists in the code.
>
> To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN. If you
> will patch checkpassword/pop3d to log to STDERR, you will no longer be
> able to run them from inetd, because the log messages would be redirected
> to the mail client. The same with qmail-smtpd. I guess this is one reason
> qmail-smtpd does no logging at all.

But you should use tcp-env to run qmail-popup and you should open a pipe to
a logger (esp. the stderr fd) which can be specified in command line.  Other
solution: use errorsto(daemontools).
-- 
Regards: Kevin (Balazs)



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Lars Uffmann

Balazs Nagy wrote:
> 
> On Wed, 12 May 1999, Lars Uffmann wrote:
> 
> > Balazs Nagy wrote:
> > >
> > > This tcpserver opens stderr to print its log messages and opens a pipe to
> > > stdin-stdout for qmail-popup's connection.  In fact there isn't a way to do
> > > logging right now.
> >
> > Try commenting out line 91 in qmail-popup.c:
> >
> >  91   /* if (fd_copy(2,1) == -1) die_pipe(); */
> 
> Why DJB put this line in? If you run this program from command line, 0,1,2
> are open.  If you run from inetd, it dups 2 and 1 fom 0 (eg. 2 is alive).
> Tcpserver does a good emulation of command line.  I don't know why this line
> exists in the code.
> 
>
To be compatible with inetd qmail-popup HAS to dup STDERR 2 STDIN.
If you will patch checkpassword/pop3d to log to STDERR, you will no
longer
be able to run them from inetd, because the log messages would be
redirected
to the mail client. The same with qmail-smtpd. I guess this is one
reason
qmail-smtpd does no logging at all.

-- lars



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Balazs Nagy

On Wed, 12 May 1999, Lars Uffmann wrote:

> Balazs Nagy wrote:
> > 
> > This tcpserver opens stderr to print its log messages and opens a pipe to
> > stdin-stdout for qmail-popup's connection.  In fact there isn't a way to do
> > logging right now.
> 
> Try commenting out line 91 in qmail-popup.c:
> 
>  91   /* if (fd_copy(2,1) == -1) die_pipe(); */

Why DJB put this line in? If you run this program from command line, 0,1,2
are open.  If you run from inetd, it dups 2 and 1 fom 0 (eg. 2 is alive). 
Tcpserver does a good emulation of command line.  I don't know why this line
exists in the code.

> Now checkpasswords and qmail-pop3d's SDTERR should go where tcpservers
> STDERR goes. Set a environment variable in qmail-popup, say LOGID to
> provide a session wide unique tag to use in the popup -> checkpassword ->
> pop3d pipeline.

Sounds reasonable.

Error catch points:
login, stat, commands: qmail-pop3d
bad passwords: checkpassword
-- 
Regards: Kevin (Balazs)



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Lars Uffmann

Balazs Nagy wrote:
> 
> On Tue, 11 May 1999, Dan Peterson wrote:
> 
> >   hi. at www.qmail.org(/top.html), there is a mention of a patch to
> > qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is
> > broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea
> > where i can pick this patch up? any help would be greatly appreciated! :)
> 
> I do have a logger patch but it's broken.  AFAIK it's a waste of time to
> talk about logging qmail-pop* until we cannot do logging with tcpserver.
> The problem is:
> 
> supervise tcpserver qmail-popup 2>&1 | {some logger}
> 
> This tcpserver opens stderr to print its log messages and opens a pipe to
> stdin-stdout for qmail-popup's connection.  In fact there isn't a way to do
> logging right now.
> --
> Regards: Kevin (Balazs)

Try commenting out line 91 in qmail-popup.c:

 91   /* if (fd_copy(2,1) == -1) die_pipe(); */
 92   close(3);
 93   if (pipe(pi) == -1) die_pipe();
 94   if (pi[0] != 3) die_pipe();
 95   switch(child = fork()) {
 96

Now checkpasswords and qmail-pop3d's SDTERR should go where tcpservers
STDERR
goes. Set a environment variable in qmail-popup, say LOGID to provide
a session wide unique tag to use in the popup -> checkpassword -> pop3d
pipeline.

-- lars



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Peter Gradwell

At 5:48 am -0500 12/5/99,the wonderful Andy Walden wrote:

>It would be sweet to be able to log bad passwords when people try to get
>their mail like cistron radius does when they are trying to dial in.

Paul Gregg's version of Checpassword does that

http://www.tibus.net/pgregg/projects/

peter.

--
peter at gradwell dot com; http://www.gradwell.com/
gradwell dot com Ltd. Enabling the internet you don't see.

** Cheap and easy ecommerce: http://www.gradwell.net/ **



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Andy Walden

On Wed, 12 May 1999, Balazs Nagy wrote:

> On Tue, 11 May 1999, Dan Peterson wrote:
> 
> > hi. at www.qmail.org(/top.html), there is a mention of a patch to
> > qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is
> > broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea
> > where i can pick this patch up? any help would be greatly appreciated! :)
> 
> I do have a logger patch but it's broken.  AFAIK it's a waste of time to

It would be sweet to be able to log bad passwords when people try to get
their mail like cistron radius does when they are trying to dial in. Tha
treally provides a powerful tool to tech support to get right to the heart
of a problem.

andy



Re: qmail-popup/qmail-pop3d logging patch?

1999-05-12 Thread Balazs Nagy

On Tue, 11 May 1999, Dan Peterson wrote:

>   hi. at www.qmail.org(/top.html), there is a mention of a patch to
> qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is
> broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea
> where i can pick this patch up? any help would be greatly appreciated! :)

I do have a logger patch but it's broken.  AFAIK it's a waste of time to
talk about logging qmail-pop* until we cannot do logging with tcpserver. 
The problem is:

supervise tcpserver qmail-popup 2>&1 | {some logger}

This tcpserver opens stderr to print its log messages and opens a pipe to
stdin-stdout for qmail-popup's connection.  In fact there isn't a way to do
logging right now.
-- 
Regards: Kevin (Balazs)



qmail-popup/qmail-pop3d logging patch?

1999-05-11 Thread Dan Peterson

hi. at www.qmail.org(/top.html), there is a mention of a patch to
qmail-popup and qmail-pop3d to make the log stuff to splogger, but the link is
broken (it points to http://www.pharos.com.au/mbp/). anyone have any idea
where i can pick this patch up? any help would be greatly appreciated! :)

thanks in advance,
-dan

`--- dan peterson [ [EMAIL PROTECTED] ] http://erinyes.net
 `-- network engineer, digitaldune networks -- yuma, az
  `- (520) 344-1110 -- http://www.digitaldune.net