<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>IMP_Fetchmail_imap defaults never apply</title> 
  <pubDate>Fri, 10 Apr 2026 12:09:53 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/2799</link> 
  <atom:link rel="self" type="application/rss+xml" title="IMP_Fetchmail_imap defaults never apply" href="https://bugs.horde.org/ticket/2799/rss" /> 
  <description>IMP_Fetchmail_imap defaults never apply</description> 
 
   
   
  <item> 
   <title>IMP_Fetchmail_imap supplies defaults for {l,r}mailbox in its</title> 
   <description>IMP_Fetchmail_imap supplies defaults for {l,r}mailbox in its constructor:



    function IMP_Fetchmail_imap($params)

    {

        /* Default values for a couple of parameters. */

        $defaults = array(

            &#039;rmailbox&#039; =&gt; &#039;INBOX&#039;,

            &#039;lmailbox&#039; =&gt; &#039;INBOX&#039;

        );

        $params = array_merge($defaults, $params);



but these values never apply because imp/fetchmailprefs.php unconditionally sets all parameters:



    foreach ($fetchmail-&gt;getParameterList() as $val) {

        $fm_account-&gt;setValue($val, Util::getFormData(&#039;fm_&#039; . $val), $to_edit);

    }



so they wind up being empty strings (&quot;&quot;).



Should IMP_Fetchmail_imap() override empty strings with the defaults? Does having an empty value for {l,r}mailbox make any sense (IOW, do any remote servers interpret this as a sane default)?

</description> 
   <pubDate>Mon, 17 Oct 2005 16:10:03 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/2799#t12498</link> 
  </item> 
   
  <item> 
   <title>&gt; but these values never apply because imp/fetchmailprefs.ph</title> 
   <description>&gt; but these values never apply because imp/fetchmailprefs.php 

&gt; unconditionally sets all parameters:

&gt;

&gt;    foreach ($fetchmail-&gt;getParameterList() as $val) {

&gt;        $fm_account-&gt;setValue($val, Util::getFormData(&#039;fm_&#039; . $val), 

&gt; $to_edit);

&gt;    }

&gt;

&gt; so they wind up being empty strings (&quot;&quot;).



Well, if we&#039;re going to keep the defaults, we should make them show up in the UI somehow. Possibly by having $fm_account-&gt;getValue() return the default if the $account key is null; then it&#039;s just a matter of finding a nice way for $fm_account to get its default values - I looked at the code some and it wasn&#039;t falling in to pace for me.



&gt; Should IMP_Fetchmail_imap() override empty strings with the defaults? 

&gt; Does having an empty value for {l,r}mailbox make any sense (IOW, do 

&gt; any remote servers interpret this as a sane default)?



Probably not, but I&#039;d be wary of running into a case (maybe with a parameter that hasn&#039;t been added yet, even) where there&#039;s a non-empty default for a parameter that can validly be empty. We don&#039;t want to make it impossible for users to zero out parameters that can be empty.



Moving the whole fetchmail form to use Horde_Form would actually take care of all of this.</description> 
   <pubDate>Tue, 25 Oct 2005 21:30:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/2799#t13015</link> 
  </item> 
   
  <item> 
   <title>I&#039;ve gone ahead and removed the defaults; &#039;&#039; (empty string) </title> 
   <description>I&#039;ve gone ahead and removed the defaults; &#039;&#039; (empty string) is valid for remote mailboxes, and since they were never used...</description> 
   <pubDate>Sat, 12 May 2007 16:29:52 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/2799#t32964</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
