[vilma] config/conf.xml and lib/MailboxDriver/maildrop.php patches
to fix exploding of domain names into directories ...
christopher pickert
cpickert at t3inc.us
Sat Jun 5 19:09:40 PDT 2004
To the horde:
Attached are two patches against the most recently corrected maildrop
driver and subsequent conf.xml entry fixing the explosion of domain
names into the directory tree for the virtual mail. (The code is looking
for the $usedomain boolean, however, it was never defined in the
preference backend) Without it, you would get double slashes in the
maildir without the domain name inbetween.
It's included as a conf.xml boolean preference (in lieu of invering the
instantiation of the $usedomain variable in maildrop.php).Also, fixed a
typo in maildrop.php to find the preference correctly ( "_" typo ). But
it presents an issue and discussion. With $usedomain on, the maildrop
driver seperates the users their own maildir inside an 'exploded'
domain directory, the same way the SQL backend affords, with
"domain.tld/username" in the user_mail_dir column. However, the
maildirmake script does not allow for the creation of this exploded
domainname directory itself, it has to be made by hand and then
chown/chmod'ed. (Or via cron and the included CLI PHP script)
Is it possible the domainname directory could be created, chown/modded
to config spec when the domain is made, via a similar sudo entry like
whats required for the maildirmake in the maildrop driver?
Just some thoughts... The patches help the immediate situation, regardless.
-- Chris Pickert <cpickert at t3inc.us> --
-------------- next part --------------
--- conf.xml 2004-06-04 16:02:59.000000000 -0600
+++ conf.xml-pickert 2004-06-05 19:01:08.000000000 -0600
@@ -10,6 +10,7 @@
<configinteger name="gid" required="false" desc="The system GID for the virtual user">1000</configinteger>
<configstring name="mail_dir_base" desc="The base directory for the mailboxes">/home/vmail</configstring>
<configstring name="system_user" desc="User to run script to create mail dir">vmail</configstring>
+ <configboolean name="usedomain" desc="Use virtual domain directory (exploded) directory structure.">true</configboolean>
</configsection>
</case>
<case name="imap" desc="IMAP Admin driver">
-------------- next part --------------
--- maildrop.php 2004-06-05 19:06:53.000000000 -0600
+++ maildrop.php.pickert 2004-06-05 19:06:40.000000000 -0600
@@ -22,7 +22,7 @@
$dir = $this->_params['mail_dir_base'];
$usedomain = false;
if (isset($this->_params['usedomain'])) {
- $usedomain = $this->params['usedomain'];
+ $usedomain = $this->_params['usedomain'];
}
if ($usedomain) {
$dir .= '/' . $domain;
More information about the vilma
mailing list