gunnar: server/horde-imp Makefile, NONE, 1.1 conf.php, NONE, 1.1 horde-imp-kolab.spec, NONE, 1.1 servers.php, NONE, 1.1

cvs at kolab.org cvs at kolab.org
Fri May 25 12:55:39 CEST 2007


Author: gunnar

Update of /kolabrepository/server/horde-imp
In directory doto:/tmp/cvs-serv16704

Added Files:
	Makefile conf.php horde-imp-kolab.spec servers.php 
Log Message:
The horde-imp package.

--- NEW FILE: Makefile ---
RPM = /kolab/bin/openpkg rpm
HORDE_NAME = $(shell grep "%define[ ]*V_horde_name" *.spec | sed -e "s/.*V_horde_name \([a-z-]*\).*/\1/")
YEAR = $(shell grep "%define[ ]*V_year" *.spec | sed -e "s/.*V_year\s*\([0-9]*\).*/\1/")
MONTH = $(shell grep "%define[ ]*V_month" *.spec | sed -e "s/.*V_month\s*\([0-9]*\).*/\1/")
DAY = $(shell grep "%define[ ]*V_day" *.spec | sed -e "s/.*V_day\s*\([0-9]*\).*/\1/")

DATE = ${YEAR}-${MONTH}-${DAY}

PACKAGE = horde-$(HORDE_NAME)-kolab
VERSION = ${YEAR}${MONTH}${DAY}
RELEASE = $(shell grep "%define[ ]*V_release" *.spec | sed -e "s/.*V_release\s*\([0-9]*\).*/\1/")

PATCHES = $(shell find . -name "*.patch")
TEMPLATES = $(shell find . -name "*.template")
CONFIGS = $(shell find . -name "*.php")

ifeq "x$(KOLABRPMSRC)" "x"
  KOLABRPMSRC = /kolab/RPM/SRC
endif

# Remove once moving to kolab cvs
PACKAGE_0=$(HORDE_NAME)-HEAD-$(DATE).tar.gz
SOURCE_0=http://ftp.horde.org/pub/snaps/${DATE}/$(PACKAGE_0)

all:
	test -d $(KOLABRPMSRC)/$(PACKAGE) || mkdir $(KOLABRPMSRC)/$(PACKAGE)
	cd $(KOLABRPMSRC)/$(PACKAGE) && wget -c "$(SOURCE_0)"

	cp $(PACKAGE).spec $(KOLABRPMSRC)/$(PACKAGE)

	if [ -n "$(PATCHES)" ]; then              \
	  for PATCH in $(PATCHES);             \
	  do                                        \
	    cp $$PATCH $(KOLABRPMSRC)/$(PACKAGE);\
	  done;                                     \
	fi

	if [ -n "$(TEMPLATES)" ]; then              \
	  for TEMPLATE in $(TEMPLATES);             \
	  do                                        \
	    cp $$TEMPLATE $(KOLABRPMSRC)/$(PACKAGE);\
	  done;                                     \
	fi

	if [ -n "$(CONFIGS)" ]; then                \
	  for CONFIG in $(CONFIGS);                 \
	  do                                        \
	    cp $$CONFIG $(KOLABRPMSRC)/$(PACKAGE);  \
	  done;                                     \
	fi

	cd $(KOLABRPMSRC)/$(PACKAGE) && $(RPM) -ba $(PACKAGE).spec

dist: all
	cp $(KOLABRPMSRC)/../PKG/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm ../stage/

binary:
	$(RPM) -bB $(PACKAGE).spec

--- NEW FILE: conf.php ---
<?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Horde: imp/config/conf.xml,v 1.101 2007/05/03 15:25:18 chuck Exp $
$conf['spell']['path'] = '/usr/bin/aspell';
$conf['spell']['driver'] = 'aspell';
$conf['utils']['gnupg'] = '/usr/bin/gpg';
$conf['utils']['gnupg_keyserver'] = array('wwwkeys.pgp.net');
$conf['utils']['gnupg_timeout'] = 10;
$conf['utils']['openssl_cafile'] = '/etc/ssl/certs';
$conf['utils']['openssl_binary'] = '/usr/bin/openssl';
$conf['menu']['apps'] = array();
$conf['user']['select_sentmail_folder'] = true;
$conf['user']['allow_resume_all_in_drafts'] = false;
$conf['user']['allow_folders'] = true;
$conf['user']['allow_resume_all'] = false;
$conf['user']['allow_view_source'] = true;
$conf['user']['alternate_login'] = false;
$conf['user']['redirect_on_logout'] = false;
$conf['user']['select_view'] = true;
$conf['server']['change_server'] = false;
$conf['server']['change_port'] = false;
$conf['server']['change_protocol'] = false;
$conf['server']['change_smtphost'] = false;
$conf['server']['change_smtpport'] = false;
$conf['server']['server_list'] = 'none';
$conf['server']['sort_limit'] = 0;
$conf['server']['cache_folders'] = false;
$conf['server']['cache_msgbody'] = false;
$conf['mailbox']['show_attachments'] = false;
$conf['mailbox']['show_preview'] = true;
$conf['mailbox']['show_xpriority'] = false;
$conf['fetchmail']['show_account_colors'] = false;
$conf['fetchmail']['size_limit'] = 4000000;
$conf['mboxcache']['use_mboxcache'] = false;
$conf['msgsettings']['filtering']['words'] = './config/filter.txt';
$conf['msgsettings']['filtering']['replacement'] = '****';
$conf['spam']['reporting'] = false;
$conf['notspam']['reporting'] = false;
$conf['print']['add_printedby'] = false;
$conf['msg']['prepend_header'] = true;
$conf['msg']['append_trailer'] = false;
$conf['compose']['allow_receipts'] = true;
$conf['compose']['special_characters'] = true;
$conf['compose']['use_vfs'] = true;
$conf['compose']['link_all_attachments'] = false;
$conf['compose']['link_attachments_notify'] = true;
$conf['compose']['link_attachments'] = true;
$conf['compose']['attach_size_limit'] = 0;
$conf['compose']['attach_count_limit'] = 0;
$conf['compose']['reply_limit'] = 200000;
$conf['hooks']['vinfo'] = false;
$conf['hooks']['postlogin'] = false;
$conf['hooks']['postsent'] = false;
$conf['hooks']['signature'] = false;
$conf['hooks']['trailer'] = false;
$conf['hooks']['fetchmail_filter'] = false;
$conf['hooks']['mbox_redirect'] = true;
$conf['hooks']['mbox_icon'] = true;
$conf['hooks']['spam_bounce'] = false;
$conf['maillog']['use_maillog'] = true;
$conf['sentmail']['driver'] = 'none';
$conf['tasklist']['use_tasklist'] = true;
$conf['notepad']['use_notepad'] = true;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

--- NEW FILE: horde-imp-kolab.spec ---
# Versions
%define         V_horde_name imp
%define         V_package horde-%{V_horde_name}-kolab
%define         V_year  2007
%define         V_month 05
%define         V_day   24
%define		V_version %{V_year}%{V_month}%{V_day}
%define		V_date %{V_year}-%{V_month}-%{V_day}
%define         V_release 1

# Package Information
Name:		%{V_package}
Summary:	IMP is the Internet Messaging Program.
URL:		http://www.horde.org/
Packager:	Gunnar Wrobel <wrobel at pardus.de> (p at rdus)
Version:	%{V_version}
Release:	%{V_release}
Class:		JUNK
License:	GPL
Group:		MAIL
Distribution:	OpenPKG

# List of Sources
Source0:	http://ftp.horde.org/pub/snaps/%{V_date}/%{V_horde_name}-HEAD-%{V_date}.tar.gz
Source1:        conf.php
Source2:        servers.php

# Build Info
Prefix:		%{l_prefix}
BuildRoot:	%{l_buildroot}
BuildPreReq:	apache, php, php::with_pear = yes
PreReq:		PEAR-Auth_SASL >= 1.0.2, horde-kolab >= 20070131, apache, php, php::with_pear = yes
AutoReq:      no
AutoReqProv:  no
#BuildArch:    noarch

%description 
IMP is the Internet Messaging Program.

%prep
	%setup -c -q

%build

%install
	rm -rf $RPM_BUILD_ROOT

	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/imp
	%{l_shtool} install -d $RPM_BUILD_ROOT%{l_prefix}/etc/kolab/templates	

	cd imp/config && for fl in *.dist;do cp $fl ${fl/.dist/};done; cd ../..

	cp -r imp $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/

	%{l_shtool} install -c -m 644 %{l_value -s -a} %{S:1} %{S:2} \
	  $RPM_BUILD_ROOT%{l_prefix}/var/kolab/www/horde/imp/config/

	%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}                     \
		"%config(noreplace) %{l_prefix}/var/kolab/www/horde/imp/config/conf.php"   \
		"%config(noreplace) %{l_prefix}/var/kolab/www/horde/imp/config/servers.php" 

%clean
	rm -rf $RPM_BUILD_ROOT

%files -f files

--- NEW FILE: servers.php ---
<?php
/**
 * $Horde: imp/config/servers.php.dist,v 1.77 2006/10/10 14:13:03 jan Exp $
 *
 * This file is where you specify what mail servers people using your
 * installation of IMP can log in to.
 *
 * Properties that can be set for each server:
 *
 * name: This is the plaintext, english name that you want displayed
 *       to people if you are using the drop down server list.
 *
 * server: The hostname of the mail server to connect to.
 *
 * hordeauth: If this parameter is present and true, then IMP will attempt
 *            to use the user's existing credentials (the username/password
 *            they used to log in to Horde) to log in to this source. If this
 *            parameter is 'full', the username will be used unmodified;
 *            otherwise everything after and including the first @ in the
 *            username will be stripped off before attempting authentication.
 *
 * protocol: One of the following strings:
 *             + 'imap/notls'
 *             + 'imap/ssl'
 *             + 'imap/tls'
 *             + 'pop3/notls'
 *             + 'pop3/ssl'
 *             + 'pop3/tls'
 *
 *           If using 'pop3/*' you will connect to a POP3 mail server and
 *           all folder options will be automatically turned off (POP3 does
 *           not support folders).  If you want folders (and for much
 *           improved performance) it is HIGHLY RECOMMENDED that IMAP should
 *           be used instead.
 *
 *           NOTE: Due to limitations within PHP, IMP can only support auto-
 *                 detection of namespace parameters with IMAP TLS connections
 *                 (e.g 'imap/tls') if using PHP version 5.1.0 or greater.
 *                 If using a version of PHP less than 5.1.0, the following
 *                 options are available:
 *                 1. RECOMMENDED - If a secure IMAP connection is needed, use
 *                    a direct connection to a SSL enabled IMAP port
 *                    (e.g. 'imap/ssl').
 *                 2. If you absolutely must use TLS, then it is REQUIRED to
 *                    define the 'namespace' parameter (see below).
 *
 *           The ssl and tls options will only work if you've compiled PHP
 *           against a SSL-enabled version of c-client, used the
 *           --with-imap-ssl and --with-openssl flags when compiling PHP,
 *           and you have a mail server server which supports SSL.
 *
 *           ** The test script can help automatically determine the   **
 *           ** correct protocol value to use.  See the 'Testing IMP'  **
 *           ** section of imp/docs/INSTALL for instructions on how to **
 *           ** access the test script.                                **
 *
 *           NOTE - If you are using a self-signed server certificate with
 *           either imap/ssl, imap/tls, pop3/ssl, or pop3/tls, you MUST add
 *           '/novalidate-cert' to the end of the protocol string. For imap,
 *           this would be 'imap/ssl/novalidate-cert' or
 *           'imap/tls/novalidate-cert', and for pop3 it would be
 *           'pop3/ssl/novalidate-cert' or 'pop3/tls/novalidate-cert'. This
 *           is necessary to tell c-client not to complain about the lack of
 *           a valid CA on the certificate.
 *
 * port: The port that the mail service/protocol you selected runs on.
 *       Default values:
 *         'pop3'    110
 *         'pop3s'   995
 *         'imap'    143
 *         'imaps'   993
 *
 *       ** The test script can help automatically determine the      **
 *       ** correct port value to use.  See the 'Testing IMP' section **
 *       ** of imp/docs/INSTALL for instructions on how to access the **
 *       ** test script.                                              **
 *
 * maildomain: What to put after the @ when sending mail. i.e. if you want
 *             all mail to look like 'From: user at example.com' set
 *             maildomain to 'example.com'. It is generally useful when
 *             the sending host is different from the mail receiving host. This
 *             will also be used to complete unqualified addresses when
 *             composing mail.
 *
 * smtphost: If specified, and $conf['mailer']['type'] is set to 'smtp',
 *           IMP will use this host for outbound SMTP connections.  This
 *           value overrides any existing $conf['mailer']['params']['host']
 *           value at runtime.
 *
 * smtpport: If specified, and $conf['mailer']['type'] is set to 'smtp',
 *           IMP will use this port for outbound SMTP connections.  This value
 *           overrides any existing $conf['mailer']['params']['port'] value at
 *           runtime.
 *
 * realm: ONLY USE REALM IF YOU ARE USING IMP FOR HORDE AUTHENTICATION,
 *        AND YOU HAVE MULTIPLE SERVERS AND USERNAMES OVERLAP BETWEEN
 *        THOSE SERVERS. If you only have one server, or have multiple
 *        servers with no username clashes, or have full user at example.com
 *        usernames, you DO NOT need a realm setting. If you set one, an
 *        '@' symbol plus the realm will be appended to the username that
 *        users log in to IMP with to create the username that Horde treats
 *        the user as. So with a realm of 'example.com', the username
 *        'jane' would be treated by Horde (NOT your IMAP/POP server) as
 *        'jane at example.com', and the username 'jane at example.com' would be
 *        treated as 'jane at example.com@example.com' - an occasion where you
 *        probably don't need a realm setting.
 *
 * preferred: Only useful if you want to use the same servers.php file
 *            for different machines: if the hostname of the IMP machine is
 *            identical to one of those in the preferred list, then the
 *            corresponding option in the select box will include SELECTED
 *            (i.e. it is selected per default). Otherwise the first entry
 *            in the list is selected.
 *
 * quota: Use this if you want to display a users quota status on various
 *        IMP pages. Set 'driver' equal to the mailserver and 'params'
 *        equal to any extra parameters needed by the driver (see the
 *        comments located at the top of imp/lib/Quota/[quotadriver].php
 *        for the parameters needed for each driver).
 *
 *        Currently available drivers:
 *          false        --  Disable quota checking (DEFAULT)
 *
 *          'command'    --  Use the UNIX quota command to determine quotas
 *          'courier'    --  Use the Courier-IMAP server to handle quotas
 *                           You must be connecting to a Courier-IMAP server
 *                           to use this driver
 *          'cyrus'      --  Use the Cyrus IMAP server to handle quotas
 *                           You must be connecting to a Cyrus IMAP server
 *                           to use this driver
 *          'logfile'    --  Allow quotas on servers where IMAP Quota
 *                           commands are not supported, but quota info
 *                           appears in the servers messages log for the IMAP
 *                           server.
 *          'mdaemon'    --  Use Mdaemon servers to handle quotas
 *          'mercury32'  --  Use Mercury/32 servers to handle quotas
 *          'sql'        --  Use arbitrary SQL queries to handle quotas
 *
 * admin: Use this if you want to enable mailbox management for administrators
 *        via Horde's user administration interface.  The mailbox management
 *        gets enabled if you let IMP handle the Horde authentication with the
 *        'application' authentication driver.  Your IMAP server needs to
 *        support mailbox management via IMAP commands.
 *        Do not define this value if you do not want mailbox management.
 *
 * acl: Use this if you want to use Access Control Lists (folder sharing)
 *      Set 'driver' equal to the type of ACL your server supports and
 *      'params' to an array containing any additional parameters the
 *      driver needs. Not all IMAP servers currently support this
 *      feature.
 *
 *      At present the only drivers supported are 'rfc2086' and 'rfc4314' (in
 *      Horde 3.1+), neither of which require any parameters.
 *
 *      SECURITY NOTE: If you do not have the PEAR Auth_SASL module
 *      installed, the 'rfc2086' driver will send user passwords to the
 *      IMAP server in plain text when retrieving ACLs.
 *
 *
 * *** The following options should NOT be set unless you REALLY know what ***
 * *** you are doing! FOR MOST PEOPLE, AUTO-DETECTION OF THESE PARAMETERS  ***
 * *** (the default if the parameters are not set) SHOULD BE USED!         ***
 *
 * namespace: The list of namespaces that exist on the server.  This entry
 *            must be an array. Example:
 *            'namespace' => array('#shared/', '#news/', '#ftp/', '#public/')
 *            This parameter must be set if using a TLS connection.
 *            Additionally, this parameter may be set if not using a TLS
 *            connection and you want to allow access to namespaces that may
 *            not be publicly advertised by the IMAP server (see RFC
 *            2342 [3]). These additional namespaces will be added to the list
 *            of available namespaces returned by the server.
 *
 * imap_config: Manually set IMAP server configuration information. Please see
 *              http://wiki.horde.org/ImpImapConfig for information on this
 *              parameter.  THIS PARAMETER IS NOT OFFICIALLY SUPPORTED BY THE
 *              HORDE PROJECT.  This entry must be an array with the following
 *              elements:
 *              'children' - (boolean) Whether the IMAP server supports the
 *                           CHILDREN command.
 *              'namespace' - (array) The namespace configuration of the
 *                            server.  See the return from
 *                            IMAP_Client::namespace() (located in
 *                            imp/lib/IMAP/Client.php) for the structure of
 *                            this array.
 *              'search_charset' - (array) A list of charsets the IMAP server
 *                                 supports for searches.
 *
 * timeout: Manually set server timeouts. This option only works with PHP >=
 *          4.3.3. This entry must be an array with the following possible
 *          elements (if an element is missing, the default value is used):
 *          IMAP_OPENTIMEOUT - (integer) The timeout for open actions.
 *          IMAP_READTIMEOUT - (integer) The timeout for read actions.
 *          IMAP_WRITETIMEOUT - (integer) The timeout for write actions.
 *          IMAP_CLOSETIMEOUT - (integer) The timeout for close actions.
 *
 * login_tries: Manually set the number of login tries we make to the server.
 *              The PHP imap_open() function will try to login 3 times to a
 *              server before failing.  This value indicates the number of
 *              times we call imap_open() before IMP fails (we pause one second
 *              between imap_open() calls). The default value is 3 (meaning IMP
 *              may attempt to login to the server 9 times).  If you have a
 *              mail server that will lock out an account if a certain number
 *              of incorrect login attempts occur within a certain period of
 *              time, you may want to set this to a lower value.  The minimum
 *              value for this setting is 1.
 */

/* Any entries whose key value ('foo' in $servers['foo']) begin with '_'
 * (an underscore character) will be treated as prompts, and you won't be
 * able to log in to them. The only property these entries need is 'name'.
 * This lets you put labels in the list, like this example: */
$servers['_prompt'] = array(
    'name' => _("Choose a mail server:")
);

if ($GLOBALS['conf']['kolab']['enabled']) {
    require_once 'Horde/Kolab.php';

    if (!is_callable('Kolab', 'getServer')) {
        $server = $GLOBALS['conf']['kolab']['imap']['server'];
    } else {
        $server = Kolab::getServer('imap');
    }

    $servers['kolab'] = array(
        'name' => 'Kolab Cyrus IMAP Server',
        'server' => $server,
        'hordeauth' => 'full',
        'protocol' => 'imap/notls/novalidate-cert',
        'port' => $GLOBALS['conf']['kolab']['imap']['port'],
        'maildomain' => $GLOBALS['conf']['kolab']['imap']['maildomain'],
        'realm' => '',
        'preferred' => '',
        'quota' => array(
            'driver' => 'cyrus',
            'params' => array(),
        ),
        'acl' => array(
            'driver' => 'rfc2086',
        ),
    );
}





More information about the commits mailing list