Package: amavisd-new
Version: 1:2.5.2-2
Tags: patch
Followup-For: Bug #447040
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu hardy ubuntu-patch



*** /tmp/tmpyC5y_k
In Ubuntu, we've applied the attached patch to achieve the following:

  * debian/amavisd-new-cronjob:
    - fix output redirect to /dev/null, if the script is being called
      by SUUSER
    - Also redirect STDERR to /dev/null, because sa-learn complains
      there that it is disabled (LP: #165184)

We thought you might be interested in doing the same. 
diff -u amavisd-new-2.5.2/debian/changelog amavisd-new-2.5.2/debian/changelog
diff -u amavisd-new-2.5.2/debian/amavisd-new-cronjob 
amavisd-new-2.5.2/debian/amavisd-new-cronjob
--- amavisd-new-2.5.2/debian/amavisd-new-cronjob
+++ amavisd-new-2.5.2/debian/amavisd-new-cronjob
@@ -21,18 +21,18 @@
        if [ "$(id -u -n)" != "${SUUSER}" ]; then
                exec /bin/su - "${SUUSER}" -c "$*"
        else
-               # to get the same quoting level as the su path
-               CMD="$*"
-               exec ${CMD}
+               # Use "/bin/sh -c" so that the output redirect works:
+               # (and to get the same quoting level as the su path)
+               exec /bin/sh -c "$*"
        fi
 }
 
 case $1 in
        sa-sync)
-               do_amavis_cmd "/usr/bin/sa-learn --sync >/dev/null"
+               do_amavis_cmd "/usr/bin/sa-learn --sync >/dev/null 2>&1"
                ;;
        sa-clean)
-               do_amavis_cmd "/usr/bin/sa-learn --sync --force-expire 
>/dev/null"
+               do_amavis_cmd "/usr/bin/sa-learn --sync --force-expire 
>/dev/null 2>&1"
                ;;
        *)
                echo "$0: unknown cron routine $1" >&2

Reply via email to