6.0.0-alpha14
7/2/25

[#7761] Minor updates to fetchmail for multiple driver flexibility
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

History
12/28/2008 03:06:47 AM Chuck Hagenbuch State ⇒ No Feedback
 
12/22/2008 03:29:54 AM Chuck Hagenbuch Comment #4
Patch ⇒ No
Reply to this comment
If you are interested in submitting this (along with the other 
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.
12/12/2008 06:03:14 PM rick (at) havokmon (dot) com Comment #3 Reply to this comment
I Agree - the driver should say if it should run on demand.  I wasn't 
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
12/12/2008 05:48:11 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
How is that supposed to work? $driver is always set as soon as a 
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.
12/08/2008 02:42:52 AM rick (at) havokmon (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Minor updates to fetchmail for multiple driver flexibility
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ Yes
New Attachment: impfetchmail.patch.txt Download
State ⇒ New
Reply to this comment
I've got a short little patch for handling multiple fetchmail drivers.

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.




Saved Queries