Version: 1.0 Author: Eddie Beuerlein
This script will read a csv file to get a list of compliance report names and email addresses, contact the RL api and look for matches. When a match is found, it will download the report and send it to the email recipent. .
-
Python 2.7.10 or newer
-
OpenSSL 1.0.2 or newer
(if using on Mac OS, additional items may be nessessary.)
- Pip
sudo easy_install pip
- Requests (Python library)
sudo pip install requests
- YAML (Python library)
sudo pip install pyyaml
-
Navigate to compliance_report_email/config/configs.yml
-
Fill out your RedLock username, password, and customer name - if you are the only customer in your account then leave this blank.
-
Populate the input.csv with the report names in RedLock and the email addresses you want the report sent to.
-
Customize the subject line if needed in runner.py
-
Customize the lib/email_helper.py to include the email server name/port, username/password, body and sender email address.
python runner.py