John D. Hardin wrote: > On Sat, 29 Dec 2007, mouss wrote: > > Oooo! Script critique! My turn! > > >>>> # Filter for Spam >>>> cat | $SPAMASSASSIN > out.$$ >>>> >>>> cat out.$$ | /usr/sbin/sendmail -io -f $ORIGIN $TARGET >>>> >> I too love cats. but "$cmd < $file" does the same as >> "cat $file | $cmd". >> > > Why even have an explicit work directory and intermediate file? > > $SPAMASSASSIN | tee /tmp/toto.$$ | $SENDMAIL -f "$ORIGIN" "$TARGET" >
true, but if SA fails for some reason, it's better not to run sendmail at all.