Horde: Unterschied zwischen den Versionen

Aus crazylinux.de
Zur Navigation springen Zur Suche springen
K (removed, old bug)
Zeile 63: Zeile 63:
     'type' => 'implicit');
     'type' => 'implicit');
php?>
php?>
</pre>
</pre
 
==Weiterleitung/Forward==
Damit der Username inkl. Domain an das Backend (ftp) weitergegeben wird, muß forward/main.php angepaßt werden:
<pre>
...
// Get the current login username and realm.
#$split = explode('@', Auth::getAuth());
#$user = @$split[0];
$user = Auth::getAuth();
$realm = @$split[1];
...
</pre>


[[Kategorie:Tips_und_Tricks]]
[[Kategorie:Tips_und_Tricks]]
[[Kategorie:WWW]]
[[Kategorie:WWW]]
[[Kategorie:PHP]]
[[Kategorie:PHP]]

Version vom 12. Juni 2015, 22:25 Uhr

Horde ist ein PHP-Framework für Webapplikationen. Darüber hinaus gibt es bereits fertige Apps, wie z.b. Webmail IMP

Upgrade

upgrade is done via pear

#as root
umask 022
pear upgrade

then check for bug (BasicAuth and ActiveSync) below

Known Bugs

BasicAuth and ActiveSync

If BasicAuth is used for Authentication, ActiveSync is not working. See http://bugs.horde.org/ticket/11801

Workaround:

#/usr/share/php/Horde/Auth/Http.php
#beginning of _authenticate()
         #return true if htpasswd-file is empty and transparent is working, no need to check more
         if (empty($this->_params['htpasswd_file']) && $this->transparent()) {
                 return true;
         }

Pear Error

If you get the error "CRITICAL ERROR: Registry could not be initialized from any value" the rights are probably wrong. E.g. /usr/share/php or /usr/share/php//usr/share/php/.registry must be readable/executable by e.g. webserver account www-data.

Module

Emailfilter/Ingo

Dovecot bringt einen Sieve-Filter-Server mit, diesen kann man mit Horde nutzen: http://www.radnerd.de/artikel/vom-radsport/2013/02/sieve-mit-dovecot-und-horde-5-ingo.html

Für einen Defaultfilter gibt es ein Hook (horde/config/hooks.php)

<?php

   public function transport_auth($driver)
    {
        switch ($driver) {
        case 'timsieved':
            // Example #1: Use full Horde username for password.
            return array('euser' => $GLOBALS['registry']->getAuth(null), 'username' => $GLOBALS['registry']->getAuth(null));

            // Example #2: Use IMP password/username.
            //$ob = $GLOBALS['registry']->call('mail/imapOb');
            //return array(
            //    'password' => $ob->getParam('password'),
            //    'username' => $ob->getParam('username')
            //);
        }

        // DEFAULT: Use hordeauth (identical to not defining hook at all).
        //return true;
    }



// filter rules
$_prefs['rules'] = array(
    'value' => 'a:5:{i:0;a:8:{s:4:"name";s:9:"move_Spam";s:7:"combine";s:1:"1";s:10:"conditions";a:1:{i:0;a:5:{s:5:"field";s:13:"X-Spam-Status";s:4:"type";i:1;s:5:"match";s:8:"contains";s:5:"value";s:3:"YES";s:4:"case";s:1:"1";}}s:6:"action";s:1:"2";s:12:"action-value";s:10:"INBOX.Spam";s:4:"stop";N;s:5:"flags";i:0;s:7:"disable";b:0;}i:1;a:2:{s:4:"name";s:9:"Whitelist";s:6:"action";i:9;}i:2;a:3:{s:4:"name";s:8:"Vacation";s:6:"action";i:8;s:7:"disable";b:1;}i:3;a:2:{s:4:"name";s:9:"Blacklist";s:6:"action";i:7;}i:4;a:2:{s:4:"name";s:7:"Forward";s:6:"action";i:10;}}',
    'locked' => false,
    'shared' => false,
    'type' => 'implicit');
php?>
</pre