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

Re: fetchmail & daemon mode



*- Shao Zhang wrote about "fetchmail & daemon mode"
> Hi all,
> 	If I comment out the line "set daemon 300" in the file
> ~/.fetchmailrc. Then my fetchmail works fine...
> 
> 	If I run fetchmail with the above line, then id doesn't work. The
> process just sits there and doing nothing...
> 

If you have it running as daemon then when you start it at the command
line(unders root's account, see below) then it should just return the
prompt to you without any output.

I also have a 

set logfile = "/var/log/fetchmail"

in my /root/.fetchmailrc that logs all activity to /var/log/fetchmail. 
If you do that then you could look at the log file for any errors.

> 	Do I have to start fetchmail in a special place??

I start mine in /etc/ppp/ip-up, this is run as root.

> 
> 	If I put it in ip-up, do I have to use the fetchmailrc in the root
> directory?? If I use that, how does fetchmail know to put in my user
> account rather than root??
> 

Yes, put it in /root/.fetchmailrc.  You need to tell fetchmail the
relationship between usernames on your mail host vs usernames on your
local machine.  This is a modified version of my .fetchmailrc

set logfile = "/var/log/fetchmail"
poll mail.isp.net timeout 60:
   user isp-name there has password isp-passwd is local-name here
   fetchall

This says to get mail from the server mail.isp.net and give up after 60
seconds if it can't connect.  Then it gets mail from the account of
isp-name using the password isp-passwd and then adds the
appropriate headers so that the local smtp daemon will send it to the
local user with the login of local-name.  The fetchall tells fetchmail
to get all the available mail on the mail server.

All this is covered in the man page and the docs in /usr/doc/fetchmail.

Hope this helps,
-- 
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                              servis@purdue.edu
Purdue University                   http://www.ecn.purdue.edu/~servis
---------------------------------------------------------------------


Reply to: