[ubuntu-in] help with writing shell script for downloading mails

Moz listmoz at gmail.com
Fri Nov 20 06:03:01 GMT 2009


Hi All,

I run the following OSs on various machines: Ubuntu (8.04, 9.04 and 9.10) on
laptops and desktops, Xandros (an old version) on EeePC. I need to collect
mail using dialup (wvdial) and fetchmail, and the mails should be readable
by alpine too, and still be copied to another machine.

Can someone help me write  a shellscript for this? My needs are following:

At predetermined times (once per hour), computer should dial the internet,
download emails with fetchmail, when fetchmail finishes, disconnect from the
internet. exim4 has already been setup on these computers.

for example:

-dial internet using wvdial, (if phone line is busy, try until connected)
-if pppd is up, then run fetchmail,
-wait for fetchmail to complete downloading
-disconnect from internet (kill wvdial)

If needed, I would like to copy mails downloaded as above on a pen drive to
take to another machine and be read by Thunderbird.

Regards

Moz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-in/attachments/20091120/4ca4cc3c/attachment.htm 


More information about the ubuntu-in mailing list