<?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>add procmail support for external delivery</title> 
  <pubDate>Fri, 10 Apr 2026 01:27:07 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/6433</link> 
  <atom:link rel="self" type="application/rss+xml" title="add procmail support for external delivery" href="https://bugs.horde.org/ticket/6433/rss" /> 
  <description>add procmail support for external delivery</description> 
 
   
   
  <item> 
   <title>Currenty the Ingo procmail script does not work if procmail </title> 
   <description>Currenty the Ingo procmail script does not work if procmail on your server can deliver the mails directly and does not need an external delivery program.



However, on some mail servers an external program is required, eg. if you use a mailbox format that procmail does not support directly (like mbx for uwash imapd). In that case you hand the delivery off to an external program:



:0 w

* someconditions

| /usr/local/sbin/dmail +$DEFAULT





In most cases, this also means that the usage of procmail has to be set in the .forward file in the user&#039;s home directory, eg.:

&quot;|/usr/local/bin/procmail&quot;



The .procmail file always contains one final line the unconditionally delivers to the inbox if no other condition was met:

:0 w

| /usr/local/sbin/dmail +$DEFAULT

(also note the &#039;w&#039; - procmail should wait for the external program)



This also means that no empty procmail script must be generated - instead, the old configuration should be deleted (vfs.php). An empty file would result in a delivery error (as the external delivery program is not called).



I wrote two patches that implement this behaviour and make it configurable.

You can set the behaviour described above by setting:



$backends[&#039;procmail&#039;] = array(

    // generate .forward

    &#039;forwardstring&#039; =&gt; &#039;&quot;|/usr/local/bin/procmail&quot;&#039;,

    ...

    &#039;scriptparams&#039; =&gt; array(

       // use external delivery program

        &#039;deliver&#039; =&gt; &#039;/usr/local/sbin/dmail&#039;,

       // most external programs need a prefix for the box, eg

       // dmail +mybox

       // I have different prefixes, so it must be configured properly here

        &#039;deliverboxprefix&#039; =&gt; &#039;+&#039;,

       ...

      )

)





- the first patch changes lib/Script/procmail:

  * add default deliver

  * change delivery lines to |deliver +/-/#MAILBOX

  * add &quot;w&quot; to &quot;:0&quot; for external delivery

- the second patch changes lib/Driver/vfs.php

  * delete the script if it is empty (do not generate empty one)

  * if backend is forward and forwardstring is set, generate .forward

</description> 
   <pubDate>Wed, 12 Mar 2008 11:03:48 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6433#t43740</link> 
  </item> 
   
  <item> 
   <title>Committed. Please have a look at horde/docs/CODING_STANDARDS</title> 
   <description>Committed. Please have a look at horde/docs/CODING_STANDARDS and the changes I made to your patch for next time. Thanks!</description> 
   <pubDate>Wed, 09 Apr 2008 02:16:25 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/6433#t44507</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
