Re: fetchmail, mutt and crontab


Subject: Re: fetchmail, mutt and crontab
From: Evan Read (evan@netaccess.co.nz)
Date: Fri Sep 10 1999 - 01:45:30 MDT


Cool... Been looking up cron. But can't figure out how I would tell it to
launch only once on startup.

Since I have my ~/.fetchmailrc file, I don't need to use cron to get
fetchmail to poll my servers all the time. I just need it to run
fetchmail once.

I was thinking of doing this with /etc/init.d/ and put it in rc.local but
that would have fetchmail running as root, not as the user "evan".

So, questions. A) how can I get cron to get something to fire something
up once in a session (I really haven't been able to find out) or B) how
can I get a program specified in rc.local (or even in init.d and linked
to from rc3.d) to run something as a user, not as root?

Danke.

Ev.

On Wed, 8 Sep 1999, Reid Ellis wrote:

> > First thing, I have given up using GUI program mail shite and decided to go
> > with a PINE/FETCHMAIL combo (wouldn't mind hearing what people like to combine
> > with FETCHMAIL though... does PINE suck? I use it at work and it is pretty
> > cool)...
>
> I use fetchmail, but not Pine. I use mutt instead. <http://www.mutt.org/>
> There is an rpm with the Yellow Dog distro, or online at my favorite mirror:
>
> <ftp://ftp.cso.uiuc.edu/pub/systems/linux/yellowdog/champion-1.1/ppc/RedHat/RPMS/mutt-0.95.5us-2.ppc.rpm>
>
> [it's my favorite because my cablemodem manages 5 Mbps downloads from it :)]
>
> > Thing is, I don't want to manually invoke fetchmail all the time... I want
> > to set up my ".fetchmailrc" with all sorts of shit in it (poll delays,
> > auto invokes and shit) and I want to use fetchmailconf to do it (or
> > someone can send me an example file I can learn from it - but would prefer
> > fetchmailconf so I can check out all the options).
>
> Don't know fetchmailconf. Here's my ~/.fetchmailrc for what it's worth
> [replacing real passwords with <passwd> of course:
>
> poll mail.mgisoft.com user reide password <passwd>
> poll mail.interlog.com password <passwd>
> poll netmail.home.com protocol pop3 user clith password <passwd>
>
> from this you can deduce that I use the following email accounts:
> reide@mgisoft.com
> rae@interlog.com
> clith@home.com
> because my account on tnir is 'rae' and fetchmail uses the current account
> name by default unless specified otherwise. and here is a part of my
> ~/.crontab that boots up fetchmail every now and again:
>
> # suck down new mail every 1/2 hour
> 0,30 * * * * /usr/bin/fetchmail -s
> # suck down new mail every 15 minutes during the day
> 15,45 8-18 * * * /usr/bin/fetchmail -s
>
> To get the crontab rolling I say "crontab ~/.crontab" and it's off and
> running. "man crontab" for more info. cron is your friend. Burmashave. The
> file name "~/.crontab" is a personal tradition. You could call it "Stuff to
> run every now anf again" if you wanted [spaces and all].
>
> Reid
>



This archive was generated by hypermail 2a24 : Fri Oct 01 1999 - 16:13:43 MDT