[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How the average guy gets mail...



On Wed, May 09, 2001 at 07:18:01AM -0600, Cameron Matheson wrote:
> Hey,
> 
> I've been using mail for the past month (or two), by running 'fetchmail ; mutt'.
> This is a *little* bit annoying, because I'd rather be able to get my mail
> and read it with one command.  Is their a way to download mail, while in
> mutt?
>
What I do is get fetchmail to run in daemon mode and make it fetch the
mail from your ISP every 15 mins while you remain connected.

If you connect to the internet with pon (or adsl-start for adsl) then
all you have to do is place a script file in /etc/ppp/ip-up.d  All the
files in this directory are run automatically when the connection is
established by run-parts.  Here is what I have:
$ cat /etc/ppp/ip-up.d/fetchmail-up 
#!/bin/sh
# Start fetchmail in daemon mode - poll every 15 mins
/usr/bin/fetchmail -d 900 -t 90 --silent --syslog

~$ cat /etc/ppp/ip-down.d/fetchmail-down 
#!/bin/sh
# kill any running daemon processes of fetchmail
/usr/bin/fetchmail --quit

Nb.  You will have to have a /root/.fetchmailrc file setup with all the
stuff in your current .fetchmailrc since it will be run as root (not as
your user) even though your user may have run pon.

Then in ~/.muttrc I have this:
set mail_check=10               # how often to poll for new mail

man muttrc shows this to mean:
mail_check
              Type: number
              Default: 5

              This variable configures  how  often  (in  seconds)
              mutt should look for new mail.

I hope that helps.

Mark.



Reply to: