On Wed, 25 Aug 2004 15:01:50 -0500
Micah Anderson <[EMAIL PROTECTED]> wrote:

> Stefan Hornburg schrieb am Thursday, den 19. August 2004:
> 
> > On Wed, 18 Aug 2004 20:54:43 -0500
> > Micah Anderson <[EMAIL PROTECTED]> wrote:
> > 
> > > Package: courier-base
> > > Version: 0.45.6.20040712-1
> > > Severity: wishlist
> > > 
> > > Courierlogger logs to the mail facility, which is particularlly messy
> > > if you happen to also have a MTA installed (very common) which also
> > > logs to the mail facility (very common). It is preferred to have
> > > courier logs in a separate log file (/var/log/courier.log for
> > > example), so that you can see what is going on.
> > > 
> > > liblog/logger.c does have many available, for example:
> > > 
> > > #ifdef LOG_LOCAL3
> > >         { "local3",     LOG_LOCAL3 },
> > > #endif
> > 
> > You can pass the desired facility to courierlogger:
> > 
> > "Usage: courierlogger [-name=name] [-pid=pidfile] [-facility=type]\n"
> >                     "       [-start|-stop|-restart] [cmd [args...]]\n"
> > 
> > Therefore I suggest to make this configurable from /etc/default and
> > change the init scripts accordingly.
> > 
> 
> Indeed, I tried to do this... its not that simple, as you are aware,
> the initscript to start the individual courier daemons, does some
> funky environment pre-sets before launching:
> 
>     /usr/bin/env - /bin/sh -c " set -a; \
>                 bindir=${bindir}; \
>                 . ${sysconfdir}/imapd; \
>                 if [ "$SSLCONFIG" ]; then . ${sysconfdir}/imapd-ssl;
> fi; \
>                 IMAP_STARTTLS=$IMAPDSTARTTLS ; export IMAP_STARTTLS ; \
>                 TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
>                 $TCPD -address=$ADDRESS \
>                         -stderrlogger=${sbindir}/courierlogger \
>                         -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
>                         -pid=$PIDFILE $TCPDOPTS \
>                         $PORT ${libexecdir}/courier/imaplogin $AUTHMODULELIST 
> \
>                                 ${bindir}/imapd $MAILDIR"
>                                                               
> 
> Simply adding ..."-stderrlogger=${sbindir}/courierlogger -facility=local3"
> 
> does not work, nor does any shell/environmental trick that I could
> muster. From playing around on the commandline, it almost appeared as
> if -name was a required parameter, or that courierlogger would have to
> be the mechanism to launch the individual courier daemon itself for
> that to work (something like courierlogger -name=imapd
> -facility=local3 -pid=$PIDFILE -respawn -start ${bindir}/imapd
> $MAILDIR) which doesn't seem particularly exciting, since this would
> require a total re-working of the courier startup scripts themselves,
> and may have some unintented side-consequences. 
> 
> I think it would be great if the courier startup scripts had something
> like (warning, pseudocode below):
> 
> /etc/default/courier
> FACILITY=local3
> 
> /etc/init.d/courier-imad
> source /etc/default/courier
> 
> . . . "courierlogger -facility ${facility}" . . .
> 

Recent Courier packages in experimental have LOGGEROPTS in 
/etc/courier/authdaemonrc:

##NAME: LOGGEROPTS:0
#
# courierlogger(1) options, e.g. to set syslog facility
#

LOGGEROPTS=""

I suppose that would solve your problem.

Bye
        Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to