fetchmail question (newbie)
Hi there,
I've installed fetchmail on my system and created a .fetchmailrc file in
my home directory. Everything works fine and now I want to automate the
download job.
The situation is the following: I am poor student in German :) and only
connect once or twice a day to the internet to download my mail and
occasionally to do some surfing.
So I thought of placing a script with `fetchmail -d 300` into the
/etc/ppp/ip-up.d directory and a script with `fetchmail -q` into the
/etc/ppp/ip-down.d directory. The problem is that those scripts are
executed as root, so I need to put the .fetchmailrc file into the root
directory. Although this is a one-user system, this is undesirable,
because I like to keep everything in my home directory and because it
won't be a one-user system for long.
Another option would be writing a pon wrapper script, but that's also
undesirable, because I like to use kppp for its nice accounting
options. It would also break with demand dialing, which I'm trying to
implement soon.
Yet another option would be putting the `fetchmail -d 300` stuff into
.bash_profile, but that is also undesirable, because then fetchmail will
try to fetch mail even if I'm not on the net. It will also not work if
I set up a local PPP server that gets its mail from various POP accounts
and makes it available for some Windows machines on the local network.
So what I want is this:
- fetchmail automatically starts if I get online
- stays in daemon mode as long as I am online
- automatically terminates when I go offline
- reads its information from a user file and not
from root's .fetchmailrc
- this has to work with several users and with several
accounts for each user (different login/passwort)
I looked into the FAQ and into the man page, but didn't find any
applicable information there. Any ideas or URLs where such a system is
outlined?
If this is not possible, at least I like to have a system where
fetchmail is started in daemon mode on boot up and still reads its
polling information from user files and not from root's .fetchmailrc.
MfG, Viktor
--
Viktor Rosenfeld
E-Mail: mailto:rosenfel@informatik.hu-berlin.de
HertzSCHLAG: http://www.informatik.hu-berlin.de/~rosenfel/hs/
Reply to: