Skip to content

Instantly share code, notes, and snippets.

@Disassembler0
Created December 5, 2018 15:31
Show Gist options
  • Save Disassembler0/74b9daa9dea9be172de04f213ced5d62 to your computer and use it in GitHub Desktop.
Save Disassembler0/74b9daa9dea9be172de04f213ced5d62 to your computer and use it in GitHub Desktop.
#!/bin/bash
STDIN=$(</dev/stdin)
echo "Sendmail invoked at $(date)" >>/var/log/sendmail.log
echo "Params: ${@}" >>/var/log/sendmail.log
echo -e "---\n${STDIN}\n---\n" >>/var/log/sendmail.log
echo "${STDIN}" | /usr/sbin/sendmail.real ${@}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment