Marco Gaiarin wrote: > Bob Proulx wrote: > > I would not be opposed to an *option* to ignore all errors. But it > > should not be the default. > > Only a little note, to say that after some more test seems that the > ''offending'' command that have to be redirected are only two: > > - sa-compile --quiet > + sa-compile --quiet > /dev/null 2>&1
This patch still incorrectly ignores errors. It should not be applied. If there is a problem with sa-compile then it should be fixed rather than simply ignoring all errors from the command. Ignoring errors like this is not an appropriate fix. This should not be done here. Otherwise think of what happens when there is an error there. It will create an error each time the script is run. It will always run and create the same error each and every time and will be ignored each and every time. The sysadmin will think that it is working because there are no errors when in actuality it won't be working. That would be bad. > 'sa-compile --quiet > /dev/null 2>&1' probably have to be digged > better, and handled with more care (also the exit status...). Correct. That shouldn't be done that way. > - spamassassin --lint || die_with_lint > + spamassassin --lint > /dev/null 2>&1 || die_with_lint > 'spamassassin --lint > /dev/null 2>&1 || die_with_lint' i think it is > plausible, because if 'spamassassin --lint', they are recalled without > any redirection, so sysadmin got the info. That one is probably okay because as you say die_with_lint calls spamassassin --lint again. die_with_lint() { su - debian-spamd -c "spamassassin --lint -D 2>&1" exit 1 } Therefore the first --lint test can be seen as simply a boolean test only in order to set up the later real reporting of it. So that is probably okay. > @@ -61,12 +61,12 @@ > > # Update > umask 022 > -sa-update > +sa-update $SA_UPDATE_OPTS This patch does not match any recent versions of the spamassassin script. Note that this section has been rewritten since your version. > Not related, see the 'sa-update $SA_UPDATE_OPTS', where > '$SA_UPDATE_OPTS' are defined on /etc/default/spamassassin to load > additional rules (rulesemporium, but does not care). Adding SA_UPDATE_OPTS so that the local admin could add options easily could be a nice enhancement. But again it is a completely different issue than the other *two* already discussed in this bug. This would be a third. Please file a separate ticket for separate issues. Bob
signature.asc
Description: Digital signature