<?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>SMTP authentication broken</title> 
  <pubDate>Fri, 10 Apr 2026 19:28:28 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/12255</link> 
  <atom:link rel="self" type="application/rss+xml" title="SMTP authentication broken" href="https://bugs.horde.org/ticket/12255/rss" /> 
  <description>SMTP authentication broken</description> 
 
   
   
  <item> 
   <title>When SMTP authentication is enabled in the Mailer tab from t</title> 
   <description>When SMTP authentication is enabled in the Mailer tab from the Horde configuration screen and $conf[mailer][params][username] and $conf[mailer][params][password] are left blank, the credentials used for logging in should be used to SMTP authenticate. However, no credentials (empty) are passed to the SMTP server. As a consequence, authentication fails.

If the same information from the Mailer tab is entered in &#039;imp/config/backends.local.php&#039; with &#039;username&#039; and &#039;password&#039; both null, authentication succeeds, so it looks like there is a problem with initialization the settings from the Mailer tab.</description> 
   <pubDate>Wed, 15 May 2013 09:14:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78106</link> 
  </item> 
   
  <item> 
   <title>I don&#039;t agree with this.  We don&#039;t do this with ANY other au</title> 
   <description>I don&#039;t agree with this.  We don&#039;t do this with ANY other authentication driver (e.g., if using imap authentication we don&#039;t use these credentials for any other reason except authentication).  Authentication setup should be completely separate from mailer setup.

Which makes sense.  Imagine a scenario where you authenticate to a SMTP server for Horde authentication, but don&#039;t need any authentication for SMTP mailing.  If you automatically populate this field with authentication credentials, as you suggest, this is not possible.</description> 
   <pubDate>Thu, 16 May 2013 20:40:50 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78139</link> 
  </item> 
   
  <item> 
   <title>&gt; I don&#039;t agree with this.  We don&#039;t do this with ANY other </title> 
   <description>&gt; I don&#039;t agree with this.  We don&#039;t do this with ANY other 
&gt; authentication driver (e.g., if using imap authentication we don&#039;t 
&gt; use these credentials for any other reason except authentication).  
&gt; Authentication setup should be completely separate from mailer setup.

Straight from the Wiki:

Can IMP be used with SMTP authentication?

Horde and IMP can support SMTP authentication, but only if the SMTP server take the same authentication credentials as the POP/IMAP server (which would generally be the case) or the same set of credentials for ever user. Simply edit the Horde configuration as per the comments in the Mailer tab of the setup interface.

So far (Horde-5.0.4 and earlier) this has worked fine. If you enter &#039;username&#039; and &#039;password&#039;, these will be used for all users, if you leave them blank, the credentials used for logging in will be used.

But as I wrote before, this will still work in IMP-6.1.0beta, but this now requires setting up the &#039;smtp&#039; array in &#039;imp/config/backends.local.php&#039;. I asked on the mailinglist if this was the new/preferred way of doing this, but Jan replied the above method should still work and this was a bug. Therefor I submitted this report. Feel free to close this bug report if you think otherwise, since what I intend to do still works, but requires now a different way of configuring it.

&gt; Which makes sense.  Imagine a scenario where you authenticate to a 
&gt; SMTP server for Horde authentication, but don&#039;t need any 
&gt; authentication for SMTP mailing.  If you automatically populate this 
&gt; field with authentication credentials, as you suggest, this is not 
&gt; possible.

The above makes zero sense to me. Why would anyone bother to setup authentication on a SMTP server, but not require it for relaying mail?</description> 
   <pubDate>Thu, 16 May 2013 21:00:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78140</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Which makes sense.  Imagine a scenario where you authenti</title> 
   <description>&gt;&gt; Which makes sense.  Imagine a scenario where you authenticate to a
&gt;&gt; SMTP server for Horde authentication, but don&#039;t need any
&gt;&gt; authentication for SMTP mailing.  If you automatically populate this
&gt;&gt; field with authentication credentials, as you suggest, this is not
&gt;&gt; possible.
&gt;
&gt; The above makes zero sense to me. Why would anyone bother to setup 
&gt; authentication on a SMTP server, but not require it for relaying mail?

Agreed. If people don&#039;t want to use authentication, they don&#039;t have to. If they need per-user authentication for SMTP, using the current authentication credentials is the only thing that makes sense. And it&#039;s worked this way since ever.</description> 
   <pubDate>Fri, 17 May 2013 10:34:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78141</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt;&gt; Which makes sense.  Imagine a scenario where you authent</title> 
   <description>&gt;&gt;&gt; Which makes sense.  Imagine a scenario where you authenticate to a
&gt;&gt;&gt; SMTP server for Horde authentication, but don&#039;t need any
&gt;&gt;&gt; authentication for SMTP mailing.  If you automatically populate this
&gt;&gt;&gt; field with authentication credentials, as you suggest, this is not
&gt;&gt;&gt; possible.
&gt;&gt;
&gt;&gt; The above makes zero sense to me. Why would anyone bother to setup
&gt;&gt; authentication on a SMTP server, but not require it for relaying mail?
&gt;
&gt; Agreed. If people don&#039;t want to use authentication, they don&#039;t have 
&gt; to. If they need per-user authentication for SMTP, using the current 
&gt; authentication credentials is the only thing that makes sense.

Totally irrelevant.  We should never be in the business of  &quot;assuming&quot; that&#039;s what an admin wants.  You could very well &quot;assume&quot; that they used SMTP authentication simply because it is dirt easy to setup.  But I don&#039;t see how this has any connection to SMTP *sending* configuration unless and until they make it so.

Not to mention that it also potentially makes sense to allow *any* authentication credentials to be used as the SMTP authentication.  Why is SMTP special?

&gt; And 
&gt; it&#039;s worked this way since ever.

If so, this is totally news to me.  Especially since there is no documentation about this in the config file (any mention of this buried deep within a wiki entry is definitely not canon).

I don&#039;t object to adding this - or at a minimum clearly documenting the behavior in the conf.php file.  But as mentioned above, this has absolutely nothing to do with Horde SMTP authentication.  This needs to work independent of the Horde authentication backend.</description> 
   <pubDate>Sat, 18 May 2013 19:13:46 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78154</link> 
  </item> 
   
  <item> 
   <title>OK - verified that this works.  Still needs to be documented</title> 
   <description>OK - verified that this works.  Still needs to be documented in horde/conf.xml (this is clearly documented in IMP&#039;s backends.php), as my confusion over this feature clearly indicates.  And this DOES work for all authentication backends.

&gt; If the same information from the Mailer tab is entered in 
&gt; &#039;imp/config/backends.local.php&#039; with &#039;username&#039; and &#039;password&#039; both 
&gt; null, authentication succeeds, so it looks like there is a problem 
&gt; with initialization the settings from the Mailer tab.

That&#039;s why.  Don&#039;t set &#039;username&#039; and &#039;password&#039; in IMP, because those strings are used as the authentication strings.  If you want to use the Horde defaults, don&#039;t define those strings at all.</description> 
   <pubDate>Sat, 18 May 2013 19:24:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78156</link> 
  </item> 
   
  <item> 
   <title>&gt; OK - verified that this works.  Still needs to be document</title> 
   <description>&gt; OK - verified that this works.  Still needs to be documented in 
&gt; horde/conf.xml (this is clearly documented in IMP&#039;s backends.php), as 
&gt; my confusion over this feature clearly indicates.  And this DOES work 
&gt; for all authentication backends.
&gt;
&gt;&gt; If the same information from the Mailer tab is entered in
&gt;&gt; &#039;imp/config/backends.local.php&#039; with &#039;username&#039; and &#039;password&#039; both
&gt;&gt; null, authentication succeeds, so it looks like there is a problem
&gt;&gt; with initialization the settings from the Mailer tab.
&gt;
&gt; That&#039;s why.  Don&#039;t set &#039;username&#039; and &#039;password&#039; in IMP, because 
&gt; those strings are used as the authentication strings.  If you want to 
&gt; use the Horde defaults, don&#039;t define those strings at all.

OK, I&#039;m officially lost now.

In Horde-5.0.4 I have the following in &#039;config/conf.php&#039;:

$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;port&#039;] = 587;
$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;auth&#039;] = true;
$conf[&#039;mailer&#039;][&#039;type&#039;] = &#039;smtp&#039;;

There is no smtp array in &#039;imp/config/backends.local.php&#039;. This has worked since I started using Horde (about three years ago) and uses the credentials used for authentication to Horde for SMTP authentication. Since the upgrade to the latest beta versions, this no longer works.

What am I supposed to do if I want to use the credentials for logging into Horde for SMTP authentication? Is the configuration in the Mailer tab supposed to work? If yes, this bug is still open because it no longer works. If no, this needs to be documented in the changelist, since this is a BC break.

I *only* added the following in &#039;imp/config/backends.local.php&#039; to work around this.

    &#039;smtp&#039; =&gt; array(
        &#039;auth&#039; =&gt; true,
        &#039;password&#039; =&gt; null,
        &#039;port&#039; =&gt; 587,
        &#039;username&#039; =&gt; null
    ),

The above will use SMTP authentication for sending messages with the credentials for logging into Horde. Is this *not* supposed to work? If not, how should one configure using per-user SMTP authentication for sending messages instead?</description> 
   <pubDate>Sat, 18 May 2013 19:59:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78158</link> 
  </item> 
   
  <item> 
   <title>&gt; There is no smtp array in &#039;imp/config/backends.local.php&#039;.</title> 
   <description>&gt; There is no smtp array in &#039;imp/config/backends.local.php&#039;. This has 
&gt; worked since I started using Horde (about three years ago) and uses 
&gt; the credentials used for authentication to Horde for SMTP 
&gt; authentication. Since the upgrade to the latest beta versions, this 
&gt; no longer works.

This is *exactly* my setup.  My SMTP server requires authentication.  I can verify that IMP uses the Horde authentication credentials to login to the SMTP server.  I have no &#039;smtp&#039; config in IMP&#039;s backends.php.

My Horde SMTP configuration looks like this:

$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;host&#039;] = &#039;localhost&#039;;
$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;port&#039;] = 25;
$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;localhost&#039;] = &#039;localhost&#039;;
$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;auth&#039;] = true;
$conf[&#039;mailer&#039;][&#039;type&#039;] = &#039;smtp&#039;;


In IMP&#039;s IMP_Factory_Mail, I can verify the following as the configuration (the $params variable):

Array
(
    [host] =&gt; localhost
    [port] =&gt; 25
    [localhost] =&gt; localhost
    [auth] =&gt; 1
    [username] =&gt; XXX
    [password] =&gt; YYY
)

I can also verify that these credentials are correctly being set in the SMTP object:

Horde_Mail_Transport_Smtp Object
(
    [greeting] =&gt; 
    [queuedAs] =&gt; 
    [_smtp:protected] =&gt; 
    [_extparams:protected] =&gt; Array
        (
        )

    [sep] =&gt; 

    [_params:protected] =&gt; Array
        (
            [auth] =&gt; 1
            [debug] =&gt; 
            [host] =&gt; localhost
            [localhost] =&gt; localhost
            [password] =&gt; YYY
            [persist] =&gt; 
            [pipelining] =&gt; 
            [port] =&gt; 25
            [timeout] =&gt; 
            [username] =&gt; XXX
        )

)

Proof from the mail headers:

Received: from localhost (localhost.localdomain [127.0.0.1])
	(Authenticated sender: slusarz)
	by bigworm.curecanti.org (Postfix) with ESMTPSA id 37A6E7022
	for &lt;slusarz+test@curecanti.org&gt;; Sat, 18 May 2013 14:09:39 -0600 (MDT)
[snip]
User-Agent: Internet Messaging Program (IMP) H5 (6.1.0-git)</description> 
   <pubDate>Sat, 18 May 2013 20:22:15 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78159</link> 
  </item> 
   
  <item> 
   <title>&gt; Proof from the mail headers:
&gt;
&gt; Received: from localhos</title> 
   <description>&gt; Proof from the mail headers:
&gt;
&gt; Received: from localhost (localhost.localdomain [127.0.0.1])
&gt; 	(Authenticated sender: slusarz)
&gt; 	by bigworm.curecanti.org (Postfix) with ESMTPSA id 37A6E7022
&gt; 	for &lt;slusarz+test@curecanti.org&gt;; Sat, 18 May 2013 14:09:39 -0600 (MDT)
&gt; [snip]
&gt; User-Agent: Internet Messaging Program (IMP) H5 (6.1.0-git)

This bug report is for IMP-6.1.0beta2, your headers show you&#039;re using IMP-6.1.0-git. Could it be there is a difference between the versions from PEAR and Git? Not neccessarily in IMP, but maybe in some other module?</description> 
   <pubDate>Sat, 18 May 2013 20:29:36 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78160</link> 
  </item> 
   
  <item> 
   <title>Turns out there was a limitation in IMP where you could eith</title> 
   <description>Turns out there was a limitation in IMP where you could either use no authentication or IMP authentication, but not Horde authentication.  (Although generally Horde auth == IMP auth, this is not a requirement).  So it&#039;s possible the changes I just made to Horde_Core and IMP will fix for you.</description> 
   <pubDate>Sat, 18 May 2013 21:12:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78161</link> 
  </item> 
   
  <item> 
   <title>I can confirm &#039;horde_auth&#039; parameter in &#039;smtp&#039; works (horde </title> 
   <description>I can confirm &#039;horde_auth&#039; parameter in &#039;smtp&#039; works (horde 5.1.0-git; imp 6.1.0-git):

$servers[&#039;imap&#039;] = array(
    &#039;disabled&#039; =&gt; false,
    &#039;name&#039; =&gt; &#039;IMAP Server&#039;,
    &#039;hostspec&#039; =&gt; &#039;localhost&#039;,
    &#039;hordeauth&#039; =&gt; false,
    &#039;protocol&#039; =&gt; &#039;imap&#039;,
    &#039;port&#039; =&gt; 143,
    &#039;secure&#039; =&gt; &#039;tls&#039;,
    &#039;smtp&#039; =&gt; array(
       &#039;horde_auth&#039; =&gt; true,
     ),
);

horde/config/conf.php:

$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;host&#039;] = &#039;smtp.gmail.com&#039;;
$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;port&#039;] = 587;
$conf[&#039;mailer&#039;][&#039;params&#039;][&#039;auth&#039;] = true;
$conf[&#039;mailer&#039;][&#039;type&#039;] = &#039;smtp&#039;;</description> 
   <pubDate>Thu, 23 May 2013 02:33:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78188</link> 
  </item> 
   
  <item> 
   <title>&gt; I can confirm &#039;horde_auth&#039; parameter in &#039;smtp&#039; works (hord</title> 
   <description>&gt; I can confirm &#039;horde_auth&#039; parameter in &#039;smtp&#039; works (horde 
&gt; 5.1.0-git; imp 6.1.0-git):
&gt;
&gt; $servers[&#039;imap&#039;] = array(
&gt;     &#039;disabled&#039; =&gt; false,
&gt;     &#039;name&#039; =&gt; &#039;IMAP Server&#039;,
&gt;     &#039;hostspec&#039; =&gt; &#039;localhost&#039;,
&gt;     &#039;hordeauth&#039; =&gt; false,
&gt;     &#039;protocol&#039; =&gt; &#039;imap&#039;,
&gt;     &#039;port&#039; =&gt; 143,
&gt;     &#039;secure&#039; =&gt; &#039;tls&#039;,
&gt;     &#039;smtp&#039; =&gt; array(
&gt;        &#039;horde_auth&#039; =&gt; true,
&gt;      ),
&gt; );
&gt;
&gt; horde/config/conf.php:
&gt;
&gt; $conf[&#039;mailer&#039;][&#039;params&#039;][&#039;host&#039;] = &#039;smtp.gmail.com&#039;;
&gt; $conf[&#039;mailer&#039;][&#039;params&#039;][&#039;port&#039;] = 587;
&gt; $conf[&#039;mailer&#039;][&#039;params&#039;][&#039;auth&#039;] = true;
&gt; $conf[&#039;mailer&#039;][&#039;type&#039;] = &#039;smtp&#039;;

I confirmed the above setting is working while if using SMTP on SSL of port 465.  The following setting must be used instead:

$conf[mailer][params][&#039;host&#039;] = &#039;ssl://mail.domain.comg&#039;;
$conf[mailer][params][&#039;port&#039;] = 465;
$conf[mailer][params][&#039;auth&#039;] = true;</description> 
   <pubDate>Mon, 24 Jun 2013 03:06:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12255#t78978</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
