Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 218975

Summary: mail-mta/courier authdaemonrc isn't starting properly
Product: Gentoo Linux Reporter: Stephen <sdw2>
Component: Current packagesAssignee: Hanno Böck <hanno>
Status: CONFIRMED ---    
Severity: normal CC: covici, jstein, net-mail+disabled
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://forums.gentoo.org/viewtopic-p-5070490.html#5070490
Whiteboard:
Package list:
Runtime testing required: ---

Description Stephen 2008-04-23 01:42:16 UTC
I've just done a full rebuild of my system (emerge -avt --deep emptytree world) and having issues with courier-authlib.

[I--] [  ] net-libs/courier-authlib-0.58 (0)
[I--] [  ] net-mail/courier-imap-4.0.6-r2

I'm using courier-authlib with ldap (I don't know if ldap has anything to do with it). When I start courier-authlib using the init script the console says it has started but there are no authdaemond processes running.
In the meantime, I found I can start courier-imap with the script below 

#!/bin/bash
#courier-authlib script isn't working so...
/usr/bin/env /usr/sbin/courierlogger -pid=/var/run/authdaemon.pid -start /usr/lib/courier/courier-authlib/authdaemond
sleep 1
/etc/init.d/courier-imapd start
sleep 2
/etc/init.d/courier-imapd restart


Reproducible: Always

Steps to Reproduce:
silver ~ # /etc/init.d/courier-authlib start
 * Starting courier-authlib: authdaemond ...                                                                      [ ok ]
silver ~ # netstat -nap | grep auth
silver ~ # 
silver ~ # /usr/bin/env /usr/sbin/courierlogger -pid=/var/run/authdaemon.pid -start /usr/lib/courier/courier-authlib/authdaemond
silver ~ # netstat -nap | grep authunix  2      [ ACC ]     STREAM     LISTENING     447900 25852/authdaemond   /var/lib/courier/authdaemon/socket.tmp





silver ~ # cat /etc/courier/authlib/authdaemonrc
##VERSION: $Id: authdaemonrc.in,v 1.8 2001/10/07 02:16:22 mrsam Exp $
#
# Copyright 2000-2001 Double Precision, Inc.  See COPYING for
# distribution information.
#
# authdaemonrc created from authdaemonrc.dist by sysconftool
#
# Do not alter lines that begin with ##, they are used when upgrading
# this configuration.
#
# This file configures authdaemond, the resident authentication daemon.
#
# Comments in this file are ignored.  Although this file is intended to
# be sourced as a shell script, authdaemond parses it manually, so
# the acceptable syntax is a bit limited.  Multiline variable contents,
# with the \ continuation character, are not allowed.  Everything must
# fit on one line.  Do not use any additional whitespace for indentation,
# or anything else.

##NAME: authmodulelist:0
#
# The authentication modules that are linked into authdaemond.  The
# default list is installed.  You may selectively disable modules simply
# by removing them from the following list.  The available modules you
# can use are: authcustom authcram authuserdb authldap authpgsql authpam

authmodulelist="authldap "

##NAME: authmodulelistorig:1
#
# This setting is used by Courier's webadmin module, and should be left
# alone

authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authpam"

##NAME: daemons:0
#
# The number of daemon processes that are started.  authdaemon is typically
# installed where authentication modules are relatively expensive: such
# as authldap, or authmysql, so it's better to have a number of them running.
# PLEASE NOTE:  Some platforms may experience a problem if there's more than
# one daemon.  Specifically, SystemV derived platforms that use TLI with
# socket emulation.  I'm suspicious of TLI's ability to handle multiple
# processes accepting connections on the same filesystem domain socket.
#
# You may need to increase daemons if as your system load increases.  Symptoms
# include sporadic authentication failures.  If you start getting
# authentication failures, increase daemons.  However, the default of 5
# SHOULD be sufficient.  Bumping up daemon count is only a short-term
# solution.  The permanent solution is to add more resources: RAM, faster
# disks, faster CPUs...

daemons=5

##NAME: version:0
#
# When you have multiple versions of authdaemond.* installed, authdaemond
# just picks the first one it finds.  Set "version" to override that.
# For example:  version=authdaemond.plain

#version="authdaemond.ldap"

##NAME: authdaemonvar:0
#
# authdaemonvar is here, but is not used directly by authdaemond.  It's
# used by various configuration and build scripts, so don't touch it!

authdaemonvar=/var/lib/courier-imap/authdaemon

##NAME: DEBUG_LOGIN:0
##
## Dump additional diagnostics to syslog
##
## DEBUG_LOGIN=0   - turn off debugging
## DEBUG_LOGIN=1   - turn on debugging
## DEBUG_LOGIN=2   - turn on debugging + log passwords too
##
## ** YES ** - DEBUG_LOGIN=2 places passwords into syslog.
##
## Note that most information is sent to syslog at level 'debug', so
## you may need to modify your /etc/syslog.conf to be able to see it.
#
DEBUG_LOGIN=2
#
###NAME: DEFAULTOPTIONS:0
##
## A comma-separated list of option=value pairs. Each option is applied
## to an account if the account does not have its own specific value for
## that option. So for example, you can set
##   DEFAULTOPTIONS="disablewebmail=1,disableimap=1"
## and then enable webmail and/or imap on individual accounts by setting
## disablewebmail=0 and/or disableimap=0 on the account.
#
#DEFAULTOPTIONS=""
#
###NAME: LOGGEROPTS:0
##
## courierlogger(1) options, e.g. to set syslog facility
##
#
LOGGEROPTS="0"
#
###NAME: LDAP_TLS_OPTIONS:0
##
## Options documented in ldap.conf(5) can be set here, prefixed with 'LDAP'.
## Examples:
##
##LDAPTLS_CACERT=/path/to/cacert.pem
##LDAPTLS_REQCERT=demand
##LDAPTLS_CERT=/path/to/clientcert.pem
##LDAPTLS_KEY=/path/to/clientkey.pem
#
Comment 1 Stephen 2008-04-23 01:58:07 UTC
silver ~ # emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.20-xen-r6 i686)
=================================================================
System uname: 2.6.20-xen-r6 i686 AMD Athlon(tm) 64 Processor 3000+
Timestamp of tree: Mon, 21 Apr 2008 22:45:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.2.11
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.4.3-r4, 1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mcpu=athlon64 -O2 -pipe -mno-tls-direct-seg-refs"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X acl acpi alsa apache2 arts berkdb cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gpm gstreamer gtk hal iconv imap ipv6 isdnlog jpeg kde kerberos ldap logrotate mad maildir midi mikmod mp3 mpeg mudflap ncurses nptl nptlonly objc ogg opengl openmp openntpd oss pam pcre pdf perl png pppd python qt qt3 qt3support qt4 readline reflection ruby sasl sdl session spell spl ssl svg tcpd tiff truetype unicode usb vim-with-x vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 2 Stephen 2008-04-23 02:03:15 UTC
By the way, in /var/log/mail.log, I get this entry when using the init script to start courier-authlib

Apr 23 13:37:08 silver 0: exec: No such file or directory
Comment 3 John Covici 2019-02-21 11:00:43 UTC
I have similar problems using system.  They changed the way authdaemond is invoked to a shell script /usr/sbin/authdaemon and there are two problems with it.  First, in the shell script, it says -$1 and if there is no $1 I get an error.  After fixing this, system will not start the daemon, but if I use the same commands in the unit by hand it does work.  Very strange.