Sending email screen shots from Enlightenment Linux


I read somewhere that its possible to take unattended screen shots (scrot) and mail it (heirloom-mailx) every one hour (/etc/cron.hourly). It was not easy particularly the mailing part because configuring any mail program to send mail from terminal to the outside world seemed a herculean task. The steps ..

$ sudo apt-get install scrot

$ sudo apt-get install heirloom-mailx

#  to install certutil in enlightenement

$ sudo apt-get install libss3-tools

# Create a certificate directory
$ mkdir .certs
 
# Create a new database in the certs dir
$ certutil -N -d .certs 
 
# Fetch the certificate from Gmail, saving in the text file GMAILCERT
echo -n | openssl s_client -connect smtp.gmail.com:465 | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ > GMAILCERT
 
# Import the new cert file into the new database in the new dir. enter password when prompted
$ certutil -A -n “Google Internet Authority” -t “C,,” -d .certs -i GMAILCERT 
 
# Double Check
$ certutil -L -d .certs

Certificate Nickname                                         Trust Attributes
                                                             SSL,S/MIME,JAR/XPI
 
Google Internet Authority                                    C,,  
edit ~/..mailrc file
 account gmail {
 set smtp-use-starttls
 set ssl-verify=ignore
 set nss-config-dir=~/.certs
 set smtp=smtp://smtp.gmail.com:587
 set smtp-auth=yourusername@gmail.com
 set smtp-auth-user=you@gmail.com
 set smtp-auth-password=your_gmail_passwsord
 set from=”you@gmail.com
 }

Testing mail Config

 echo “Test Email” | mailx  -v -A gmail -s “test” testing@example.com

 

 

 

Advertisements