Skip to content

Instantly share code, notes, and snippets.

@modpluz
Forked from Caffe1neAdd1ct/trapmail
Created May 20, 2014 11:31
Show Gist options
  • Save modpluz/d7c59b216321506b66af to your computer and use it in GitHub Desktop.
Save modpluz/d7c59b216321506b66af to your computer and use it in GitHub Desktop.
#!/bin/bash
formail -R cc X-original-cc \
-R to X-original-to \
-R bcc X-original-bcc \
-f -A"To: [email protected]" \
| /usr/sbin/sendmail -t -i
# pipe all to a log instead, comment out formail code
#tee -a /tmp/trapmail.log > /dev/null
@modpluz
Copy link
Author

modpluz commented May 20, 2014

Apache config setting:

php_admin_value sendmail_path "/usr/local/bin/trapmail > /dev/null"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment