Summary | Cannot create procmail rules with Maildir support |
Queue | Ingo |
Queue Version | 2.0.1 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | jan (at) horde (dot) org |
Requester | samuel.wolf (at) wolf-maschinenbau (dot) de |
Created | 05/21/2011 (5174 days ago) |
Due | |
Updated | 08/29/2012 (4708 days ago) |
Assigned | 06/20/2012 (4778 days ago) |
Resolved | 06/21/2012 (4777 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
commit 45a477ae970d3a52dbe2b16b760b4d8f50793060
Author: Michael M Slusarz <slusarz@horde.org>
Date: Wed Jun 20 14:09:00 2012 -0600
Revert "Revert "Fix folder names in Procmail rules if using
Maildir (
Bug 10113).""This reverts commit b3f34852cdce06001d6f3addb0551cd318a303d0.
Returning to original broken commit. Will fix by altering default
configuration options instead.
ingo/config/backends.php | 2 ++
ingo/docs/CHANGES | 1 +
ingo/lib/Script/Procmail/Recipe.php | 15 +++++----------
ingo/package.xml | 1 +
4 files changed, 9 insertions(+), 10 deletions(-)
http://git.horde.org/horde-git/-/commit/45a477ae970d3a52dbe2b16b760b4d8f50793060
commit b3f34852cdce06001d6f3addb0551cd318a303d0
Author: Michael M Slusarz <slusarz@horde.org>
Date: Wed Jun 20 13:40:56 2012 -0600
Revert "Fix folder names in Procmail rules if using Maildir (
Bug 10113)."This reverts commit f42cae5d096f0307e27aaf3b9065dba176cd5694.
Conflicts:
ingo/docs/CHANGES
ingo/package.xml
ingo/config/backends.php | 2 --
ingo/docs/CHANGES | 1 -
ingo/lib/Script/Procmail/Recipe.php | 15 ++++++++++-----
ingo/package.xml | 1 -
4 files changed, 10 insertions(+), 9 deletions(-)
http://git.horde.org/horde-git/-/commit/b3f34852cdce06001d6f3addb0551cd318a303d0
commit 5599f3052996002509b579f2608cab16bc8eec20
Author: Michael M Slusarz <slusarz@horde.org>
Date: Thu Jun 21 09:15:49 2012 -0600
Only override procmail variables if using Maildir (
Bug #10113)ingo/config/backends.php | 12 ++++++------
ingo/lib/Script/Procmail.php | 21 +++++++++++++++++++++
2 files changed, 27 insertions(+), 6 deletions(-)
http://git.horde.org/horde-git/-/commit/5599f3052996002509b579f2608cab16bc8eec20
commit 5599f3052996002509b579f2608cab16bc8eec20
Author: Michael M Slusarz <slusarz@horde.org>
Date: Thu Jun 21 09:15:49 2012 -0600
Only override procmail variables if using Maildir (
Bug #10113)ingo/config/backends.php | 12 ++++++------
ingo/lib/Script/Procmail.php | 21 +++++++++++++++++++++
2 files changed, 27 insertions(+), 6 deletions(-)
http://git.horde.org/horde-git/-/commit/5599f3052996002509b579f2608cab16bc8eec20
Priority ⇒ 2. Medium
State ⇒ Resolved
Marking as resolved again.
/home/user1/Maildir//.Testordner.sasa/
^^^
can generate this mailbox name. From Ingo_Script_Procmail_Recipe:
backends.local.php:
<?php
$backends['imap']['disabled'] = true;
$backends['procmail']['disabled'] = false;
$backends['procmail']['scriptparams']['path_style'] = 'maildir';
$backends['procmail']['scriptparams']['variables']['DEFAULT'] =
'$HOME/Maildir/';
$backends['procmail']['scriptparams']['variables']['VACATION_DIR'] = '$HOME';
With this config Ingo generate the following script:
1: # Von Ingo erzeugtes procmail Script (June 21, 2012, 9:05 am)
2: DEFAULT=$HOME/Maildir/
3:
4: VACATION_DIR=$HOME
5:
6: #### Neue Regel #####
7: :0
8: * ^From:.*root
9: "$DEFAULT/.Testordner.sasa/"
10:
That can not be work:
/home/user1/Maildir//.Testordner.sasa/
^^^
Where is my configuration error?
/home/user/Maildir//.Folder1.Subfolder/
can generate this mailbox name. From Ingo_Script_Procmail_Recipe:
if (isset($this->_params) &&
($this->_params['path_style'] == 'maildir')) {
if (substr($folder, 0, 6) == 'INBOX.') {
$folder = substr($folder, 6);
}
return '".' . escapeshellcmd($folder) . '/"';
}
There is no possible way in the code that anything can be prepended
before the '.'.
did you set DEFAULT=$HOME/Maildir/ in your backends.php?
Ingo generate now wrong rules:
/home/user/Maildir//.Folder1.Subfolder/
How did you solve that problem with procmail in your setup?
State ⇒ Feedback
Priority ⇒ 3. High
Bug 10113)."completely broke mail delivery for me, and I've lost a ton of messages
since activating my new script yesterday.
Now mailboxes look are generated like:
[RULE DEFINITION]
".foo.bar/"
Which tells procmail to deliver to the foo.bar directory in the *base*
home directory. Which by default is the home directory (see $MAILDIR
variable).
$MAILDIR can be used to change the base directory, but this is not
documented in ingo and, worst of all, is a BC breaking change for
existing scripts.
Not sure why we aren't delivering directly to the mailbox name itself anymore:
[RULE DEFINITION]
foo.bar
IIRC, this is the way we did it for years and it worked fine.
I've reverted the original change. However, I am going to re-commit
the original along with adding an explicit MAILDIR variable in
backends.php and making both DEFAULT and MAILDIR active in the default
backends configuration.
commit 93efe59890c2fe6c6f89b20173da639c0ed8d1e8
Author: Michael M Slusarz <slusarz@horde.org>
Date: Wed Jun 20 14:12:31 2012 -0600
[mms] Procmail driver now explicitly sets the base Maildir
directory by default (
Bug #10113).ingo/config/backends.php | 10 ++++++----
ingo/docs/CHANGES | 2 ++
ingo/package.xml | 2 ++
3 files changed, 10 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/93efe59890c2fe6c6f89b20173da639c0ed8d1e8
commit 93efe59890c2fe6c6f89b20173da639c0ed8d1e8
Author: Michael M Slusarz <slusarz@horde.org>
Date: Wed Jun 20 14:12:31 2012 -0600
[mms] Procmail driver now explicitly sets the base Maildir
directory by default (
Bug #10113).ingo/config/backends.php | 10 ++++++----
ingo/docs/CHANGES | 2 ++
ingo/package.xml | 2 ++
3 files changed, 10 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/93efe59890c2fe6c6f89b20173da639c0ed8d1e8
commit 45a477ae970d3a52dbe2b16b760b4d8f50793060
Author: Michael M Slusarz <slusarz@horde.org>
Date: Wed Jun 20 14:09:00 2012 -0600
Revert "Revert "Fix folder names in Procmail rules if using
Maildir (
Bug 10113).""This reverts commit b3f34852cdce06001d6f3addb0551cd318a303d0.
Returning to original broken commit. Will fix by altering default
configuration options instead.
ingo/config/backends.php | 2 ++
ingo/docs/CHANGES | 1 +
ingo/lib/Script/Procmail/Recipe.php | 15 +++++----------
ingo/package.xml | 1 +
4 files changed, 9 insertions(+), 10 deletions(-)
http://git.horde.org/horde-git/-/commit/45a477ae970d3a52dbe2b16b760b4d8f50793060
commit b3f34852cdce06001d6f3addb0551cd318a303d0
Author: Michael M Slusarz <slusarz@horde.org>
Date: Wed Jun 20 13:40:56 2012 -0600
Revert "Fix folder names in Procmail rules if using Maildir (
Bug 10113)."This reverts commit f42cae5d096f0307e27aaf3b9065dba176cd5694.
Conflicts:
ingo/docs/CHANGES
ingo/package.xml
ingo/config/backends.php | 2 --
ingo/docs/CHANGES | 1 -
ingo/lib/Script/Procmail/Recipe.php | 15 ++++++++++-----
ingo/package.xml | 1 -
4 files changed, 10 insertions(+), 9 deletions(-)
http://git.horde.org/horde-git/-/commit/b3f34852cdce06001d6f3addb0551cd318a303d0
commit f42cae5d096f0307e27aaf3b9065dba176cd5694
Author: Jan Schneider <jan@horde.org>
Date: Wed Apr 18 16:28:03 2012 +0200
Fix folder names in Procmail rules if using Maildir (
Bug 10113).In procmail rules, $DEFAULT should only be used for INBOX
delivering. It's not
necessary (and actually seems to cause problems) to use it to
build folder path
names.
ingo/config/backends.php | 2 ++
ingo/docs/CHANGES | 1 +
ingo/lib/Script/Procmail/Recipe.php | 15 +++++----------
ingo/package.xml | 2 ++
4 files changed, 10 insertions(+), 10 deletions(-)
http://git.horde.org/horde-git/-/commit/f42cae5d096f0307e27aaf3b9065dba176cd5694
commit f42cae5d096f0307e27aaf3b9065dba176cd5694
Author: Jan Schneider <jan@horde.org>
Date: Wed Apr 18 16:28:03 2012 +0200
Fix folder names in Procmail rules if using Maildir (
Bug 10113).In procmail rules, $DEFAULT should only be used for INBOX
delivering. It's not
necessary (and actually seems to cause problems) to use it to
build folder path
names.
ingo/config/backends.php | 2 ++
ingo/docs/CHANGES | 1 +
ingo/lib/Script/Procmail/Recipe.php | 15 +++++----------
ingo/package.xml | 2 ++
4 files changed, 10 insertions(+), 10 deletions(-)
http://git.horde.org/horde-git/-/commit/f42cae5d096f0307e27aaf3b9065dba176cd5694
State ⇒ Resolved
"DEFAULT=$HOME/Maildir/"
#3?path_style to maildir.
trailing slash in backends.local.php and set path_style to maildir.
you have set this in the 'variables' setting.
the home directory.
But what should be change/different with the comment
#3?trailing slash in backends.local.php and set path_style to maildir.
you have set this in the 'variables' setting.
trailing slash in backends.local.php and set path_style to maildir.
State ⇒ Feedback
slash in backends.local.php and set path_style to maildir.
Add trailing slash to $DEFAULT if using maildir format. Might fix
bug #10113.1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/ffd0144566bdc86aadec97b36f55c61d561d5b39
../ingo/lib/Script/Procmail/Recipe.php
#################################################################
return '"$DEFAULT/.' . escapeshellcmd($folder) . '/"';
#################################################################
to
#################################################################
return '"$DEFAULT.' . escapeshellcmd($folder) . '/"';
#################################################################
But I found another problem, my Maildir don't use / for subfolders it
separate the folder with points.
"Folder1.Subfolder1.Subfolder2"
I can solve the problem by add following in
../ingo/lib/Script/Procmail/Recipe.php
#################################################################
}
return '"$DEFAULT.' . escapeshellcmd($folder) . '/"';
} else {
#################################################################
to
#################################################################
}
$folder = str_replace("/", ".", $folder);
return '"$DEFAULT.' . escapeshellcmd($folder) . '/"';
} else {
#################################################################
Don't know it's a good way, but still work.
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Summary ⇒ Cannot create procmail rules with Maildir support
Type ⇒ Bug
Queue ⇒ Ingo
"DEFAULT=$HOME/Maildir/"
("DEFAULT=$HOME/Maildir" this would equal mbox format!).
Ingo applies following filter rule:
# Von Ingo erzeugtes procmail Script (May 21, 2011, 9:33 pm)
DEFAULT=$HOME/Maildir/
##### test #####
:0
* ^From:.*root@server\.test\.intern
"$DEFAULT/.INBOX/Admin/"
Which leads to that Procmail cannot process the filter rules:
procmail: Unable to treat as directory "/home/user1/Maildir//.INBOX/Admin"
procmail: Error while writing to "/home/user1/Maildir//.INBOX/Admin"
From root@server.test.intern Sat May 21 20:46:17 2011
Subject: procmailtest
Folder: /home/user1/Maildir/new/1306003577.10892_0.mailserver 923
Correct would be the following filter rule:
# Procmail Script generated by Ingo (May 21, 2011, 8:46 pm)
...
"$DEFAULT.INBOX/Admin/"
--> without slash
backends.php:
'scriptparams' => array(
// What path style does the IMAP server use ['mbox'|'maildir']?
'path_style' => 'maildir',