[pkg-horde] Bug#544562: ingo1: Domain name support in the VFS driver
Frederic MASSOT
frederic at juliana-multimedia.com
Tue Sep 1 15:32:40 UTC 2009
Package: ingo1
Version: 1.2.1-1
Severity: wishlist
Tags: patch
Hi,
I use Horde3, Ingo1, Maildrop and Postfix with virtual mailbox.
I configured ingo1 for vacation with maildrop backend and VFS/FTP driver.
To differentiate users from different domains, I needed the domain name
for the parameter vfs_path. I have modified the file "/usr/share/horde3/ingo/lib/Driver/vfs.php".
Below the patch:
--- vfs-orig.php 2009-05-01 17:16:24.000000000 +0200
+++ vfs.php 2009-08-27 15:15:13.000000000 +0200
@@ -120,15 +120,17 @@
/* Do variable substitution. */
if (!empty($this->_params['vfs_path'])) {
$user = Ingo::getUser();
+ $domain = '';
if ($_SESSION['ingo']['backend']['hordeauth'] !== 'full') {
$pos = strpos($user, '@');
if ($pos !== false) {
+ $domain = substr($user, $pos+1);
$user = substr($user, 0, $pos);
}
}
$this->_params['vfs_path'] = str_replace(
- array('%u', '%U'),
- array($user, $this->_params['username']),
+ array('%u', '%d', '%U'),
+ array($user, $domain, $this->_params['username']),
$this->_params['vfs_path']);
}
In the configuration file "/etc/horde/ingo1/backends.php" that can be used in this way:
vfs_path' => '/data/maildrop/filters/%d/%u',
Can you submit it to upstream?
Regards.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.25 (SMP w/2 CPU cores)
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/dash
Versions of packages ingo1 depends on:
ii horde3 3.3.4+debian0-1 horde web application framework
Versions of packages ingo1 recommends:
ii php5-imap 5.2.6.dfsg.1-1+lenny3 IMAP module for php5
Versions of packages ingo1 suggests:
ii imp4 4.3.4+debian0-1 webmail component for horde framew
ii php-net-sieve 1.1.6-1 net_sieve module for PEAR
-- no debconf information
More information about the pkg-horde-hackers
mailing list