here I confirm that the problem is only present for cron.d/amavisd-new as
it is run by the amavis user and so there is no "su -c" involved.

It's easy to reproduce with a script like this:

------------test.sh-------------
#!/bin/sh 
CMD="/bin/echo foo >/dev/null"
exec ${CMD}
--------------------------------

$ ./test.sh 
foo >/dev/null
$


I made different tests with different commands using ">/dev/null"
outside of quotes in the amavisd-new-cronjob script and cannot see any
side effect, it properly redirect STDOUT to /dev/null and keep STDERR if
any:


-do_amavis_cmd "/usr/bin/sa-learn --sync >/dev/null"
+do_amavis_cmd "/usr/bin/sa-learn --sync" >/dev/null


But you can also just move the >/dev/null in the if/then/else part as
this is common to both commands.





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

Reply via email to