Skip to content

Instantly share code, notes, and snippets.

@d1rk
Forked from magnetikonline/sendmailsink.sh
Created September 4, 2013 13:47
Show Gist options
  • Save d1rk/6437182 to your computer and use it in GitHub Desktop.
Save d1rk/6437182 to your computer and use it in GitHub Desktop.
#!/bin/bash
# For PHP5 and /etc/php5/php.ini you would setup like so:
# sendmail_path = "/path/to/sendmailsink.sh"
LOGFILE="/var/log/sendmailsink"
NOW=`date +%Y-%m-%d\ @\ %H:%M:%S`
echo "$NOW || $0 $*" >> $LOGFILE
echo >> $LOGFILE
while read BUF
do
echo $BUF >> $LOGFILE
done
echo "=================================" >> $LOGFILE
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment