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 |
Assigned to Chuck Hagenbuch
State ⇒ Resolved
changes I made to your patch for next time. Thanks!
State ⇒ Accepted
Milestone ⇒ 1.2
Patch ⇒ Yes
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
State ⇒ New
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