"Anthony E. Greene" wrote:
> 
> Rick Knebel wrote:
> > Does anyone know if there is a way to run fetchmail as root and use it to
> > get different users mail from an ISP?
> > I want to start fetchamil as root and have a different line for each user.
> 
> Put a ~/.fetchmailrc in each user's home directory that looks like this:
> 
> defaults protocol POP3 mda "/usr/bin/procmail -d linux_username" fetchall
> nokeep
> poll pop.ispname.com username isp_username password isp_password
> 
> The above fetchmailrc config will retrieve the user's remote mail and run it
> through procmail for local filtering and delivery.
> 
> Then in /etc/ppp/ip-up.local (or any script that runs as root when you
> connect):
> 
> for mailuser in `ls /home`
> do
>   if [ -f /home/$mailuser/.fetchmailrc ]; then
>     su -l $mailuser -c fetchmail
>   fi
> done
> 
> That bit of code checks each home directory for the existence of a
> .fetchmailrc and runs fetchmail as that user if the file exists.
> 
> Tony

Another way is to use just the root .fetchmailrc like this: 

#
# This polls xyz for localname1
#
  poll pop-server.xyz.com  proto POP3
       user xyzmailname1 pass xyzmailpasswd1 fetchall no keep is localname1
                                                                  
#
# This polls xyz for localname2
#
  poll pop-server.xyz.com  proto POP3
       user xyzmailname2 pass xyzmailpasswd2 fetchall no keep is localname2
                                                                  
#
# This polls xyz for localname3
#
  poll pop-server.abc.com  proto POP3
       user abcmailname3 pass abcmailpasswd3 fetchall no keep is localname3

Just stack'em up.  I've got 5 right now and it works just fine.  Much easier
to administer....  

Best

Cokey

-- 
------------------------------------------------------------------
Cokey de Percin, DBA            Email:
Policy Management Systems Corp.  Work - [EMAIL PROTECTED]
Columbia, South Carolina         Home - [EMAIL PROTECTED]


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to