Package: davmail Version: 5.5.1.3299-4 Severity: normal X-Debbugs-Cc: none, Olaf Meeuwissen <meeuwissen.o...@exc.epson.co.jp>
Dear Maintainer, I have been using Davmail on Devuan (Debian sans systemd) without any trouble until this morning when I wanted to check the login procedure in the logs. Making the relevant changes in the configuration file, /etc/davmail/davmail.properties, and restarting the service with sudo /etc/init.d/davmail restart I did not see any debug log messages in either of the logfiles that might be in use, /var/log/davmail.log according to the init.d script and /var/log/davmail/davmail.log in the configuration file. Some digging around revealed that the init.d script hasn't really been kept in sync with some of the changes made to service startup. The attached patch fixed things for me. The only thing to watch out for is keeping the logfile location in sync with the configuration file. # I made the change to DAEMON_USER earlier to get things to work after # the initial installation. BTW, I don't use a keystore file so didn't bother to add /usr/share/davmail/service-prepare to the start action. Perhaps that is needed as well. Or was that handled by ENABLE_DAEMON in the past? This variable no longer expands to anything as far as I could see. Hope this helps, -- System Information: Distributor ID: Devuan Description: Devuan GNU/Linux 4 (chimaera) Release: 4 Codename: n/a Architecture: x86_64 Kernel: Linux 5.10.0-7-amd64 (SMP w/8 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=C.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: runit (via /run/runit.stopit) LSM: AppArmor: enabled Versions of packages davmail depends on: ii adduser 3.118 ii default-jre-headless [java9-runtime-headless] 2:1.11-72 ii init-system-helpers 1.60+devuan1 ii jarwrapper 0.78 ii libcommons-codec-java 1.15-1 ii libcommons-httpclient-java 3.1-16 ii libcommons-logging-java 1.2-2 ii libhtmlcleaner-java 2.24-1 ii libhttpclient-java 4.5.13-2 ii libjackrabbit-java 2.18.0+r2.14.6-1 ii libjcifs-java 1.3.19-2 ii libjettison-java 1.4.1-1 ii liblog4j1.2-java 1.2.17-10 ii libmail-java 1.6.5-1 ii libservlet-api-java 4.0.1-2 ii libslf4j-java 1.7.30-1 ii libstax2-api-java 4.1-1 ii libwoodstox-java 1:6.2.1-1 ii logrotate 3.18.0-2 ii lsb-base 11.1.0 ii openjdk-11-jre-headless [java9-runtime-headless] 11.0.11+9-1 davmail recommends no packages. Versions of packages davmail suggests: pn libopenjfx-java <none> pn libswt-cairo-gtk-4-jni <none> pn libswt-gtk2-4-jni <none> -- Configuration Files: /etc/davmail/davmail.properties changed: davmail.server=true davmail.mode=EWS davmail.url=https://outlook.office365.com/EWS/Exchange.asmx davmail.caldavPort=1080 davmail.imapPort=1143 davmail.ldapPort=1389 davmail.popPort=1110 davmail.smtpPort=1025 davmail.enableProxy=false davmail.useSystemProxies=false davmail.proxyHost= davmail.proxyPort= davmail.proxyUser= davmail.proxyPassword= davmail.noProxyFor= davmail.allowRemote=true davmail.bindAddress= davmail.clientSoTimeout= davmail.server.certificate.hash= davmail.ssl.nosecurecaldav=false davmail.ssl.nosecureimap=false davmail.ssl.nosecureldap=false davmail.ssl.nosecurepop=false davmail.ssl.nosecuresmtp=false davmail.disableUpdateCheck=true davmail.enableKeepAlive=true davmail.folderSizeLimit=0 davmail.defaultDomain= davmail.caldavAlarmSound= davmail.caldavPastDelay=90 davmail.caldavAutoSchedule=true davmail.forceActiveSyncUpdate=false davmail.imapAutoExpunge=true davmail.imapIdleDelay= davmail.imapAlwaysApproxMsgSize= davmail.keepDelay=30 davmail.sentKeepDelay=90 davmail.popMarkReadOnRetr=false davmail.smtpSaveInSent=true davmail.logFilePath=/var/log/davmail/davmail.log davmail.logFileSize=1MB log4j.logger.davmail=INFO log4j.logger.httpclient.wire=INFO log4j.logger.org.apache.commons.httpclient=INFO log4j.rootLogger=INFO /etc/init.d/davmail changed: PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Davmail Exchange gateway" NAME=davmail DAEMON=/usr/bin/$NAME DAEMON_USER=_$NAME HOME=/var/lib/$DAEMON_USER PIDFILE=/var/run/$NAME.pid LOGFILE=/var/log/$NAME/$NAME.log SCRIPTNAME=/etc/init.d/$NAME [ -x "$DAEMON" ] || exit 0 DAEMON_ARGS="-server /etc/davmail/davmail.properties" if [ ! -r "$LOGFILE" ] then touch $LOGFILE chown $DAEMON_USER:adm $LOGFILE fi . /lib/init/vars.sh . /lib/lsb/init-functions do_start() { # Return # 0 if daemon has been started # 2 if daemon could not be started $ENABLE_DAEMON is_alive && return 0 start-stop-daemon --start --pidfile $PIDFILE --chuid $DAEMON_USER\ --background --make-pidfile\ --exec $DAEMON -- $DAEMON_ARGS \ || return 2 } do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --user $DAEMON_USER --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 start-stop-daemon --user $DAEMON_USER --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON [ "$?" = 2 ] && return 2 rm -f $PIDFILE return "$RETVAL" } do_reload() { # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # start-stop-daemon --user $DAEMON_USER --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } is_alive () { ret=1 if [ -r $PIDFILE ] ; then pid=`cat $PIDFILE` if [ -e /proc/$pid ] ; then procname=`/bin/ps h -p $pid -C $NAME` [ -n "$procname" ] && ret=0 fi fi return $ret } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; reload|force-reload) log_daemon_msg "Reloading $DESC" "$NAME" do_reload log_end_msg $? ;; restart) log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; status) echo -n "Status of $DESC: " if is_alive ; then echo "alive." else echo "dead." exit 1 fi ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 exit 3 ;; esac : -- no debconf information -- Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- EPSON AVASYS CORPORATION Free Software Foundation Associate Member since 2004-01-27 Support Free Software https://my.fsf.org/donate Join the Free Software Foundation https://my.fsf.org/join
diff --git a/init.d/davmail b/init.d/davmail index 63c3b1c..a9e3f26 100755 --- a/init.d/davmail +++ b/init.d/davmail @@ -19,23 +19,23 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Davmail Exchange gateway" NAME=davmail DAEMON=/usr/bin/$NAME -DAEMON_USER=$NAME +DAEMON_USER=_$NAME HOME=/var/lib/$DAEMON_USER PIDFILE=/var/run/$NAME.pid -LOGFILE=/var/log/$NAME.log +LOGFILE=/var/log/$NAME/$NAME.log SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -DAEMON_ARGS="/etc/davmail.properties" +DAEMON_ARGS="-server /etc/davmail/davmail.properties" # Create logfiles if they do not exist if [ ! -r "$LOGFILE" ] then touch $LOGFILE - chown $NAME:adm $LOGFILE + chown $DAEMON_USER:adm $LOGFILE fi # Load the VERBOSE setting and other rcS variables