[aclug-L] Re: Mail Server Question
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> >
> > I have a dedicated Mail/Internet server and was wondering how to
> > do the following (I have a dial on demand Internet Connection).
> > I want it to look for new mail (fetchmail) and send out any mail
> > that it has queued (sendmail) every 45 minutes or so. What is the
> > best way to do this? I would put it in as a Cron job, but I only
> > want it to run when I'm connected. I'm using Diald to connect.
>
> Put it in a cron job and have the script check the status of the PPP
> connection. If it's up, run fetchmail and sendmail -q
Another option, which worked well for me, is to put the fetchmail and
sendmail commands in the ip-up script. You'll want to run fetchmail in
daemon mode <fetchmail -d 300>, where you can specify how often to check,
and do a fetchmail --kill in the ip-down script. On sendmail, you can set
the queue to run every 5 minutes while online <sendmail -q5m> (ip-up) and
then reset it to some large number that will make sure it doesn't run when
offline <sendmail -q 1w> (ip-down).
Check the man pages for the various option flags, and customize to your
liking.
--dwh
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Dale W Hodge * dwh@xxxxxxxxxxxxxxxx * dwh@xxxxxxxx *
dwh@xxxxxxxxxxxxxxxxxx
-- www.neuralmatrix.org * www.dnd-automotive.com --
-= Visit the Aclug Companion http://aclug.neuralmatrix.org =-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
|
|