*- On 5 Apr, John Hasler wrote about "Re: ip-up for each user?" > Robbie Huffman writes: >> So how does fetchmail know who to run as? I'm supposing as the user who >> called pppd, right? > > It will run as root, because that is what pppd runs as. > >> Otherwise more hacking will be necessary. > > The conventional thing to do is to have root's .forward push the incoming > mail through procmail or mailagent. I do it slightly differently. I have > a user named 'postman' that exists just to receive mail. In ip-up.d I have > > su -c "fetchmail -v" postman > > which runs fetchmail as postman. postman's .forward pushes the mail > through mailagent, using rules that are conveniently located in postman's > home directory, which is named 'postoffice'. This nicely centralizes all > the incoming mail stuff without cluttering root's home, and reduces the > number of daemons running as root.
I missed the first post by Robbie but wouldn't it just be easier to use a fetchmailrc that explicitly defines the relation of isp usernames to local user names? I have fetchmail start when ppp comes up with the following script which is provided in the /usr/doc/fetchmail package. #!/bin/sh #/etc/ppp/ip-up.d/fetchmail-up test -r /etc/fetchmailrc && \ fetchmail --syslog --invisible --fetchmailrc /etc/fetchmailrc and my /etc/fetchmailrc is <modified> set daemon 120 poll <popserver.isp1> with timeout 60: user <isp1-username> there has password <isp1-passwd> is <local-name> here fetchall poll <popserer.isp2> with protocol pop3 timeout 60: user <ips2-username> there has password <isp2-passwd> is <local-name> here fetchall postconnect "exim -q" This is all run by root and fetchmail passes it directly to exim via smtp and it is immediatly dropped in my mailbox by exim. No middle man involved. -- Brian --------------------------------------------------------------------- "Never criticize anybody until you have walked a mile in their shoes, because by that time you will be a mile away and have their shoes." - unknown Mechanical Engineering [EMAIL PROTECTED] Purdue University http://www.ecn.purdue.edu/~servis ---------------------------------------------------------------------