Koozali.org: home of the SME Server

Can fetchmail use .fetchmailrc ?

saleem

Can fetchmail use .fetchmailrc ?
« on: July 18, 2002, 02:41:35 PM »
Hi all,

I have been trying to get fetchmail to use the .fetchmailrc file that exists in a users home folder.

I cannot get fetchmail to use it.

I have searched through the forum and although others have been having problems no one I think has tried to use the .fetchmailrc in a users home folder.

I can get fetchmail to run and poll mail if I place the entries in the /etc/fetchmail

However this is not ideal.

I want fetchmail to read and poll mail for each user via their own .fetchmailrc

Is this possible?

To restate I can get fetchmail to happily get mail via entries in /etc/fetchmail

When I place the entries only in /.fetchmailrc  fetchmail does'nt get mail.

TIA

saleem

saleem

Re: Can fetchmail use .fetchmailrc ?
« Reply #1 on: July 18, 2002, 03:27:04 PM »
I have found that fetchmail gets started by startmail.

Startmail in turn is run from crontab.

Is it possible to somehow get fetchmail to run each .fetchmailrc in each user on the server ?

That would be alot more cleaner as each user can then add their own pop3 account details.

Would I need to include the path to each users fetchmailrc file in startmail ?

after this

/bin/su - qmailr -s /bin/bash -c \
        "FETCHMAILHOME=/var/lock/fetchmail /etc/fetchmail"

add the following
 
do while $users
     /bin/su - qmailr -s /bin/bash -c \
        "FETCHMAILHOME=/var/lock/fetchmail /home/e-smith/$users/.fetchmailrc"

There must be the ability of fetchmail to read .fetchmailrc otherwise why does the file exist ?

Andy Parkinson

Re: Can fetchmail use .fetchmailrc ?
« Reply #2 on: July 19, 2002, 01:49:18 AM »
What you need is Stephen Nobles Multiple pop 3 add in. This alows you to poll several different pop mailboxes and direct the mail to whatever user you like which I think is what you are trying to achieve. http://www.dungog.net/sme/howto/pop.html

saleem

Re: Can fetchmail use .fetchmailrc ?
« Reply #3 on: July 22, 2002, 01:53:30 PM »
I have seen the multiple pop addin.

It edits /etc/fetchmail

My current setup is that fetchmail will read and follow the receipes within /etc/fetchmail.

However I am using a groupware software that edits each users .fetchmailrc file.

This is why I want to get fetchmail to read this file that exits in each users home folder.

I use a browser based groupware so its the apache account that users the users account to right the file.  

My alternative is to rewrite the /etc/fetchmail file.  However I think I the apache account does not have permission to edit this file.

Also it would get messy as e-smith manager will overwrite the file and so will the groupware software (if I can get it to edit /etc/fetchmail).  So the possiblity of each to overwrite each others settings is a easily possible.

All I need I think is fetchmail to work "normally" and for it to check and use any .fetchmailrc file in all the current users home folders after it has read and used /etc/fetchmail

Is this possible ?

TIA

saleem