Prevent sendmail hangs due to unclosed pipes

The problem was that multiple threads sending mail at the same time would "share" their pipes with *all* the children being forked.  This ensures *all* file descriptors (except the read pipe) is closed, including the log file and network connections.