Re: vacation 3.0-rc1: per realm configuration problems

Jan Schneider <[email protected]>
Newsgroups gmane.comp.horde.sork
Message-ID <[email protected]>
Zitat von Rafael Varela Pet <[email protected]>:

> Hi,
>
> It seems that bugs.horde.org is down, so I'll place this topic on the list.
>
> We have configured vacation 3.0-rc1 to have different settings   
> depending on the
> realm of the user:
>
> <?php
> /* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */ // $Horde:
> vacation/config/conf.xml,v 1.12 2005/10/25 11:41:57 jan Exp $
> $conf['vacation']['path'] = '/usr/bin/vacation';
> $conf['vacation']['default'] = 'Subject: ' . _("On vacation   
> message") . "\n" .
> _("I'm on vacation and will not be reading my mail for a while.") . "\n" .
> _("Your mail will be dealt with when I return.") . "\n";;
> $conf['vacation']['subject'] = true;
> $conf['server']['params']['default']['host'] = 'localhost';
> $conf['server']['params']['default']['port'] = 21;
> $conf['server']['params']['default']['pasv'] = false;
> $conf['server']['params']['default']['hordeauth'] = false;
> $conf['server']['params']['default']['norealm'] = true;
> $conf['server']['params']['default']['dbtype'] = 'hash3';
> $conf['server']['driver'] = 'forwards';
> $conf['aliases']['show'] = true; $conf['aliases']['driver'] = 'none';
> $conf['user']['refused'] = array('root', 'bin', 'daemon', 'adm', 'lp',
> 'shutdown', 'halt', 'uucp', 'ftp', 'anonymous', 'nobody', 'httpd',   
> 'operator',
> 'guest', 'diginext', 'bind', 'cyrus', 'courier', 'games', 'kmem', 'mailnull',
> 'man', 'mysql', 'news', 'postfix', 'sshd', 'tty', 'www');
> $conf['menu']['apps'] = array('imp');
> /* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
>
> $conf['server']['params']['domain.es'] = array(
>     'host' => 'server.domain.es',
>     'port' => 21,
>     'pasv' => false,
>     'norealm' => true,
>     'dbtype' => 'hash3' );
>
> $conf['server']['params']['anotherdomain.es'] = array(
>     'host' => 'server.anotherdomain.es',
>     'port' => 21,
>     'pasv' => false,
>     'norealm' => true,
>     'dbtype' => 'hash3' );
>
>
> The question is that vacation ignores the specific settings for 'domain.es',
> always falling back to the default settings.
>
> After some investigation, I have found that the problem is solved   
> applying the
> following patch to main.php
>
>
> --- main.php.dist        2006-04-04 17:40:58.000000000 +0200
> +++ main.php        2006-04-04 12:03:09.000000000 +0200
> @@ -21,7 +21,7 @@
>  $split = explode('@', Auth::getAuth());
>  $user = @$split[0];
>  $realm = @$split[1];
> -if (empty($realm) || !@is_array($driver->params[$realm])) {
> +if (empty($realm)) {
>      $realm = 'default';
>  }

This doesn't make any sense, because with this change you add an  
additional case where the realm is *not* used.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/

-- 
Sork mailing list - Join the hunt: http://horde.org/bounties/#sork
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.