[Tickets #6433] add procmail support for external delivery [patch]
bugs at horde.org
bugs at horde.org
Wed Mar 12 11:03:49 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/6433
-----------------------------------------------------------------------
Ticket | 6433
Created By | Michael.Redinger at uibk.ac.at
Summary | add procmail support for external delivery [patch]
Queue | Ingo
Version | 1.2-RC2
Type | Enhancement
State | New
Priority | 1. Low
Milestone |
Patch |
Owners |
+New Attachment | ingo-procmail-externaldeliver.tar.gz
-----------------------------------------------------------------------
Michael.Redinger at uibk.ac.at (2008-03-12 07:03) wrote:
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
More information about the bugs
mailing list