Created
April 30, 2015 09:34
-
-
Save jsarenik/92105aa49937293015c6 to your computer and use it in GitHub Desktop.
Forward mail with proper DKIM signature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tmpfile=`mktemp /tmp/processmail.XXXXXXX.eml` | |
trap "rm -rf $tmpfile $tmpfile.dir" EXIT | |
cat > $tmpfile | |
mkdir $tmpfile.dir | |
ripmime -i $tmpfile -d $tmpfile.dir | |
TO=`grep "^To:" $tmpfile` | |
TO=${TO##* } | |
mailx -t \ | |
-r "Jan Sarenik <$TO>" -a $tmpfile.dir/*.zip <<EOF | |
Subject: Report domain FWD | |
From: Jan Sarenik <$TO> | |
To: Dmarcian <[email protected]> | |
X-Loop: [email protected] | |
See attachment | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment