Balazs Nagy wrote:
>
> Hi,
>
> I read Qmail's documentation again and I realized that DJB didn't mention
> logging other than qmail-send. Is logging obsolete? I don't think so. But
> why other (smtpd, qmtpd, but most importantly pop3d) services lack the
> support of logging?
>
> IMHO the technology behind qmail logging is wrong. These inetd-controlled
> services cannot use stderr for logging (as tcpserver), and none of DJB's
> software use syslog. Therefore no logging is applied to these softwares.
>
> Anyone who say 'when a connection is made it's enough to log it's remote ip
> number' is wrong. A customer of mine wanted to log the time, remote IP,
> password checking failure, status informations about any POP3 connections
> just because they wanted to track down their would-be hacker employees.
> It was just a bit of hack in the source code.
>
> But here? Here is no way to do it.
>
> I see two solutions. The first one is not likely to be realized: use
> syslog. The another one is much better. My idea is the same as in
> qmail-start: tcpserver should open a file descriptor for piping through a
> logger program. The service program (qmail-pop3d for example) should check
> if this fixed fd number is exists.
>
> Any comments?
If you run under tcpserver it's no problem to log to stderr. Everthing
you print to stderr will appear in tcpserver's logfile. In fact I'm
implementing that right now for qmail-smptd and qmail-pop3d.
--
Andre