Create jsinix_email_dropbox.py

root@M14XR2:~# ls -la /home/jsinix/Dropbox/
total 16
-rwxrwxr-x  1 jsinix jsinix   49 Dec 15 17:29 .dropbox
drwxrwxr-x  5 jsinix jsinix 4096 Dec 17 16:51 .dropbox.cache
root@M14XR2:~# 

root@jsinix01:~/scripts# ./jsinix_email_dropbox.py --encrypt
         _     _       _
        (_)   (_)     (_)
         _ ___ _ _ __  ___  __
        | / __| | '_ \| \ \/ /
        | \__ \ | | | | |>  <
        | |___/_|_| |_|_/_/\_\.
       _/ |
      |__/


Author: jsinix(jsinix.1337@gmail.com)

This script is a neat and cheap way to backup all the  
attachments of all emails and optionally encrypt them.
After that these files are send over to your dropbox 
account. You will have to generate your own token by 
going to https://www.dropbox.com/developers/apps and 
replace it in the script. 

(+) Getting all emails for domain jsinix.com
(+) Changing PWD to /root/scripts/jsinix/

(+) Writing file load-balancing101.pdf
(+) Encrypting load-balancing101.pdf
(+) Uploading load-balancing101.pdf.enc to dropbox

(+) Linked Account: jsinix tester
(+) Writing file ciscocommands.txt
(+) Encrypting ciscocommands.txt
(+) Uploading ciscocommands.txt.enc to dropbox

(+) Linked Account: jsinix tester
(+) Writing file jsinix-avatar.PNG
(+) Encrypting jsinix-avatar.PNG
(+) Uploading jsinix-avatar.PNG.enc to dropbox

(+) Change PWD to /root/scripts

(+) Upload complete


root@M14XR2:~# ls -la /home/jsinix/Dropbox/
total 776
-rw-rw-r--  1 jsinix jsinix     24 Dec 17 17:11 ciscocommands.txt.enc
-rwxrwxr-x  1 jsinix jsinix     49 Dec 15 17:29 .dropbox
drwxrwxr-x  5 jsinix jsinix   4096 Dec 17 17:11 .dropbox.cache
-rw-rw-r--  1 jsinix jsinix  16408 Dec 17 17:11 jsinix-avatar.PNG.enc
-rw-rw-r--  1 jsinix jsinix 737304 Dec 17 17:11 load-balancing101.pdf.enc