Summary | Minor updates to fetchmail for multiple driver flexibility |
Queue | IMP |
Queue Version | 4.3 |
Type | Enhancement |
State | No Feedback |
Priority | 1. Low |
Owners | |
Requester | rick (at) havokmon (dot) com |
Created | 12/08/2008 (6050 days ago) |
Due | |
Updated | 12/28/2008 (6030 days ago) |
Assigned | |
Resolved | 12/28/2008 (6030 days ago) |
Milestone | |
Patch | No |
Patch ⇒ No
fetchmail drivers, perhaps?) as a patch that works for Horde instead
of just you, please revise. Otherwise, there isn't a lot of call to
re-do this without additional drivers, in my opinion.
sure if this was something you were interested in, so I just made it
work for me.
The 'fetchmailprefs.html' is never loaded, because the prefs file is
based on the driver name. $driver.'prefs.html'. So you're saying
the template should just be $driver . html ? I don't really see the
difference between that and reading in the driver names in the
Fetchmail.php file.
function &factory($driver, $params = array())
{
$driver = basename($driver);
require_once dirname(__FILE__) . '/Fetchmail/' . $driver . '.php';
??
IMHO, 'imap' is a bad driver name. It really should be 'fetchmail',
or retrieve, or something else. The protocols IMAP and POP both fall
under this driver, so there's no need for a separate prefs file for
each protocol. Naming the driver one of the protocols is just
confusing.
If you want to see the end result, create an account at vfemail.net
State ⇒ Feedback
driver is chosen, so fetchmailprefs.html is never loaded. A better
patch would be to split up the current template into one for imap and
one for pop3 (e.g. without the folder name setting). Then we would
*always* load a $driver.'fetchmailprefs.php'. Of course you can't use
$driver exactly this way, because it opens an file-inclusion
vulnerability.
Further, the preg_match() stuff is of course not a viable solution.
Instead the driver should specify whether it is able to run on-demand.
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Minor updates to fetchmail for multiple driver flexibility
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ Yes
New Attachment: impfetchmail.patch.txt
State ⇒ New
Currently, if you create a new driver in imp/lib/Fetchmail/drivers, it
becomes available but uses the 'fetchmailprefs' template - which may not
wholly apply. This patch changes the template file to $driver .
"prefs.html" so you don't have to confuse your users :)
Also, this patch will just list the accounts that were created with
the default
'imap' driver for fetching within IMP.
I think it might be better in the long run to add another variable to
the preference array that says whether or not this particular account
should be available (or maybe 'enabled'?) for IMP to Fetch.
For Example, the drivers I've added are for FetchYahoo and GotMail
('web' driver), and IMAPSync. These are all external to IMP, do not
really conform to the standard account setup template, and don't run
within IMP.