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

Re: ip-up.d



*- On 24 Sep, Pollywog wrote about "Re: ip-up.d"
> 
> On 24-Sep-99 John Hasler wrote:
>>> I am having a problem using /etc/ppp/ip-up.d/ to start fetchmail when I
>>> use pon to connect. there is a script in there that wil start fetchmail
>>> for me as desired via command line. yet fetchmail still won't start on
>>> it's own when I connect to my ISP.
>> 
>> Post the name of the script, the permissions, and the script itself.
>> 
>> Here is mine:
>> 
>> -rwxr-xr-x   1 root     root           63 May 27 19:27 fetchmail
>> 
>>#!/bin/sh
>> rm  -f /var/spool/smail/retry/smtp/*
>> fetch-mail
>> runq
>> 
>> Here is the script 'fetch-mail':
>> 
>>#!/bin/sh
>> su postman -c "fetchmail -v"
> 
> In my script, I have:
> 
> #!/bin/sh
> sleep 10s
> /usr/bin/fetchmail -d 480
> 

Might as well joing the fun.

Mine is taken right from /usr/doc/fetchmail/fetchmail-up

   1 -rwxr-xr-x   1 root     root          112 Feb  1  1999 /etc/ppp/ip-up.d/fetchmail-up*

#!/bin/sh
test -r /etc/fetchmailrc && \
        fetchmail --syslog --invisible --fetchmailrc /etc/fetchmailrc


and /etc/fetchmailrc is(edited to protect the innocent):
   1 -rw-------   1 root     root          436 Aug 30 22:17 /etc/fetchmailrc

# fetchmailrc
set daemon 120
set logfile = "/var/log/fetchmail"

poll <isp1.com> timeout 60:
        user <isp1-name> there has password <isp1-passwd> is <local-name1> here
        fetchall

poll <free-email-server> with protocol pop3 timeout 60:
        user <free-email-name1> there has password <free-email-pass1> is <local-name1> here
        fetchall

poll <free-email-server> with protocol pop3 timeout 60:
        user <free-email-name2> here has password <free-email-pass2> is <local-name2> here
        fetchall

postconnect "exim -q"


This is all run as root and does not need to do a sudo or su or
anything.  Fetchmail passes it off to exim to deliver to the
appropriate local users. 

-- 
Brian 
---------------------------------------------------------------------
Mechanical Engineering                              servis@purdue.edu
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: