From 72075a094e6541b810bef7421b8a889b0dba0d57d3f04ed3f14412ce848b55d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Fri, 2 Mar 2018 21:41:53 +0000 Subject: [PATCH] Accepting request 582045 from home:pmonrealgonzalez:branches:server:mail - By default, the status messages are redirected to /var/log/fetchmail. The syslog option or no-logging are also available. (bsc#1033081) OBS-URL: https://build.opensuse.org/request/show/582045 OBS-URL: https://build.opensuse.org/package/show/server:mail/fetchmail?expand=0&rev=80 --- fetchmail.changes | 7 +++++++ fetchmail.exec | 10 ++++++---- fetchmail.spec | 2 +- sysconfig.fetchmail | 10 +++++----- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/fetchmail.changes b/fetchmail.changes index 01b26c4..fa944be 100644 --- a/fetchmail.changes +++ b/fetchmail.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Mar 2 19:32:52 UTC 2018 - pmonrealgonzalez@suse.com + +- By default, the status messages are redirected to + /var/log/fetchmail. The syslog option or no-logging are also + available. (bsc#1033081) + ------------------------------------------------------------------- Thu Nov 23 13:43:10 UTC 2017 - rbrown@suse.com diff --git a/fetchmail.exec b/fetchmail.exec index a9d4964..b0b0d32 100644 --- a/fetchmail.exec +++ b/fetchmail.exec @@ -17,10 +17,12 @@ OPTS="-d $FETCHMAIL_POLLING_INTERVAL" [ "`whoami`" = "fetchmail" -a -z "$FETCHMAILHOME" ] && \ export FETCHMAILHOME=/var/lib/fetchmail -if [ "$FETCHMAIL_DEFAULT_LOGFILE" = "syslog" -o "$FETCHMAIL_DEFAULT_LOGFILE" = "" ]; then - OPTS="$OPTS --syslog" -else - OPTS="$OPTS -L $FETCHMAIL_DEFAULT_LOGFILE" +if [ ! -z "$FETCHMAIL_DEFAULT_LOGFILE" ] ; then + if [ "$FETCHMAIL_DEFAULT_LOGFILE" = "syslog" ]; then + OPTS="$OPTS --syslog" + else + OPTS="$OPTS -L $FETCHMAIL_DEFAULT_LOGFILE" + fi fi exec /usr/bin/fetchmail $OPTS $FETCHMAIL_EXPERT_OPTIONS \ diff --git a/fetchmail.spec b/fetchmail.spec index 443ac0a..ca0c2db 100644 --- a/fetchmail.spec +++ b/fetchmail.spec @@ -1,7 +1,7 @@ # # spec file for package fetchmail # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/sysconfig.fetchmail b/sysconfig.fetchmail index b83f942..2df208b 100644 --- a/sysconfig.fetchmail +++ b/sysconfig.fetchmail @@ -28,14 +28,14 @@ FETCHMAIL_FETCHALL="yes" FETCHMAIL_SILENT="no" ## Type: string -## Default: "syslog" -## Options: "syslog", "/path/to/file" +## Default: "/var/log/fetchmail" +## Options: "/path/to/file", "syslog", "" # # This option allows to redirect status messages in daemon mode to the -# specified log file or syslog(3) system if available. If empty, status -# messages are redirected syslog. +# specified log file or syslog(3) system if available. If empty, omits +# any logging options. # -FETCHMAIL_DEFAULT_LOGFILE="syslog" +FETCHMAIL_DEFAULT_LOGFILE="/var/log/fetchmail" ## Type: string ## Default: ""