6.0.0-beta1
7/7/25

[#6433] add procmail support for external delivery
Summary add procmail support for external delivery
Queue Ingo
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester Michael.Redinger (at) uibk (dot) ac (dot) at
Created 03/12/2008 (6326 days ago)
Due
Updated 04/09/2008 (6298 days ago)
Assigned
Resolved 04/09/2008 (6298 days ago)
Milestone 1.2
Patch Yes

History
04/09/2008 02:16:25 AM Chuck Hagenbuch Comment #2
Assigned to Chuck Hagenbuch
State ⇒ Resolved
Reply to this comment
Committed. Please have a look at horde/docs/CODING_STANDARDS and the 
changes I made to your patch for next time. Thanks!
03/12/2008 05:56:24 PM Chuck Hagenbuch Summary ⇒ add procmail support for external delivery
State ⇒ Accepted
Milestone ⇒ 1.2
Patch ⇒ Yes
 
03/12/2008 05:56:10 PM Chuck Hagenbuch Version ⇒ HEAD
 
03/12/2008 11:03:48 AM Michael (dot) Redinger (at) uibk (dot) ac (dot) at Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ add procmail support for external delivery [patch]
Queue ⇒ Ingo
Milestone ⇒
Patch ⇒ No
New Attachment: ingo-procmail-externaldeliver.tar.gz Download
State ⇒ New
Reply to this comment
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's home directory, eg.:

"|/usr/local/bin/procmail"



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 'w' - 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['procmail'] = array(

     // generate .forward

     'forwardstring' => '"|/usr/local/bin/procmail"',

     ...

     'scriptparams' => array(

        // use external delivery program

         'deliver' => '/usr/local/sbin/dmail',

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

        // dmail +mybox

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

         'deliverboxprefix' => '+',

        ...

       )

)





- the first patch changes lib/Script/procmail:

   * add default deliver

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

   * add "w" to ":0" 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


Saved Queries