script to get hard disk health in fedora/ubuntu
First, put this in a script.
|
|
and then put this in cron:
Continue readingFirst, put this in a script.
|
|
and then put this in cron:
Continue readingA new mail client is coming in town.
Gnome is working on new mail client called geary. Currently only supports imap accounts.
Description:
Geary is a new email reader for GNOME designed to let you read your
Continue reading
email quickly and effortlessly. Its interface is based on
conversations, so you can easily read an entire discussion without
having to click from message to message. Geary is still in early
development and has limited features today, but we’re planning to add
drag-and-drop attachments, lightning-fast searching, multiple account
support and much more. Eventually we’d like Geary to have an
extensible plugin architecture so that developers will be able to add
all kinds of nifty features in a modular way.
Now, that you have set the RPi to send emails, lets do the next best thing. Setup fetchmail so that we can setup a cron job to run and get us the emails on Raspberry Pi. What can we do with these emails, lots 🙂 (I hope you already have a Raspberry Pi, if not then head over to element14.)
For now, first install fetchmail:
sudo apt-get install fetchmail
and if you are one of the guys who wants easy configuration then :
Continue readingNow, if you have followed these :
Then you already have a working system for sending and receiving mail. Now, you can set the mda in the fetmailrc to a script which can do few things for you. The script below will get a page and mail it to you, if you have the subject as “get” and send “wake on LAN” to desired PC if you have subject as “wol”. Cool 🙂
Continue readingIf you are using Linux (Fedora/Ubuntu or anything else) then you do get a lot of tools and one of them is cron. Very very useful. Just write some script that can do the task for you, put it in cron and forget it. So, here is a home grown way to schedule mails.
First, copy this script below:
#!/bin/bash - #=============================================================================== # # FILE: sched_mail.sh # # USAGE: ./sched_mail.sh # # DESCRIPTION: # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Amit Agarwal (aka), # REVISION: --- #=============================================================================== mailfile="~/mail" if [[ $(wc -l $mailfile|awk '{print $1}' ) -ge 5 ]] then to=$(grep ^To: $mailfile|sed 's/To: //') echo "Good to send mail... to = $to" sendmail -t <$mailfile echo "once mail is send, delete the contents of file" echo "sed -i '4,$ d' $mailfile" fi
Now, create a file called mail in your home directory, with the following contents:
Continue readingTo get your email working on your raspberry pi, First thing that you should probably do is to set up outgoing emails from your RPi. The easiest way to do so is with ssmtp.
Install ssmtp:
sudo apt-get install ssmtp
Next configure the ssmtp client to send emails using your ISP, open up the file /etc/ssmtp/ssmtp.conf file and make the changes as suggested below:
Continue readingIf you already have some mail in your maildir and you have set procmail filters, then it is difficult to apply the procmail filter, right? Not so, you just need to go to the Inbox directory and then execute the command.
for i in *; do cat $i|procmail; rm -f "$i"; done
This will pass all of your e-mail through procmail again and then your filters will get applied. Mails will go to their appropriate directory and you will be one happy man, I hope.
Continue reading