6.0.0-git
2019-03-24

[#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 2008-12-08 (3758 days ago)
Due
Updated 2008-12-28 (3738 days ago)
Assigned
Resolved 2008-12-28 (3738 days ago)
Milestone
Patch No

History
2008-12-28 03:06:47 Chuck Hagenbuch State ⇒ No Feedback
 
2008-12-22 03:29:54 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.
2008-12-12 18:03:14 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
2008-12-12 17:48:11 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.
2008-12-08 02:42:52 rick (at) havokmon (dot) com Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 1. Low
Summary ⇒ Minor updates to fetchmail for multiple driver flexibility
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ Yes
New Attachment: impfetchmail.patch.txt Download
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