Changeset 3703 in subversion


Ignore:
Timestamp:
Jun 3, 2010 4:11:42 AM (3 years ago)
Author:
alec
Message:
  • Support %n and %d variables in managesieve_host option
Location:
trunk/plugins/managesieve
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/managesieve/Changelog

    r3593 r3703  
     1* version 2.6 [2010-06-03] 
     2----------------------------------------------------------- 
     3- Support %n and %d variables in managesieve_host option 
     4 
    15* version 2.5 [2010-05-04] 
    26----------------------------------------------------------- 
  • trunk/plugins/managesieve/config.inc.php.dist

    r3593 r3703  
    55 
    66// managesieve server address, default is localhost. 
    7 // Use %h variable as replacement for user's IMAP hostname 
     7// Replacement variables supported in host name: 
     8// %h - user's IMAP hostname 
     9// %n - http hostname ($_SERVER['SERVER_NAME']) 
     10// %d - domain (http hostname without the first part) 
     11// For example %n = mail.domain.tld, %d = domain.tld 
    812$rcmail_config['managesieve_host'] = 'localhost'; 
    913 
  • trunk/plugins/managesieve/managesieve.php

    r3605 r3703  
    88 * with server using managesieve protocol. Adds Filters tab in Settings. 
    99 * 
    10  * @version 2.5 
     10 * @version 2.6 
    1111 * @author Aleksander 'A.L.E.C' Machniak <alec@alec.pl> 
    1212 * 
     
    6363        require_once($this->home . '/lib/rcube_sieve.php'); 
    6464 
    65         $host = str_replace('%h', $_SESSION['imap_host'], $this->rc->config->get('managesieve_host', 'localhost')); 
     65        $host = rcube_parse_host($this->rc->config->get('managesieve_host', 'localhost')); 
    6666        $port = $this->rc->config->get('managesieve_port', 2000); 
    6767 
    6868        // try to connect to managesieve server and to fetch the script 
    6969        $this->sieve = new rcube_sieve($_SESSION['username'], 
    70         $this->rc->decrypt($_SESSION['password']), $host, $port, 
     70            $this->rc->decrypt($_SESSION['password']), $host, $port, 
    7171            $this->rc->config->get('managesieve_usetls', false), 
    7272            $this->rc->config->get('managesieve_disabled_extensions'), 
Note: See TracChangeset for help on using the changeset viewer.