[tpop3d-discuss] tpop3d 1.4.2 : feature requests.

Chris Lightfoot chris at ex-parrot.com
Fri, 9 Aug 2002 11:51:32 +0100


On Thu, Aug 08, 2002 at 09:36:51PM -0400, Dave Baker wrote:
> I'd like to put in a request for some config option changes for the next
> release.
> 
> The -d flag was added to prevent tpop3d from detaching from the terminal
> and log to STDERR.  This should probably log to STDOUT and _not_ log to
> syslog if it's to jive nicely with daemontools.  
> 
> As it is, the "no-detach" and -d on the command line do not behave
> identically when I spawn tpop3d under daemontools.  specifically, if I
> just use no-detach then I end up with nothing going through my daemontools
> log processor.  Very odd.

Yeah. -d turns on the options to stay attached to the
controlling terminal, and to log to standard error in
addition to syslog. no-detach just tells it not to detach
from the controlling terminal. The log-stderr option is
separate.

Is a separate log-stdout option actually necessary, or can
you make do with tpop3d 2>&1 ?

Is it necessary to prevent tpop3d from logging to syslog
when you're using daemontools?

> Secondly, a "brief logging" flag would be marvelous.  Perhaps just take
> out the net_loop:, listeners_post_select: connections_post_select: (etc)
> prefixes to the log lines.  Basically, take out anything that repeats
> itself ad infinitum and doesn't really add anything to the log other than
> size.  I want to know who, when and how much.  Anything else can be saved
> for debug mode.

Yeah, this is on the to do list too. At the moment, a log
for a session looks something like

* tpop3d[26306]: listeners_post_select: client [7].../...: connected
  tpop3d[26306]: authcontext_new_user_pass: began session for `...' with mysql; uid 558, gid 558
* tpop3d[26306]: fork_child: [7]...(...): successfully authenticated with mysql
  tpop3d[26306]: fork_child: new child is PID 4999
  tpop3d[4999]: mailspool_load_index(...): index exists, but has some stale or corrupt data
* tpop3d[4999]: mailspool_new_from_file: indexed mailspool /var/spool/mail/... (... bytes) in ...s
* tpop3d[4999]: connections_post_select: client [7]...(...): disconnected; .../... bytes read/written
  tpop3d[4999]: authcontext_delete: finished session for `...' with mysql

My thinking is that the `minimal logging' option should
give only the asterisked log lines for an entirely routine
connection. Thoughts?

-- 
``Remember, the plural of `moron' is `focus group'.'' (James A Wolf)