Skip to main content

Posts

Showing posts from July, 2011

Running Crontab

My Previous post talks about sending automated emails using mutt. How do we automate this process say every hour Then we setup crontab to get this up and running. Below are few of the options which crontab gives. crontab -e Edit your crontab file, or create one if it doesn’t already exist. crontab -l Display your crontab file. crontab -r Remove your crontab file. crontab -v Display the last time you edited your crontab file. Steps Enter: $ crontab -e If you have not configured EDITOR it will ask for it set which ever you are comfortable with. Enter your time to execute command information, below is how you give it. ---------------------------------------------- ---------------------------------------------- # Every Minute # m h dom mon dow command * * * * * /home/ahmed/executeMyMuttScript.sh ---------------------------------------------- # Every Hour at zero minute # m h dom mon dow command 0 0-23

Configure "mutt" to send mail over SMTP using Google Apps

dot.muttrc Download this file My Colleague was working on having auto scripts to send mail through "mutt" with backup attachment. But he was not able get it up, so though of looking into this. Wondering what "mutt" is go here then :) Here is what I did to get it working. If you need to configure anything for mutt first look for .muttrc in your home directory ~/.muttrc If its not there you can create one. I have attached my .muttrc file you can use to configure your mutt . (change the email and password) Just download the dot.muttrc and save it as .muttrc in your home directory (/home/ahmed). Also create directory in the  path below mkdir -p ~/.mutt/cache/headers mkdir -p ~/.mutt/cache/bodies mkdir -p ~/.mutt/certificates Before you can start using the script to send your mails - you need to send the first mail from the "mutt client" so that it takes the certificate from the server. use $ mutt This will bring up the mu