At 3:40 PM +0530 5/14/03, Vishal Khanna wrote:
Hi,
I am developing a web interface (PHP based) for fetchmail, the only
issue I have now is that the .fetchmailrc file needs to be in the
root folder, is there any way to tell fetchmail to pick the file up
from somewhere else and with permissions like 755 uid=wwwrun
group=nobody.
Two options. Change the FETCHMAILHOME environment variable. Or use
"-f -" and pipe the config file to it.
In the FWIW category, I have a Perl module that front-ends fetchmail.
That probably won't help you much in PHP (which is why I don't use
PHP). Using it looks like:
$fm = new FetchMail(
envelope => 'no',
syslog => 'no',
bouncemail => 'no',
spambounce => 'no',
invisible => 'yes',
fetchlimit => 1,
limit => 1,
rewrite => 'no',
keep => 'yes',
timeout => 15,
mda => '/bin/true',
);
$fm->set(hash of additional settings)
$fname = $fm->createConfig();
%result = $fm->execute($fname);
Return result contains the error code, a short and long version of
the error message, the full output that fetchmail dumped (it's
talkative), and an interpretation of the error code
(okay/warn/error/internal error).
--
Kee Hinckley
http://www.messagefire.com/ Junk-Free Email Filtering
http://commons.somewhere.com/buzz/ Writings on Technology and Society
I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.