#!/bin/sh dir=`dirname $0` today=`date '+%Y-%m-%d'` cd $dir && ( ( ./qpsmtpd >&3 ) 2>&1 | /usr/local/bin/ts >> log/$today ) 3>&1