Summary | procmail with Maildir does not work |
Queue | Ingo |
Queue Version | 1.0.1 |
Type | Bug |
State | Not A Bug |
Priority | 2. Medium |
Owners | ben (at) |
Requester | micha (at) kovoks (dot) nl |
Created | 07/06/2005 (7322 days ago) |
Due | |
Updated | 07/06/2005 (7322 days ago) |
Assigned | 07/06/2005 (7322 days ago) |
Resolved | 07/06/2005 (7322 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
this in the backends.php example.
State ⇒ Not A Bug
configured differently. For example, where I work we don't need
anything in the variables because of how we have procmail configured.
So, your patch makes assumptions about the environment that aren't
necessarily true.
The configuration is working as expected. I added another example to
backends.php.dist to hopefully clear up some confusion.
$backends['procmail'] = array(
'driver' => 'vfs',
'preferred' => '',
'hordeauth' => 'full',
'params' => array(
// Hostname of the VFS server
'hostspec' => 'localhost',
// Name of the procmail config file to write
'procmailrc' => '.procmailrc',
// Port of the VFS server
'port' => 21,
// The VFS driver to use
'vfstype' => 'ftp'
),
'script' => 'procmail',
'scriptparams' => array(
// What path style does the IMAP server use ['mbox'|'maildir']?
'path_style' => 'maildir',
// An array of variables to append to every generated script.
// Use if you need to set up specific environment variables.
'variables' => array(
// Example for the $PATH variable
'PATH' => '/usr/sbin:/usr/bin:/bin',
'MAILDIR' => '$HOME/Maildir',
'DEFAULT' => '$MAILDIR/',
'SHELL' => '/bin/sh',
'TERM' => 'vt100',
'LOGFILE' => '$HOME/procmail.log'
)
)
);
procmail/maildir. But this was a new installation and the 'problem'
does not exists if you have set the 'variables' correct. But I forgot
that that was nessecery and I dindn't find it logical. backends.php is
following:
$backends['procmail'] = array(
'driver' => 'vfs',
'preferred' => 'artserver',
'hordeauth' => true,
'params' => array(
// Hostname of the VFS server
'hostspec' => 'localhost',
// Name of the procmail config file to write
'procmailrc' => '.procmailrc',
// Port of the VFS server
'port' => 21,
// The VFS driver to use
'vfstype' => 'ftp'
),
'script' => 'procmail',
'scriptparams' => array(
// What path style does the IMAP server use ['mbox'|'maildir']?
'path_style' => 'maildir',
// An array of variables to append to every generated script.
// Use if you need to set up specific environment variables.
'variables' => array(
// Example for the $PATH variable
'LOGFILE' => '$HOME/procmail.log'
)
)
);
State ⇒ Feedback
no problems, so my initial thoughts are a misconfigured backend.
Please post your entire backends.php.
State ⇒ Assigned
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ procmail with Maildir does not work
Queue ⇒ Ingo
If I choose Maildir in my backends.php (path_style => maildir) my mail
is deliverd in /var/spool/mail/ . I think this is because the MAILDIR
variable is not set on default. I suspect the administrator does not
expect this behaviour and the following patch can solve this problem.
--- procmail.php.orig 2005-07-06 10:49:01.000000000 +0200
+++ procmail.php 2005-07-06 10:45:56.000000000 +0200
@@ -125,6 +125,12 @@
$this->addItem(new Procmail_Comment(_("procmail script
generated by Ingo") . ' (' . date('F j, Y, g:i a') . ')'));
+ /* Add Maildir variable if there is maildir */
+ if ($this->_params['path_style'] == 'maildir') {
+ $this->addItem(new Procmail_variable(array('name' =>
'MAILDIR', 'value' => '$HOME/Maildir')));
+ $this->addItem(new Procmail_variable(array('name' =>
'DEFAULT', 'value' => '$MAILDIR/')));
+ }
+
/* Add variable information, if present. */
if (!empty($this->_params['variables']) &&
is_array($this->_params['variables'])) {