summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@gentoo.org>2007-10-22 13:41:40 +0000
committerGunnar Wrobel <wrobel@gentoo.org>2007-10-22 13:41:40 +0000
commit02bf84ad37dae5236578508b40a64e4a4ff36123 (patch)
tree8a17a4cf341d13fe8496729de5f0ad35c6257500
downloadkolab-02bf84ad37dae5236578508b40a64e4a4ff36123.tar.gz
kolab-02bf84ad37dae5236578508b40a64e4a4ff36123.tar.bz2
kolab-02bf84ad37dae5236578508b40a64e4a4ff36123.zip
Clean up the structure.
svn path=/overlay/; revision=2770
-rw-r--r--.svn.ignore3
-rw-r--r--ChangeLog682
-rw-r--r--Makefile88
-rw-r--r--dev-lang/php/ChangeLog15
-rw-r--r--dev-lang/php/Manifest54
-rw-r--r--dev-lang/php/files/20php4-envd2
-rw-r--r--dev-lang/php/files/20php5-envd2
-rw-r--r--dev-lang/php/files/70_mod_php.conf-apache217
-rw-r--r--dev-lang/php/files/70_mod_php5.conf-apache218
-rw-r--r--dev-lang/php/files/70_mod_php5_concurr.conf-apache216
-rw-r--r--dev-lang/php/files/70_mod_php_concurr.conf-apache214
-rw-r--r--dev-lang/php/files/KOLAB_php-5.2.4_Annotations.patch264
-rw-r--r--dev-lang/php/files/digest-php-5.2.4-r209
-rw-r--r--dev-lang/php/files/php4-ldvs1
-rw-r--r--dev-lang/php/files/php5-ldvs1
-rw-r--r--dev-lang/php/metadata.xml5
-rw-r--r--dev-lang/php/php-5.2.4-r20.ebuild481
-rw-r--r--dev-perl/perl-kolab/ChangeLog7
-rw-r--r--dev-perl/perl-kolab/Manifest24
-rw-r--r--dev-perl/perl-kolab/files/digest-perl-kolab-2.13
-rwxr-xr-xdev-perl/perl-kolab/files/kolab_services93
-rw-r--r--dev-perl/perl-kolab/files/perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch63
-rw-r--r--dev-perl/perl-kolab/metadata.xml8
-rw-r--r--dev-perl/perl-kolab/perl-kolab-2.1.ebuild90
-rw-r--r--dev-php/PEAR-Horde-Channel/Manifest7
-rw-r--r--dev-php/PEAR-Horde-Channel/PEAR-Horde-Channel-1.0.ebuild30
-rw-r--r--dev-php/PEAR-Horde-Channel/files/digest-PEAR-Horde-Channel-1.00
-rw-r--r--dev-php/PEAR-Net_IMAP/Manifest28
-rw-r--r--dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.0.3-r2.ebuild23
-rw-r--r--dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.1.0_beta1.ebuild28
-rw-r--r--dev-php/PEAR-Net_IMAP/files/IMAP.php2681
-rw-r--r--dev-php/PEAR-Net_IMAP/files/IMAPProtocol.php3323
-rw-r--r--dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.0.3-r23
-rw-r--r--dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.1.0_beta13
-rw-r--r--dev-php/PEAR-Net_IMAP/files/imap-logout.patch23
-rw-r--r--dev-php/horde-framework-kolab/ChangeLog13
-rw-r--r--dev-php/horde-framework-kolab/Manifest36
-rw-r--r--dev-php/horde-framework-kolab/files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch21
-rw-r--r--dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch57
-rw-r--r--dev-php/horde-framework-kolab/files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch30
-rw-r--r--dev-php/horde-framework-kolab/files/HK-GW-No_ldap_extension-3.2_ALPHA.patch30
-rw-r--r--dev-php/horde-framework-kolab/files/HK-GW-Share_caching-3.2_ALPHA.patch325
-rw-r--r--dev-php/horde-framework-kolab/files/digest-horde-framework-kolab-3.2_alpha3
-rw-r--r--dev-php/horde-framework-kolab/horde-framework-kolab-3.2_alpha.ebuild137
-rw-r--r--dev-php/horde-framework-kolab/metadata.xml5
-rw-r--r--eclass/horde-kolab-r1.eclass119
-rw-r--r--eclass/horde-kolab-r2.eclass125
-rw-r--r--eclass/horde-kolab-r4.eclass221
-rw-r--r--eclass/horde-kolab.eclass112
-rw-r--r--eclass/php-pear-manylibs-r1.eclass82
-rw-r--r--net-libs/c-client/Manifest24
-rw-r--r--net-libs/c-client/c-client-2004g-r20.ebuild96
-rw-r--r--net-libs/c-client/files/2002d-Makefile.patch65
-rw-r--r--net-libs/c-client/files/c-client-2004a-amd64-so-fix.patch13
-rw-r--r--net-libs/c-client/files/c-client-kolab.patch445
-rw-r--r--net-libs/c-client/files/digest-c-client-2004g-r203
-rw-r--r--net-libs/c-client/metadata.xml8
-rw-r--r--net-mail/cyrus-imap-admin/ChangeLog14
-rw-r--r--net-mail/cyrus-imap-admin/Manifest40
-rw-r--r--net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.8-r20.ebuild78
-rw-r--r--net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.9-r20.ebuild77
-rw-r--r--net-mail/cyrus-imap-admin/files/KOLAB_cyrus-cyradm_Annotations.patch83
-rw-r--r--net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-db45.patch29
-rw-r--r--net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-fPIC.patch22
-rw-r--r--net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.3.8-cyradm.patch81
-rw-r--r--net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.8-r203
-rw-r--r--net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.9-r203
-rw-r--r--net-mail/cyrus-imap-admin/metadata.xml8
-rw-r--r--net-mail/cyrus-imapd/ChangeLog8
-rw-r--r--net-mail/cyrus-imapd/Manifest126
-rw-r--r--net-mail/cyrus-imapd/cyrus-imapd-2.3.8-r20.ebuild291
-rw-r--r--net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r20.ebuild271
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.2-db45.patch29
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.2-libwrap.patch11
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-annotate.patch113
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-drac_with_autocreate.patch46
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-goodchars.patch18
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group.patch219
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group2.patch20
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-kolab.patch136
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-morelogging.patch37
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-openpkg.patch94
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-pts.patch21
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Annotations2.patch359
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Folder-names.patch20
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Groups.patch220
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Logging.patch58
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_UID.patch115
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-parallel.patch11
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-strip.patch11
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-unsupported-8bit.patch79
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.conf43
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.confd6
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.pam-include6
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.rc623
-rw-r--r--net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.8-r206
-rw-r--r--net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.9-r206
-rw-r--r--net-mail/cyrus-imapd/files/imap.pam6
-rw-r--r--net-mail/cyrus-imapd/files/imapd.conf52
-rw-r--r--net-mail/cyrus-imapd/metadata.xml8
-rw-r--r--net-mail/kolab-resource-handlers/ChangeLog12
-rw-r--r--net-mail/kolab-resource-handlers/Manifest36
-rw-r--r--net-mail/kolab-resource-handlers/files/digest-kolab-resource-handlers-2.13
-rw-r--r--net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch101
-rw-r--r--net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch31
-rw-r--r--net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch26
-rw-r--r--net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch12
-rw-r--r--net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch68
-rw-r--r--net-mail/kolab-resource-handlers/kolab-resource-handlers-2.1.ebuild61
-rw-r--r--net-mail/kolab-resource-handlers/metadata.xml5
-rw-r--r--net-mail/kolab-webadmin/Manifest32
-rw-r--r--net-mail/kolab-webadmin/files/digest-kolab-webadmin-2.13
-rw-r--r--net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch18
-rw-r--r--net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch13
-rw-r--r--net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch31
-rw-r--r--net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch14
-rw-r--r--net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch22
-rw-r--r--net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch20
-rw-r--r--net-mail/kolab-webadmin/kolab-webadmin-2.1.ebuild65
-rw-r--r--net-mail/kolabd/ChangeLog17
-rw-r--r--net-mail/kolabd/Manifest224
-rw-r--r--net-mail/kolabd/files/00_kolab.conf.2.1.template106
-rw-r--r--net-mail/kolabd/files/11_kolab_domain.conf.2.1.template156
-rw-r--r--net-mail/kolabd/files/12_kolab_vhosts.conf.2.1.template52
-rw-r--r--net-mail/kolabd/files/13_kolab_example.conf.2.1.template209
-rw-r--r--net-mail/kolabd/files/70_mod_php5.conf.2.1.template31
-rw-r--r--net-mail/kolabd/files/access.2.1.postfix29
-rw-r--r--net-mail/kolabd/files/admin.service2
-rw-r--r--net-mail/kolabd/files/aliases.2.1.postfix37
-rw-r--r--net-mail/kolabd/files/canonical.2.1.postfix17
-rw-r--r--net-mail/kolabd/files/cgi-php.ini.2.1.template1210
-rw-r--r--net-mail/kolabd/files/conf.d-apache2.2.1.template80
-rw-r--r--net-mail/kolabd/files/conf.d-sasl.2.1.template18
-rw-r--r--net-mail/kolabd/files/conf.d-slapd.2.1.template15
-rw-r--r--net-mail/kolabd/files/digest-kolabd-2.13
-rw-r--r--net-mail/kolabd/files/favicon.icobin0 -> 2238 bytes
-rw-r--r--net-mail/kolabd/files/horde.schema567
-rw-r--r--net-mail/kolabd/files/horde.service2
-rw-r--r--net-mail/kolabd/files/imapd.annotation_definitions.2.1.template10
-rw-r--r--net-mail/kolabd/files/index.php67
-rw-r--r--net-mail/kolabd/files/kolab-domain-base.include.2.1.template61
-rw-r--r--net-mail/kolabd/files/kolab-vhosts-mailman.include.use-mailman-2.1.template19
-rw-r--r--net-mail/kolabd/files/kolab_logo.small.pngbin0 -> 9459 bytes
-rwxr-xr-xnet-mail/kolabd/files/kolab_services93
-rwxr-xr-xnet-mail/kolabd/files/kolabd17
-rwxr-xr-xnet-mail/kolabd/files/kolabd.legacy17
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_kolab_bootstrap.in-2.1.patch22
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch11
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch11
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_start.in-2.1.patch10
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_stop.in-2.1.patch9
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch11
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch10
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch19
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch26
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch63
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch35
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch14
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch13
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-2.1.patch1137
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch1142
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_master.cf.template.in-2.1.patch170
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch1255
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_rc.conf.template.in-2.1.patch15
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch12
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch14
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch13
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch22
-rw-r--r--net-mail/kolabd/files/kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch10
-rw-r--r--net-mail/kolabd/files/kolabvirtual.2.1.postfix14
-rw-r--r--net-mail/kolabd/files/local.cf.use-spam-2.1.template85
-rw-r--r--net-mail/kolabd/files/powered-by-gentoo.jpgbin0 -> 12582 bytes
-rw-r--r--net-mail/kolabd/files/relocated.2.1.postfix17
-rw-r--r--net-mail/kolabd/files/v310.pre.use-spam-2.1.template83
-rw-r--r--net-mail/kolabd/kolabd-2.1.ebuild452
-rw-r--r--net-mail/kolabd/metadata.xml5
-rw-r--r--profiles/package.mask15
-rw-r--r--profiles/repo_name1
-rw-r--r--profiles/use.desc2
-rw-r--r--skel.ChangeLog67
-rw-r--r--www-apps/horde-imp-kolab/ChangeLog12
-rw-r--r--www-apps/horde-imp-kolab/Manifest24
-rw-r--r--www-apps/horde-imp-kolab/files/conf.php_4.2_alpha.config64
-rw-r--r--www-apps/horde-imp-kolab/files/digest-horde-imp-kolab-4.2_alpha3
-rw-r--r--www-apps/horde-imp-kolab/files/servers.php_4.2_alpha.config235
-rw-r--r--www-apps/horde-imp-kolab/horde-imp-kolab-4.2_alpha.ebuild22
-rw-r--r--www-apps/horde-imp-kolab/metadata.xml5
-rw-r--r--www-apps/horde-ingo-kolab/ChangeLog12
-rw-r--r--www-apps/horde-ingo-kolab/Manifest24
-rw-r--r--www-apps/horde-ingo-kolab/files/backends.php_1.2_alpha.config53
-rw-r--r--www-apps/horde-ingo-kolab/files/conf.php_1.2_alpha.config16
-rw-r--r--www-apps/horde-ingo-kolab/files/digest-horde-ingo-kolab-1.2_alpha3
-rw-r--r--www-apps/horde-ingo-kolab/horde-ingo-kolab-1.2_alpha.ebuild22
-rw-r--r--www-apps/horde-ingo-kolab/metadata.xml5
-rw-r--r--www-apps/horde-kolab-all/Manifest7
-rw-r--r--www-apps/horde-kolab-all/files/digest-horde-kolab-all-30
-rw-r--r--www-apps/horde-kolab-all/horde-kolab-all-3.ebuild40
-rw-r--r--www-apps/horde-kolab/ChangeLog27
-rw-r--r--www-apps/horde-kolab/Manifest32
-rw-r--r--www-apps/horde-kolab/files/conf.php_3.2_alpha.config100
-rw-r--r--www-apps/horde-kolab/files/digest-horde-kolab-3.2_alpha3
-rw-r--r--www-apps/horde-kolab/files/hooks.php_3.2_alpha.config209
-rw-r--r--www-apps/horde-kolab/files/horde-kolab-conf-3.2_alpha.template17
-rw-r--r--www-apps/horde-kolab/files/registry.php_3.2_alpha.config570
-rw-r--r--www-apps/horde-kolab/horde-kolab-3.2_alpha.ebuild57
-rw-r--r--www-apps/horde-kolab/metadata.xml5
-rw-r--r--www-apps/horde-kronolith-kolab/ChangeLog24
-rw-r--r--www-apps/horde-kronolith-kolab/Manifest36
-rw-r--r--www-apps/horde-kronolith-kolab/files/HK-GW-Fix_create_new_event-2.2_alpha.patch14
-rw-r--r--www-apps/horde-kronolith-kolab/files/HK-GW-Fix_share_right_editing-2.2_alpha.patch14
-rw-r--r--www-apps/horde-kronolith-kolab/files/HK-UV-Fix_list_events-2.2_alpha.patch39
-rw-r--r--www-apps/horde-kronolith-kolab/files/conf.php_2.2_alpha.config20
-rw-r--r--www-apps/horde-kronolith-kolab/files/digest-horde-kronolith-kolab-2.2_alpha3
-rw-r--r--www-apps/horde-kronolith-kolab/files/horde-kronolith-kolab-conf-2.2_alpha.template10
-rw-r--r--www-apps/horde-kronolith-kolab/horde-kronolith-kolab-2.2_alpha.ebuild31
-rw-r--r--www-apps/horde-kronolith-kolab/metadata.xml5
-rw-r--r--www-apps/horde-mnemo-kolab/ChangeLog11
-rw-r--r--www-apps/horde-mnemo-kolab/Manifest24
-rw-r--r--www-apps/horde-mnemo-kolab/files/HK-GW-Edit_share_rights-2.2_alpha.patch14
-rw-r--r--www-apps/horde-mnemo-kolab/files/conf.php_2.2_alpha.config9
-rw-r--r--www-apps/horde-mnemo-kolab/files/digest-horde-mnemo-kolab-2.2_alpha3
-rw-r--r--www-apps/horde-mnemo-kolab/horde-mnemo-kolab-2.2_alpha.ebuild25
-rw-r--r--www-apps/horde-mnemo-kolab/metadata.xml5
-rw-r--r--www-apps/horde-nag-kolab/ChangeLog14
-rw-r--r--www-apps/horde-nag-kolab/Manifest24
-rw-r--r--www-apps/horde-nag-kolab/files/HK-GW-Fix_share_right_editing_2.2_alpha.patch14
-rw-r--r--www-apps/horde-nag-kolab/files/conf.php_2.2_alpha.config8
-rw-r--r--www-apps/horde-nag-kolab/files/digest-horde-nag-kolab-2.2_alpha3
-rw-r--r--www-apps/horde-nag-kolab/horde-nag-kolab-2.2_alpha.ebuild24
-rw-r--r--www-apps/horde-nag-kolab/metadata.xml5
-rw-r--r--www-apps/horde-passwd-kolab/ChangeLog18
-rw-r--r--www-apps/horde-passwd-kolab/Manifest28
-rw-r--r--www-apps/horde-passwd-kolab/files/backends.php_3.0.1.config114
-rw-r--r--www-apps/horde-passwd-kolab/files/conf.php_3.0.1.config13
-rw-r--r--www-apps/horde-passwd-kolab/files/digest-horde-passwd-kolab-3.0.13
-rw-r--r--www-apps/horde-passwd-kolab/files/horde-passwd-kolab-3.0-no-clear-password.patch13
-rw-r--r--www-apps/horde-passwd-kolab/horde-passwd-kolab-3.0.1.ebuild27
-rw-r--r--www-apps/horde-passwd-kolab/metadata.xml5
-rw-r--r--www-apps/horde-turba-kolab/ChangeLog21
-rw-r--r--www-apps/horde-turba-kolab/Manifest48
-rw-r--r--www-apps/horde-turba-kolab/files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch268
-rw-r--r--www-apps/horde-turba-kolab/files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch17
-rw-r--r--www-apps/horde-turba-kolab/files/HK-GW-Fix_editing_contacts-2.2_alpha.patch14
-rw-r--r--www-apps/horde-turba-kolab/files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch14
-rw-r--r--www-apps/horde-turba-kolab/files/HK-GW-Fix_share_id_change-2.2_alpha.patch23
-rw-r--r--www-apps/horde-turba-kolab/files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch41
-rw-r--r--www-apps/horde-turba-kolab/files/conf.php_2.2_alpha.config10
-rw-r--r--www-apps/horde-turba-kolab/files/digest-horde-turba-kolab-2.2_alpha3
-rw-r--r--www-apps/horde-turba-kolab/files/sources.php_2.2_alpha.config292
-rw-r--r--www-apps/horde-turba-kolab/horde-turba-kolab-2.2_alpha.ebuild30
-rw-r--r--www-apps/horde-turba-kolab/metadata.xml5
251 files changed, 24356 insertions, 0 deletions
diff --git a/.svn.ignore b/.svn.ignore
new file mode 100644
index 0000000..75a1abd
--- /dev/null
+++ b/.svn.ignore
@@ -0,0 +1,3 @@
+semantic.cache
+*.tar.bz2
+test
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..0cc6db2
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,682 @@
+2007-03-27 Gunnar Wrobel <p@rdus.de>
+
+ * net-mail/kolab-webadmin/kolab-webadmin-20070327.ebuild:
+
+ New dev version.
+
+ * net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_form.class.php-20060829.patch:
+
+ Backported patch to allow using the "stable" webadmin with php-5.2.1
+
+2007-03-26 Gunnar Wrobel <p@rdus.de>
+
+ * dev-perl/perl-kolab/perl-kolab-20070314.ebuild (RDEPEND):
+
+ Allowed newer cyrus-imap and cyrus-imap-admin.
+
+ * net-mail/kolabd/kolabd-20070319-r1.ebuild (RDEPEND):
+
+ Allowed newer cyrus-imap and cyrus-imap-admin.
+
+ * profiles/package.mask:
+
+ Fixed mask for new php version.
+
+ * net-mail/kolab-resource-handlers/kolab-resource-handlers-20070123-r1.ebuild (RDEPEND):
+
+ Fixed PHP dependency.
+
+2007-03-22 Gunnar Wrobel <p@rdus.de>
+
+ * dev-php/horde-framework-kolab/horde-framework-kolab-20070322.ebuild:
+
+ Version bump.
+
+ * www-apps/otrs/files/otrs-config.template:
+
+ We are using https with OTRS.
+
+2007-03-21 Gunnar Wrobel <p@rdus.de>
+
+ * profiles/package.mask:
+
+ Mark kolab-webadmin unstable since
+ https://intevation.de/roundup/kolab/issue1654 is critical.
+
+2007-03-19 Gunnar Wrobel <p@rdus.de>
+
+ * net-mail/kolabd/kolabd-20070316.ebuild (RDEPEND):
+
+ Fixed postfix configuration.
+
+ Fixed mailman dependency.
+
+ * net-mail/kolabd/kolabd-20070216-r1.ebuild (IUSE):
+
+ Removed the mailman use flag since this is considered dev-branch.
+
+2007-03-16 Gunnar Wrobel <p@rdus.de>
+
+ * eclass/horde-kolab-r1.eclass (INSTALL_DIR):
+
+ Made the template warning optional in the eclass.
+
+ * www-apps/horde-kronolith-kolab/horde-kronolith-kolab-20070201-r1.ebuild:
+
+ Modified configuration system.
+
+ * net-mail/kolab-webadmin/kolab-webadmin-20070316.ebuild:
+
+ New development release with several upstream issues fixed.
+
+ * net-mail/kolabd/kolabd-20070316.ebuild:
+
+ Match the new postfix version with the corresponding
+ configuration.
+
+ * net-mail/kolabd/kolabd-20070314.ebuild (RDEPEND):
+
+ Fixed blocker.
+
+ * mail-mta/postfix/postfix-2.3.7-r21.ebuild:
+
+ New ebuild that includes a modified postfix patch that will be
+ included upstream.
+
+2007-03-15 Gunnar Wrobel <p@rdus.de>
+
+ * net-mail/kolabd/files/kolabd_kolabd_templates_imapd.conf.template.in-20070216.patch:
+
+ Added template fix for imapd.
+
+ * net-mail/kolabd/kolabd-20070216.ebuild:
+
+ Added check for bad ownership on a clamav log file.
+
+2007-03-14 Gunnar Wrobel <p@rdus.de>
+
+ * net-mail/kolab-resource-handlers/kolab-resource-handlers-20070123.ebuild (RDEPEND):
+
+ These are runtime dependencies -> fixed.
+
+ * net-mail/kolabd/kolabd-20070314.ebuild (RDEPEND, S):
+
+ Added postfix templates.
+
+ Require highest perl-kolab.
+
+ * net-mail/kolabd/kolabd-20070216.ebuild (RDEPEND):
+
+ Does not work with perl-kolab > 20070313
+
+ * net-mail/kolabd/kolabd-20070314.ebuild:
+
+ Fixed postfix with mailman config
+
+2007-03-13 Gunnar Wrobel <p@rdus.de>
+
+ * net-mail/kolabd/kolabd-20060829-r1.ebuild:
+
+ Stable kolabd ebuild that allows an updated clamav package.
+
+ * dev-php/horde-framework-cvs/horde-framework-cvs-20070313.ebuild:
+ (PEAR_PACKAGES):
+
+ Removed faulty Graph and Timer package.
+
+ New framework version. Contains new IMAP drivers for Kolab module.
+
+ * net-mail/kolabd/kolabd-20070313.ebuild:
+
+ New kolabd ebuild that should work with postfix 2.3.7
+
+ * mail-mta/postfix/postfix-2.3.7-r20.ebuild:
+
+ Added newest postfix version with corrected patch.
+
+2007-03-12 Gunnar Wrobel <p@rdus.de>
+
+ * www-apps/horde-kolab-all/horde-kolab-all-2.ebuild (RDEPEND):
+
+ Added kolabd dependency.
+
+ * profiles/package.mask:
+
+ Umasked newest kolabd because of a clamav security risk.
+
+2007-03-08 Gunnar Wrobel <p@rdus.de>
+
+ * www-apps/horde-turba-kolab/files/sources.php_horde-turba-kolab-20070131.config:
+
+ Matched config file to upstream version.
+
+ * www-apps/horde-kolab/files/conf.xml_horde-kolab-20070131.config:
+
+ Removed some config options. Fixed
+ conf.xml (http://forum.pardus.de/index.php?topic=92.0)
+
+2007-02-27 Gunnar Wrobel <p@rdus.de>
+
+ * net-mail/kolabd/kolabd-20070216.ebuild (S):
+
+ Fixed the imapd conversion instructions.
+
+ Added check for overlays use flag.
+
+ * dev-php/horde-framework-cvs/horde-framework-cvs-20070227.ebuild:
+ (HORDE_PHP_FEATURES):
+
+ Removed Rampage package.
+
+ CVS update of the Horde framework.
+
+ * www-apps/horde-ingo-kolab/horde-ingo-kolab-20070104-r1.ebuild (HORDE_KOLAB_CONFIG):
+
+ Fixed the ingo backend configuration.
+
+2007-02-26 Gunnar Wrobel <p@rdus.de>
+
+ * net-mail/kolabd/kolabd-20070216.ebuild (S):
+
+ Fixed typo in shell skript.
+
+2007-02-23 Gunnar Wrobel <p@rdus.de>
+
+ * www-apps/horde-imp-kolab/horde-imp-kolab-20070213.ebuild (HORDE_KOLAB_CONFIG):
+
+ Added correct servers.php config.
+
+ * www-apps/horde-kolab/files/conf.php_horde-kolab-20070131.config:
+
+ Fixed typo.
+
+ * www-apps/horde-kolab/horde-kolab-20070131.ebuild:
+
+ Added a warning for ebuild updates.
+
+ * profiles/package.mask:
+
+ horde-kolab-all needs to be unmasked.
+
+ * www-apps/horde-kolab-all/horde-kolab-all-2.ebuild:
+
+ Fixed eclass dependencies.
+
+ * dev-php/horde-framework-cvs/horde-framework-cvs-20070209.ebuild (RDEPEND):
+
+ Depends on PEAR-Horde-Channel now
+
+ * dev-php/PEAR-Horde-Channel/PEAR-Horde-Channel-1.0.ebuild:
+
+ Added PEAR Horde channel discovery back in.
+
+ * net-mail/kolabd/kolabd-2006*.ebuild:
+
+ Added block with clamav>=0.90
+
+2007-02-16 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolabd/kolabd-20070216.ebuild:
+
+ Removed horde.schema installation. This is now done within the
+ pacakge itself.
+
+ New kolabd ebuild that has all changes for Kolab-2.1. Needs some
+ testing and will rest in the development branch for a while.
+
+ * dev-perl/perl-kolab/perl-kolab-20061214.ebuild:
+
+ Removed this ebuild and made 20070201 the new unstable version.
+
+ * profiles/package.mask:
+
+ Unmasked newer perl-kolab as unstable.
+
+ * net-mail/kolab-webadmin/kolab-webadmin-20070216.ebuild:
+
+ The next unstable kolab-webadmin. Only minor changes from
+ upstream.
+
+ * profiles/package.mask:
+
+ Unmasked newest kolab-webadmin.
+
+2007-02-15 Gunnar Wrobel <wrobel@pardus.de>
+
+ * dev-php/horde-framework-cvs/horde-framework-cvs-20070209.ebuild (RDEPEND):
+
+ Added blocking dependency for dev-php/horde.
+
+ * profiles/package.mask:
+
+ Corrected the package mask. The current horde ebuilds are now
+ masked unstable.
+
+ * dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.0.3-r2.ebuild:
+
+ Added the ebuild back in.
+
+ * net-mail/kolab-resource-handlers/kolab-resource-handlers-*.ebuild (DEPEND):
+
+ Fixed PEAR-Net_IMAP dependency.
+
+ * www-apps/horde-*:
+
+ General cleanup for new overlay structure.
+ Packages will be non-functional at the moment.
+
+ * mod_auth_ldap-3.3-r20.ebuild (KEYWORDS):
+
+ Marked stable for the new overlay structure.
+
+ * net-mail/kolab-resource-handlers/kolab-resource-handlers-*.ebuild:
+
+ Modified keywords for the new overlay structure.
+ Added blocking dependencies. Still need to test this.
+
+ * net-mail/kolab-webadmin/kolab-webadmin-*.ebuild:
+
+ Cleanup for the new overlay structure.
+
+ * TODO:
+
+ Obsolete.
+
+ * net-mail/kolabd/kolabd-*.ebuild (KEYWORDS, RDEPEND):
+
+ Marked stable for the new overlay structure.
+ Added blocking dependencies. Still need to test this.
+
+ * net-mail/cyrus-imapd/cyrus-imapd-2.2.12-r21.ebuild (KEYWORDS):
+
+ Marked stable for the new overlay structure.
+
+ * net-libs/c-client/c-client-2004g-r20.ebuild (KEYWORDS):
+
+ Marked stable for the new overlay structure.
+
+ * mail-mta/postfix/postfix-2.2.10-r20.ebuild (KEYWORDS):
+
+ Marked stable for the new overlay structure.
+
+ * profiles/package.mask:
+
+ Cleaned packages.mask so that it masks the development version.
+
+ * dev-php/horde/horde-3.1.3.ebuild:
+
+ Fixed keywords since this is part of the stable kolab
+ installation.
+
+ * dev-lang/php/php-5.1.6-r20.ebuild:
+
+ Fixed invalid use check and modifed keywords to match new
+ overlay structure. Fixes bug http://bug.pardus.de/view.php?id=158
+
+2007-02-14 Gunnar Wrobel <wrobel@pardus.de>
+
+ * dev-php/horde-framework-cvs/horde-framework-cvs-070209.ebuild:
+
+ A first draft of the horde-framework installation.
+
+ * eclass/php-pear-manylibs-r1.eclass:
+
+ Tried to create a new eclass that allows to install the horde
+ framework packages as pear libraries. Derived from
+ php-pear-lib-r1.eclass.
+
+2007-02-13 Gunnar Wrobel <wrobel@pardus.de>
+
+ * eclass/horde-kolab-r1.eclass (INSTALL_DIR):
+
+ Modified handling of horde configuration files.
+
+2007-01-05 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/horde-kolab/horde-kolab-20070104.ebuild (HORDE_KOLAB_TEMPLATES):
+
+ Added hooks template.
+
+ * www-apps/horde-kolab/files/horde-kolab-conf-20070104.template (OWNERSHIP):
+
+ Fixed version information.
+
+ * www-apps/horde-kolab/files/horde-kolab-hooks-20070104.template:
+
+ Added fixed hook template.
+
+ * eclass/horde-kolab-r1.eclass (INSTALL_DIR):
+
+ Modified postinstall instructions for horde packages.
+
+2006-12-15 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/horde-kronolith-kolab/files/horde-kronolith-kolab-conf-20061215.template (OWNERSHIP):
+
+ Adapted kronolith config to newest version.
+
+2006-12-14 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolabd/kolabd-20061204.ebuild (IUSE):
+
+ Added "legacy" USE flag. This will enable use of proftpd.
+
+ Renamed "dav" USE flag to "webdav" (already exists in portage)
+
+ * net-mail/mailman-kolab/mailman-kolab-2.1.9.ebuild (S):
+
+ Added USE flag check to resolve circular dependency on kolabd.
+
+ * net-mail/kolabd/kolabd-20061204.ebuild (RDEPEND):
+
+ Fixed circular dependency for mailman.
+
+2006-12-11 Gunnar Wrobel <wrobel@pardus.de>
+
+ * profiles/package.mask:
+
+ Masked otrs-2.1.2
+
+ * www-apps/otrs/otrs-2.0.4.ebuild (RDEPEND):
+
+ Fixed mysql(-4) dependency.
+
+2006-11-22 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/horde-kolab/horde-kolab-20061120.ebuild:
+
+ DOM patch is unnecessary.
+
+ * dev-lang/php/php-5.1.6-r20.ebuild:
+
+ Added patched php.
+
+ * profiles/package.mask:
+
+ Added patched php into mask.
+
+2006-11-15 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/horde-kolab/horde-kolab-20061030.ebuild (RDEPEND):
+
+ Fixed incorrect command in postinst handler.
+
+ * www-apps/horde-ingo-kolab/horde-ingo-kolab-20061030.ebuild (RDEPEND):
+
+ Fixed PEAR-Net_Sieve dependency.
+
+2006-11-13 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolabd/files/13_kolab_example.conf.20061101.template (OWNERSHIP):
+
+ Fixed example domain config (correct apache flag is MULTIPLE_DOMAINS)
+
+ * net-mail/mailman-kolab/mailman-kolab-2.1.9.ebuild (S):
+
+ Removed incorrect installation of mailman-aliases template.
+
+2006-11-08 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/horde-ingo-kolab/horde-ingo-kolab-20061030.ebuild (HORDE_KOLAB_TEMPLATES):
+ Fixed the configuration templates for the cvs version.
+
+ * www-apps/horde-nag-kolab/horde-nag-kolab-20061030.ebuild (HORDE_KOLAB_TEMPLATES):
+ Fixed the configuration templates for the cvs version.
+
+ * www-apps/horde-turba-kolab/horde-turba-kolab-20061030.ebuild (HORDE_KOLAB_TEMPLATES):
+ Fixed the configuration templates for the cvs version.
+
+ * www-apps/horde-kronolith-kolab/horde-kronolith-kolab-20061030.ebuild (HORDE_KOLAB_TEMPLATES):
+ Fixed the configuration templates for the cvs version.
+
+ * www-apps/horde-kolab/horde-kolab-20061030.ebuild:
+ Removed misleading postinstall instructions.
+
+ * www-apps/horde-imp-kolab/horde-imp-kolab-20061030.ebuild (HORDE_KOLAB_TEMPLATES):
+ Fixed the configuration templates for the cvs version.
+
+ * www-apps/horde-kolab/horde-kolab-20061030.ebuild (HORDE_KOLAB_TEMPLATES):
+ Fixed the horde configuration templates for the cvs version. SQL removed.
+
+2006-11-07 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/otrs/otrs-2.1.2.ebuild:
+ Fixed version dependant templates and files.
+
+ * www-apps/horde-kolab-all/horde-kolab-all-1.ebuild (RDEPEND):
+ Added dev-php/horde as a blocker.
+
+ * www-apps/otrs/otrs-2.1.2.ebuild:
+
+ Updated otrs ebuild to 2.1.2.
+
+2006-11-01 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/horde-kolab/horde-kolab-20061030.ebuild (RDEPEND):
+
+ Fixed target location for domxml php4/5 hack.
+
+ * profiles/package.mask:
+
+ Unmasked main kolab packages version 20061009.
+
+2006-10-30 Gunnar Wrobel <wrobel@pardus.de>
+
+ * eclass/horde-kolab-r1.eclass:
+
+ Modified eclass for new horde packages.
+
+ * www-apps/horde-kolab/horde-kolab-20061030.ebuild:
+
+ New cvs based ebuild.
+
+ * profiles/package.mask:
+
+ Added masking for new horde modules.
+
+2006-10-27 Gunnar Wrobel <wrobel@pardus.de>
+
+ * profiles/package.mask:
+ Masked new horde packages
+
+ * www-apps/horde-kolab-all/horde-kolab-all-1.ebuild (RDEPEND):
+ Added dependency to the new horde framework packages.
+
+2006-10-23 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolab-resource-handlers/Manifest:
+
+ Colon fix for the last php cgi patches to the free/busy handlers.
+
+2006-10-17 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolabd/files/10_kolab_base.conf.20061009.template:
+
+ Additional rewrite rule for php cgi.
+
+ * net-mail/kolab-resource-handlers/Manifest:
+
+ Added two experimental php cgi patches to the free/busy handlers.
+
+2006-10-12 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolabd/files/kolabd_kolabd_templates_php.ini.template.in-*.patch:
+
+ Updated config file to newest php version.
+
+ * net-mail/kolabd/files/cgi-php.ini.*.template:
+
+ Added cgi template as suggested in http://forum.pardus.de/index.php?topic=64
+ Should fix basic free/busy problem.
+
+ * net-mail/kolab-resource-handlers/kolab-resource-handlers-*.ebuild (SLOT):
+
+ Fixed missing SLOT. Thanks to genstef@gentoo.org.
+
+2006-10-11 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolab-webadmin/kolab-webadmin-20060829.ebuild:
+
+ Moved STABLE mark to this ebuild. Was incorrectly assigned before
+ though there are no differences between the current ebuild
+ versions.
+
+2006-10-09 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolabd/kolabd-20061009.ebuild:
+
+ Templates got fixed for this ebuild. The kolabvirtual template got
+ improved to better handle "kolab+" syntax and the main.cf template
+ includes better subdomain support.
+
+ * net-mail/kolabd/files/kolabvirtual.20061009.template:
+
+ Fixed kolabvirtual template for correct handling of "kolab+"
+ addresses.
+
+ * net-mail/kolabd/kolabd-20061009.ebuild:
+
+ Added new round of masked ebuilds.
+
+ Changes:
+
+ Fix of bug http://bug.pardus.de/view.php?id=20
+
+ * profiles/package.mask:
+
+ Corrected mask statement for mailman-kolab.
+
+ * net-mail/mailman-kolab/mailman-kolab-2.1.9.ebuild (S):
+
+ Fixed invalid install instruction for mailman-aliases.
+
+ * net-mail/kolabd/kolabd-20061003.ebuild (RDEPEND):
+
+ Added kolabd dependency on mailman-kolab in case the mailman flag
+ is active.
+
+ * net-mail/kolabd/kolabd-20060927.ebuild (S):
+
+ Removed mailman use flag.
+
+ * net-mail/kolabd/kolabd-20060829.ebuild (S):
+
+ Removed mailman use flag.
+
+ * net-mail/mailman-kolab/files/README.kolab:
+
+ Fixed post-install instructions.
+
+ * net-mail/mailman-kolab/mailman-kolab-2.1.9.ebuild (S):
+
+ Removed check for mailman use flag in kolabd. Fixed post-install
+ instructions.
+
+ * net-mail/mailman-kolab/mailman-kolab-2.1.9.ebuild (S):
+
+ mailman-aliases works better if not installed as template.
+
+ * net-mail/mailman-kolab/files/kolab-vhosts-mailman.include.template-2.1.9:
+
+ Added redirection target for http://lists.<your-domain>
+
+2006-10-06 Gunnar Wrobel <wrobel@pardus.de>
+
+ * profiles/package.mask:
+
+ I promised to mask packages you should not use yet, so I should do
+ that. mailman-kolab is not yet ready.
+
+ * net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-20061003.patch:
+
+ Fixed the bizarre "Out of memory" error.
+
+ * net-mail/mailman-kolab/mailman-kolab-2.1.9.ebuild (S):
+
+ Fixed problem with copying the necessary mailman templates
+ into the kolab templates directory.
+
+ * profiles/package.mask:
+
+ Unmasked all ebuilds < 20061004. In fact there are nearly no
+ differences between the ebuilds. The main changes affected the
+ development model. There have been some fixes to the apache
+ configuration files that should ensure that DAV and other LDAP
+ based authentication works again.
+
+2006-10-05 Gunnar Wrobel <wrobel@pardus.de>
+
+ * www-apps/otrs/files/kolab-domain-otrs.include.template (OWNERSHIP):
+
+ Modified template to allow running otrs as CGI script.
+
+ * files/kolab-base-otrs.include.template (OWNERSHIP):
+
+ Modified template to allow running otrs as CGI script.
+
+ * net-mail/kolabd/kolabd-20061003.ebuild (S):
+
+ Rearranging the handling of additional templates so that the different
+ ebuild versions are not interacting.
+
+2006-10-04 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/kolab-webadmin/kolab-webadmin-20061003.ebuild (KEYWORDS):
+
+ Updated ebuild.
+
+ * net-mail/kolab-webadmin/kolab-webadmin-20060829.ebuild:
+
+ The ebuild has been marked stable and the old (non-working)
+ ebuild has been removed.
+
+ * net-mail/kolab-resource-handlers/kolab-resource-handlers-20061003.ebuild:
+
+ Updated ebuild (actually contains no changes to the previous version).
+
+ * net-mail/kolab-resource-handlers/kolab-resource-handlers-20060829.ebuild:
+
+ The ebuild has been marked stable and the old (non-working)
+ ebuild has been removed.
+
+ * net-mail/cyrus-imapd/cyrus-imapd-2.3.7-r20.ebuild (DEPEND):
+
+ Updated ebuild and patches to 2.3.7. Remains
+ masked.
+
+2006-10-03 Gunnar Wrobel <wrobel@pardus.de>
+
+ * net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.7-r20.ebuild (S):
+
+ 2.3.7 is actually the newest release for cyrus-imapd.
+
+ * net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.1.ebuild (S):
+
+ Upgraded to the new cyrus-imap release. Remains masked for
+ now.
+
+ * net-libs/c-client/c-client-2004g-r20.ebuild:
+ Removed old ChangeLog and updated digest.
+
+ * profiles/package.mask: Masked all versions that
+ might supersede the applications patched for
+ kolab.
+
+ * mail-mta/postfix/postfix-2.3.2-r20.ebuild (S):
+
+ Added next version of the postfix ebuild. This
+ will still be masked until I am certain that it
+ works and can be released.
+
+ * mail-mta/postfix/postfix-2.2.10-r20.ebuild (S):
+
+ Modified for a new name of the ldap-leaf-only patch.
+
+ * dev-perl/perl-kolab/perl-kolab-20061003.ebuild:
+
+ Updated ebuild (actually contains no changes to the previous version).
+
+ * dev-perl/perl-kolab/perl-kolab-20060829.ebuild (KEYWORDS):
+
+ The ebuild has been marked stable and the old (non-working)
+ ebuild has been removed.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ed4ea9f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,88 @@
+RELEASE=$(shell date '+%Y%m%d')
+#RELEASE=20070701
+
+KOLAB_PACKAGES=dev-perl/perl-kolab \
+ net-mail/kolab-resource-handlers \
+ net-mail/kolab-webadmin \
+ net-mail/kolabd
+
+HORDE_PACKAGES=dev-php/horde-framework-kolab \
+ www-apps/horde-kolab \
+ www-apps/horde-imp-kolab \
+ www-apps/horde-passwd-kolab \
+ www-apps/horde-ingo-kolab \
+ www-apps/horde-kronolith-kolab \
+ www-apps/horde-mnemo-kolab \
+ www-apps/horde-nag-kolab \
+ www-apps/horde-turba-kolab
+
+remote:
+ svn update /usr/portage/local/kolab2
+
+.PHONY: $(KOLAB_PACKAGES)
+$(KOLAB_PACKAGES):
+ rm -f $@/files/digest*
+ rm -f $@/Manifest
+ E=`ls $@/*.ebuild | sed -e 's/[^0-9]*\([0-9]*\)\(-r[0-9]*\)*.ebuild/\1/' | sort`; \
+ F=`echo $$E | wc -w`; \
+ OLD=`echo $$E | cut -d " " -f $$F`; \
+ PKG="$@"; \
+ A=$@/$${PKG/*\//}-$$OLD.ebuild; \
+ B=$@/$${PKG/*\//}-$(RELEASE).ebuild; \
+ if [ $$A != $$B ]; \
+ then \
+ svn cp $$A $$B; \
+ for TEMPLATE in $$PKG/files/*$$OLD.template; \
+ do \
+ svn cp $$TEMPLATE $${TEMPLATE/$$OLD/$(RELEASE)}; \
+ done; \
+ for POSTFIX in $$PKG/files/*$$OLD.postfix; \
+ do \
+ svn cp $$POSTFIX $${POSTFIX/$$OLD/$(RELEASE)}; \
+ done; \
+ fi; \
+ for patch in ../kolab-cvs/gentoo-patches/$${PKG/*\//}/*; \
+ do \
+ export BASE=$${patch/*\//}; export BASE2=$${BASE/.patch/}; \
+ cp $$patch $$PKG/files/$${BASE2}-$(RELEASE).patch; \
+ if [ $$A != $$B ]; \
+ then \
+ svn add $$PKG/files/$${BASE2}-$(RELEASE).patch; \
+ fi; \
+ done; \
+ cd $$PKG && ebuild $${PKG/*\//}-$(RELEASE).ebuild digest && \
+ cd ../../; \
+ if [ $$A != $$B ]; \
+ then \
+ svn add $$PKG/files/digest-$${PKG/*\//}-$(RELEASE); \
+ fi; \
+
+.PHONY: update-horde
+update-horde: $(HORDE_PACKAGES)
+
+.PHONY: $(HORDE_PACKAGES)
+$(HORDE_PACKAGES):
+ rm -f $@/files/digest*
+ rm -f $@/Manifest
+ E=`ls $@/*.ebuild | sed -e 's/[^0-9]*\([0-9]*\)\(-r[0-9]*\)*.ebuild/\1/' | sort`; \
+ F=`echo $$E | wc -w`; \
+ OLD=`echo $$E | cut -d " " -f $$F`; \
+ PKG="$@"; \
+ A=$@/$${PKG/*\//}-$$OLD.ebuild; \
+ B=$@/$${PKG/*\//}-$(RELEASE).ebuild; \
+ if [ $$A != $$B ]; \
+ then \
+ svn cp $$A $$B; \
+ svn rm $$A; \
+ for FILE in $$PKG/files/*$$OLD*; \
+ do \
+ svn cp $$FILE $${FILE/$$OLD/$(RELEASE)}; \
+ svn rm $$FILE; \
+ done; \
+ fi; \
+ cd $$PKG && ebuild $${PKG/*\//}-$(RELEASE).ebuild digest && \
+ cd ../../; \
+ if [ $$A != $$B ]; \
+ then \
+ svn add $$PKG/files/digest-$${PKG/*\//}-$(RELEASE); \
+ fi;
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog
new file mode 100644
index 0000000..6a6a73f
--- /dev/null
+++ b/dev-lang/php/ChangeLog
@@ -0,0 +1,15 @@
+# ChangeLog for dev-lang/php
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 11 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org> -php-5.2.3-r20.ebuild:
+ Removed old php ebuild
+
+ 10 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org> ChangeLog:
+ Updating php ebuild.
+
+ 10 Oct 2007; <wrobel@gentoo.org> -files/php-5.2.3-kolab.patch,
+ +KOLAB_php_5.2.4_Annotations.patch, -files/70_mod_php.conf-apache1,
+ -files/70_mod_php5.conf-apache1, +php-5.2.4-r20.ebuild:
+ -m Adding patched php-5.2.4.
+
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
new file mode 100644
index 0000000..65fb464
--- /dev/null
+++ b/dev-lang/php/Manifest
@@ -0,0 +1,54 @@
+AUX 20php4-envd 145 RMD160 fb57b2d202ab1031303e7525a8ef5b353dc04ef8 SHA1 34ef066d2de22f147fc86bbe884692af7631f726 SHA256 17cd1a952434988b4c2125e4d1eef1df7114809f404605d35f255674419dd5d5
+MD5 77e3309d68e4a820b2abd408cd6c0ca0 files/20php4-envd 145
+RMD160 fb57b2d202ab1031303e7525a8ef5b353dc04ef8 files/20php4-envd 145
+SHA256 17cd1a952434988b4c2125e4d1eef1df7114809f404605d35f255674419dd5d5 files/20php4-envd 145
+AUX 20php5-envd 145 RMD160 8c81fb7dc1d1ddf16fd956d748514db3bcb27603 SHA1 f1cef57c0def8e2c5422aaf136f40b4ff47801d2 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4
+MD5 9de5c2b4ffa3f2753b5e5e690fdade42 files/20php5-envd 145
+RMD160 8c81fb7dc1d1ddf16fd956d748514db3bcb27603 files/20php5-envd 145
+SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4 files/20php5-envd 145
+AUX 70_mod_php.conf-apache2 457 RMD160 3db748289c54547b815f6b2069cc02f4a18f16da SHA1 31f1ef36ad414beaf1dcbd99c3b41db7967c129d SHA256 03059ce0ece6c9b4db2d3bbf4b6352e0a4193a45843f3888ce3c37cc447748a1
+MD5 159253d05611d995e6ec3ca73bd372ca files/70_mod_php.conf-apache2 457
+RMD160 3db748289c54547b815f6b2069cc02f4a18f16da files/70_mod_php.conf-apache2 457
+SHA256 03059ce0ece6c9b4db2d3bbf4b6352e0a4193a45843f3888ce3c37cc447748a1 files/70_mod_php.conf-apache2 457
+AUX 70_mod_php5.conf-apache2 493 RMD160 c4ace955ff65ca2ce964cf4c8d2b42f6a41e90ef SHA1 226e31837e28675addb82f48d12f05bb4e0a5e66 SHA256 9de8f6073983e0b2ff784271047563782870d981a241abdecbdda8a038b15033
+MD5 d2b2325e816b90d3be7bd23388980421 files/70_mod_php5.conf-apache2 493
+RMD160 c4ace955ff65ca2ce964cf4c8d2b42f6a41e90ef files/70_mod_php5.conf-apache2 493
+SHA256 9de8f6073983e0b2ff784271047563782870d981a241abdecbdda8a038b15033 files/70_mod_php5.conf-apache2 493
+AUX 70_mod_php5_concurr.conf-apache2 417 RMD160 2f6bc0900fd2a94268f36254f7f6717b7a5fd649 SHA1 5490af6724ecdb5801ec12ed20ab80ac26d2f950 SHA256 f09cedf53f0355130f3a449920191fd4456f7303ebfcedaf57a636a2b18c29ba
+MD5 ddc2f34aaaf326706aff17e220aec916 files/70_mod_php5_concurr.conf-apache2 417
+RMD160 2f6bc0900fd2a94268f36254f7f6717b7a5fd649 files/70_mod_php5_concurr.conf-apache2 417
+SHA256 f09cedf53f0355130f3a449920191fd4456f7303ebfcedaf57a636a2b18c29ba files/70_mod_php5_concurr.conf-apache2 417
+AUX 70_mod_php_concurr.conf-apache2 332 RMD160 e7691ce9ab686e32c48c7b204da339db098f3ef1 SHA1 fdfcebb517a25d78bc4373fec8756b147fd02fad SHA256 bb1764de57b950ca971d20a28a75ea98f907c11e2d8cc82996eda5eacd4baf7f
+MD5 b325972ed888590c3f371458d3aa3d76 files/70_mod_php_concurr.conf-apache2 332
+RMD160 e7691ce9ab686e32c48c7b204da339db098f3ef1 files/70_mod_php_concurr.conf-apache2 332
+SHA256 bb1764de57b950ca971d20a28a75ea98f907c11e2d8cc82996eda5eacd4baf7f files/70_mod_php_concurr.conf-apache2 332
+AUX KOLAB_php-5.2.4_Annotations.patch 8179 RMD160 7673332f56c60da17134f6741fd1d96eb2c528a5 SHA1 d7724737150a3a60b3f79828630e32a2c41c1d5d SHA256 66ec4f061b652d6c4ed41d5668ec1e346db3770069798468914f0dc1bf5a4c7d
+MD5 affd4e55c0f45d3ea2d42cdb3c344fe4 files/KOLAB_php-5.2.4_Annotations.patch 8179
+RMD160 7673332f56c60da17134f6741fd1d96eb2c528a5 files/KOLAB_php-5.2.4_Annotations.patch 8179
+SHA256 66ec4f061b652d6c4ed41d5668ec1e346db3770069798468914f0dc1bf5a4c7d files/KOLAB_php-5.2.4_Annotations.patch 8179
+AUX php4-ldvs 22 RMD160 e70c565b3930d9d9e3253062b7c633346cb99a63 SHA1 8c66355dfb80e2ecc6ee6faae30bf7dbb1727651 SHA256 4aee18478b09cda7e925ccde157db6099ea0122b5c4efb0868e3761b65688dde
+MD5 abaacd6115552db702b3a8df140d107d files/php4-ldvs 22
+RMD160 e70c565b3930d9d9e3253062b7c633346cb99a63 files/php4-ldvs 22
+SHA256 4aee18478b09cda7e925ccde157db6099ea0122b5c4efb0868e3761b65688dde files/php4-ldvs 22
+AUX php5-ldvs 22 RMD160 5846dab2745b68a88175dd4e72d0b8cf4756dd46 SHA1 592398c92575adb14ec972847ce2aca28a7b9c2c SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79
+MD5 9b26422d0bda7252a77a81d1b734e1bd files/php5-ldvs 22
+RMD160 5846dab2745b68a88175dd4e72d0b8cf4756dd46 files/php5-ldvs 22
+SHA256 b79d0e52b1b3b4543b31ad45525ae1c2814a27ea8e676772ab10bf6fb12dfe79 files/php5-ldvs 22
+DIST php-5.2.4.tar.bz2 7608429 RMD160 22728d27ec3ba3287943ea878fefbba0b4ffdc00 SHA1 0e8f42d1363b17fbaeb3e7732ab1a501a9a12c8e SHA256 502f5259e4619ba3549cd9f9bdeb4152c7effa66672348f3b108fccc8e1ca1c0
+DIST php-patchset-5.2.4-r0.tar.bz2 10305 RMD160 84ff2dffe6e6099d9dc8ad98fc5b99e10ac3218c SHA1 b3fb86c7c7bd4fdba8019048254ce428ac7b05fa SHA256 4ee25d74e81e44ad2fc6a0c4cf41942ef92073d61efb4b640aa63a58edb6c5fa
+DIST suhosin-patch-5.2.4-0.9.6.2-gentoo.patch.gz 22292 RMD160 185bdd92dee54d83674b3de7262d57a6ac3ef14b SHA1 555d41ee0de422a72d1516e05cf66ba4a3d4904b SHA256 3a0cecf36a74d6cb8e0042363fcbadc4afd0046eb3baff6d4dec415f6464a96a
+EBUILD php-5.2.4-r20.ebuild 14259 RMD160 68ea813c5c00aff1afef812fc69b7e2f61bdd8e8 SHA1 b806daee84cbd3e28dba231c930d9f3af79add07 SHA256 c2fe27f770225a5b21ef3dc109106aa408163525b56d7e6c30c019ee17f7c8e6
+MD5 6474976f53546ce192cacae0de1adebe php-5.2.4-r20.ebuild 14259
+RMD160 68ea813c5c00aff1afef812fc69b7e2f61bdd8e8 php-5.2.4-r20.ebuild 14259
+SHA256 c2fe27f770225a5b21ef3dc109106aa408163525b56d7e6c30c019ee17f7c8e6 php-5.2.4-r20.ebuild 14259
+MISC ChangeLog 520 RMD160 d3c6099ea988843f85f658989fe989d81d1d5bb6 SHA1 8a947b1ed88d4934278334257999232f51dc7bf6 SHA256 9cd5300dddddfee3e06195ca444a37c29dcd49e507a0764b74feda1d4e031bad
+MD5 4c60585ba73db326a828744748cb823b ChangeLog 520
+RMD160 d3c6099ea988843f85f658989fe989d81d1d5bb6 ChangeLog 520
+SHA256 9cd5300dddddfee3e06195ca444a37c29dcd49e507a0764b74feda1d4e031bad ChangeLog 520
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 65636a6e863dea5478e4d215991a91f8 files/digest-php-5.2.4-r20 807
+RMD160 4461cd245e13470f7c3b50b010568ab4cffbdb1a files/digest-php-5.2.4-r20 807
+SHA256 2f8d01af6babd496061af1dd09758c9ed0ff1523baa2918d5e5a3d7e6a6ae6f4 files/digest-php-5.2.4-r20 807
diff --git a/dev-lang/php/files/20php4-envd b/dev-lang/php/files/20php4-envd
new file mode 100644
index 0000000..ac444e9
--- /dev/null
+++ b/dev-lang/php/files/20php4-envd
@@ -0,0 +1,2 @@
+MANPATH="/usr/lib/php4/man/"
+CONFIG_PROTECT_MASK="/etc/php/cli-php4/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/apache2-php4/ext-active/"
diff --git a/dev-lang/php/files/20php5-envd b/dev-lang/php/files/20php5-envd
new file mode 100644
index 0000000..f6033ae
--- /dev/null
+++ b/dev-lang/php/files/20php5-envd
@@ -0,0 +1,2 @@
+MANPATH="/usr/lib/php5/man/"
+CONFIG_PROTECT_MASK="/etc/php/cli-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/apache2-php5/ext-active/"
diff --git a/dev-lang/php/files/70_mod_php.conf-apache2 b/dev-lang/php/files/70_mod_php.conf-apache2
new file mode 100644
index 0000000..abf8377
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php.conf-apache2
@@ -0,0 +1,17 @@
+<IfDefine PHP4>
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php5.conf-apache2 b/dev-lang/php/files/70_mod_php5.conf-apache2
new file mode 100644
index 0000000..fec8000
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php5.conf-apache2
@@ -0,0 +1,18 @@
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php5_concurr.conf-apache2 b/dev-lang/php/files/70_mod_php5_concurr.conf-apache2
new file mode 100644
index 0000000..90a6de6
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php5_concurr.conf-apache2
@@ -0,0 +1,16 @@
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php5 .php
+ AddType application/x-httpd-php5 .phtml
+ AddType application/x-httpd-php5 .php5
+ AddType application/x-httpd-php5-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/70_mod_php_concurr.conf-apache2 b/dev-lang/php/files/70_mod_php_concurr.conf-apache2
new file mode 100644
index 0000000..00a1853
--- /dev/null
+++ b/dev-lang/php/files/70_mod_php_concurr.conf-apache2
@@ -0,0 +1,14 @@
+<IfDefine PHP4>
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php4 .php3
+ AddType application/x-httpd-php4 .php4
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/KOLAB_php-5.2.4_Annotations.patch b/dev-lang/php/files/KOLAB_php-5.2.4_Annotations.patch
new file mode 100644
index 0000000..47160a9
--- /dev/null
+++ b/dev-lang/php/files/KOLAB_php-5.2.4_Annotations.patch
@@ -0,0 +1,264 @@
+Provides get/set ANNOTATIONS support to PHP. [Version: 5.2.4]
+
+diff -r 5bd2ac9f8bea ext/imap/php_imap.c
+--- a/ext/imap/php_imap.c Sat Sep 29 12:56:59 2007 +0200
++++ b/ext/imap/php_imap.c Sat Sep 29 12:59:01 2007 +0200
+@@ -129,6 +129,7 @@ zend_function_entry imap_functions[] = {
+ PHP_FE(imap_binary, NULL)
+ PHP_FE(imap_utf8, NULL)
+ PHP_FE(imap_status, NULL)
++ PHP_FE(imap_status_current, NULL)
+ PHP_FE(imap_mailboxmsginfo, NULL)
+ PHP_FE(imap_setflag_full, NULL)
+ PHP_FE(imap_clearflag_full, NULL)
+@@ -155,6 +156,10 @@ zend_function_entry imap_functions[] = {
+ PHP_FE(imap_setacl, NULL)
+ PHP_FE(imap_getacl, NULL)
+ #endif
++#if defined(HAVE_IMAP2005)
++ PHP_FE(imap_setannotation, NULL)
++ PHP_FE(imap_getannotation, NULL)
++#endif
+
+ PHP_FE(imap_mail, NULL)
+
+@@ -415,6 +420,30 @@ void mail_getacl(MAILSTREAM *stream, cha
+
+ #endif
+
++
++#if defined(HAVE_IMAP2005)
++/* {{{ mail_getannotation
++ *
++ * Mail GET_ANNOTATION callback
++ * Called via the mail_parameter function in c-client:src/c-client/mail.c
++ */
++void mail_getannotation(MAILSTREAM *stream, ANNOTATION *alist)
++{
++ ANNOTATION_VALUES *cur;
++
++ TSRMLS_FETCH();
++
++ /* walk through the ANNOTATION_VALUES */
++
++ for(cur = alist->values; cur; cur = cur->next) {
++ if (cur->value)
++ add_assoc_stringl(IMAPG(imap_annotation_list), cur->attr, cur->value, strlen(cur->value), 1);
++ else
++ add_assoc_stringl(IMAPG(imap_annotation_list), cur->attr, "", 0, 1);
++ }
++}
++/* }}} */
++#endif
+
+ /* {{{ PHP_GINIT_FUNCTION
+ */
+@@ -1092,6 +1121,122 @@ PHP_FUNCTION(imap_getacl)
+
+ #endif /* HAVE_IMAP2000 || HAVE_IMAP2001 */
+
++#if defined(HAVE_IMAP2005)
++
++/* {{{ proto bool imap_setannotation(resource stream_id, string mailbox, string entry, string attr, string value)
++ Sets an annotation for a given mailbox */
++PHP_FUNCTION(imap_setannotation)
++{
++ zval **streamind, **mailbox, **entry, **attr, **value;
++ pils *imap_le_struct;
++ long ret;
++
++ // TODO: Use zend_parse_parameters here
++ if (ZEND_NUM_ARGS() != 5 || zend_get_parameters_ex(5, &streamind, &mailbox, &entry, &attr, &value) == FAILURE) {
++ ZEND_WRONG_PARAM_COUNT();
++ }
++
++ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
++
++ convert_to_string_ex(mailbox);
++ convert_to_string_ex(entry);
++ convert_to_string_ex(attr);
++ convert_to_string_ex(value);
++
++ // create annotation object
++ ANNOTATION *annotation = mail_newannotation();
++ if (!annotation)
++ RETURN_FALSE;
++ annotation->values = mail_newannotationvalue();
++ if (!annotation->values) {
++ mail_free_annotation(&annotation);
++ RETURN_FALSE;
++ }
++
++ // fill in annotation values
++ annotation->mbox = Z_STRVAL_PP(mailbox);
++ annotation->entry = Z_STRVAL_PP(entry);
++ annotation->values->attr = Z_STRVAL_PP(attr);
++ annotation->values->value = Z_STRVAL_PP(value);
++
++ ret = imap_setannotation(imap_le_struct->imap_stream, annotation);
++
++ // make sure mail_free_annotation doesn't free our variables
++ annotation->mbox = NULL;
++ annotation->entry = NULL;
++ annotation->values->attr = NULL;
++ annotation->values->value = NULL;
++ mail_free_annotation(&annotation);
++
++ RETURN_BOOL(ret);
++}
++/* }}} */
++
++/* {{{ proto array imap_getannotation(resource stream_id, string mailbox, string entry, string attr)
++ Gets the ACL for a given mailbox */
++PHP_FUNCTION(imap_getannotation)
++{
++ zval **streamind, **mailbox, **entry, **attr;
++ pils *imap_le_struct;
++ long ret;
++
++ if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, &streamind, &mailbox, &entry, &attr) == FAILURE) {
++ ZEND_WRONG_PARAM_COUNT();
++ }
++
++ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
++
++ convert_to_string_ex(mailbox);
++ convert_to_string_ex(entry);
++ convert_to_string_ex(attr);
++
++ /* initializing the special array for the return values */
++ if (array_init(return_value) == FAILURE) {
++ RETURN_FALSE;
++ }
++
++ // fillup calling parameters
++ STRINGLIST *entries = mail_newstringlist();
++ if (!entries)
++ RETURN_FALSE;
++
++ STRINGLIST *cur = entries;
++ cur->text.data = (unsigned char *)cpystr(Z_STRVAL_PP(entry));
++ cur->text.size = Z_STRLEN_PP(entry);
++ cur->next = NIL;
++
++ STRINGLIST *attributes = mail_newstringlist();
++ cur = attributes;
++ cur->text.data = (unsigned char *)cpystr (Z_STRVAL_PP(attr));
++ cur->text.size = Z_STRLEN_PP(attr);
++ cur->next = NIL;
++
++ /* initializing the special array for the return values */
++ if (array_init(return_value) == FAILURE) {
++ mail_free_stringlist(&entries);
++ mail_free_stringlist(&attributes);
++ RETURN_FALSE;
++ }
++
++ IMAPG(imap_annotation_list) = return_value;
++
++ /* set the callback for the GET_ANNOTATION function */
++ mail_parameters(NIL, SET_ANNOTATION, (void *) mail_getannotation);
++ ret = imap_getannotation(imap_le_struct->imap_stream, Z_STRVAL_PP(mailbox), entries, attributes);
++
++ mail_free_stringlist(&entries);
++ mail_free_stringlist(&attributes);
++
++ if (!ret) {
++ zval_dtor(return_value);
++ RETURN_FALSE;
++ }
++
++ IMAPG(imap_annotation_list) = NIL;
++}
++/* }}} */
++
++#endif /* HAVE_IMAP2005 */
+
+ /* {{{ proto bool imap_expunge(resource stream_id)
+ Permanently delete all messages marked for deletion */
+@@ -2699,6 +2844,42 @@ PHP_FUNCTION(imap_msgno)
+ convert_to_long_ex(msgno);
+
+ RETURN_LONG(mail_msgno(imap_le_struct->imap_stream, Z_LVAL_PP(msgno)));
++}
++/* }}} */
++
++/* {{{ proto object imap_status_current(resource stream_id, int options)
++ Get (cached) status info from current mailbox */
++PHP_FUNCTION(imap_status_current)
++{
++ zval **streamind, **pflags;
++ pils *imap_le_struct;
++ long flags = 0L;
++
++ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &streamind, &pflags) == FAILURE) {
++ ZEND_WRONG_PARAM_COUNT();
++ }
++
++ ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap);
++
++ convert_to_long_ex(pflags);
++ flags = Z_LVAL_PP(pflags);
++
++ if (object_init(return_value) == FAILURE) {
++ RETURN_FALSE;
++ }
++
++ if (flags & SA_MESSAGES) {
++ add_property_long(return_value, "messages", imap_le_struct->imap_stream->nmsgs);
++ }
++ if (flags & SA_RECENT) {
++ add_property_long(return_value, "recent", imap_le_struct->imap_stream->recent);
++ }
++ if (flags & SA_UIDNEXT) {
++ add_property_long(return_value, "uidnext", imap_le_struct->imap_stream->uid_last+1);
++ }
++ if (flags & SA_UIDVALIDITY) {
++ add_property_long(return_value, "uidvalidity", imap_le_struct->imap_stream->uid_validity);
++ }
+ }
+ /* }}} */
+
+diff -r 5bd2ac9f8bea ext/imap/php_imap.h
+--- a/ext/imap/php_imap.h Sat Sep 29 12:56:59 2007 +0200
++++ b/ext/imap/php_imap.h Sat Sep 29 12:59:01 2007 +0200
+@@ -152,6 +152,7 @@ PHP_FUNCTION(imap_lsub_full);
+ PHP_FUNCTION(imap_lsub_full);
+ PHP_FUNCTION(imap_create);
+ PHP_FUNCTION(imap_rename);
++PHP_FUNCTION(imap_status_current);
+ PHP_FUNCTION(imap_status);
+ PHP_FUNCTION(imap_bodystruct);
+ PHP_FUNCTION(imap_fetch_overview);
+@@ -168,6 +169,9 @@ PHP_FUNCTION(imap_thread);
+ PHP_FUNCTION(imap_thread);
+ PHP_FUNCTION(imap_timeout);
+
++// TODO: Needs fixing in configure in
++#define HAVE_IMAP2005 1
++
+ #if defined(HAVE_IMAP2000) || defined(HAVE_IMAP2001)
+ PHP_FUNCTION(imap_get_quota);
+ PHP_FUNCTION(imap_get_quotaroot);
+@@ -175,7 +179,10 @@ PHP_FUNCTION(imap_setacl);
+ PHP_FUNCTION(imap_setacl);
+ PHP_FUNCTION(imap_getacl);
+ #endif
+-
++#if defined(HAVE_IMAP2005)
++PHP_FUNCTION(imap_setannotation);
++PHP_FUNCTION(imap_getannotation);
++#endif
+
+ ZEND_BEGIN_MODULE_GLOBALS(imap)
+ char *imap_user;
+@@ -206,6 +213,9 @@ ZEND_BEGIN_MODULE_GLOBALS(imap)
+ zval **quota_return;
+ zval *imap_acl_list;
+ #endif
++#if defined(HAVE_IMAP2005)
++ zval *imap_annotation_list;
++#endif
+ /* php_stream for php_mail_gets() */
+ php_stream *gets_stream;
+ ZEND_END_MODULE_GLOBALS(imap)
diff --git a/dev-lang/php/files/digest-php-5.2.4-r20 b/dev-lang/php/files/digest-php-5.2.4-r20
new file mode 100644
index 0000000..7e15568
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.2.4-r20
@@ -0,0 +1,9 @@
+MD5 55c97a671fdabf462cc7a82971a656d2 php-5.2.4.tar.bz2 7608429
+RMD160 22728d27ec3ba3287943ea878fefbba0b4ffdc00 php-5.2.4.tar.bz2 7608429
+SHA256 502f5259e4619ba3549cd9f9bdeb4152c7effa66672348f3b108fccc8e1ca1c0 php-5.2.4.tar.bz2 7608429
+MD5 d909a241292a8fc5f58f84aa18e82e7e php-patchset-5.2.4-r0.tar.bz2 10305
+RMD160 84ff2dffe6e6099d9dc8ad98fc5b99e10ac3218c php-patchset-5.2.4-r0.tar.bz2 10305
+SHA256 4ee25d74e81e44ad2fc6a0c4cf41942ef92073d61efb4b640aa63a58edb6c5fa php-patchset-5.2.4-r0.tar.bz2 10305
+MD5 becfae15ba8ec7cdbc1f084b7938063e suhosin-patch-5.2.4-0.9.6.2-gentoo.patch.gz 22292
+RMD160 185bdd92dee54d83674b3de7262d57a6ac3ef14b suhosin-patch-5.2.4-0.9.6.2-gentoo.patch.gz 22292
+SHA256 3a0cecf36a74d6cb8e0042363fcbadc4afd0046eb3baff6d4dec415f6464a96a suhosin-patch-5.2.4-0.9.6.2-gentoo.patch.gz 22292
diff --git a/dev-lang/php/files/php4-ldvs b/dev-lang/php/files/php4-ldvs
new file mode 100644
index 0000000..01b4eeb
--- /dev/null
+++ b/dev-lang/php/files/php4-ldvs
@@ -0,0 +1 @@
+PHP_4 { global: *; };
diff --git a/dev-lang/php/files/php5-ldvs b/dev-lang/php/files/php5-ldvs
new file mode 100644
index 0000000..783b0f6
--- /dev/null
+++ b/dev-lang/php/files/php5-ldvs
@@ -0,0 +1 @@
+PHP_5 { global: *; };
diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/dev-lang/php/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/dev-lang/php/php-5.2.4-r20.ebuild b/dev-lang/php/php-5.2.4-r20.ebuild
new file mode 100644
index 0000000..fc70536
--- /dev/null
+++ b/dev-lang/php/php-5.2.4-r20.ebuild
@@ -0,0 +1,481 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.2.4.ebuild,v 1.1 2007/09/08 18:26:36 hoffie Exp $
+
+CGI_SAPI_USE="discard-path force-cgi-redirect"
+APACHE2_SAPI_USE="concurrentmodphp threads"
+IUSE="cli cgi ${CGI_SAPI_USE} ${APACHE2_SAPI_USE} fastbuild kolab"
+
+KEYWORDS="x86 amd64"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+PROVIDE="virtual/php virtual/httpd-php"
+
+# php package settings
+SLOT="5"
+MY_PHP_PV="${PV}"
+MY_PHP_P="php-${MY_PHP_PV}"
+PHP_PACKAGE="1"
+
+# php patch settings, general
+PHP_PATCHSET_REV="0"
+SUHOSIN_PATCH="suhosin-patch-${MY_PHP_PV}-0.9.6.2-gentoo.patch.gz"
+MULTILIB_PATCH="${MY_PHP_PV}/opt/multilib-search-path.patch"
+# php patch settings, ebuild specific
+FASTBUILD_PATCH="${MY_PHP_PV}/opt/fastbuild.patch"
+CONCURRENTMODPHP_PATCH="${MY_PHP_PV}/opt/concurrent_apache_modules.patch"
+
+inherit php5_2-sapi apache-module
+
+DESCRIPTION="The PHP language runtime engine: CLI, CGI and Apache2 SAPIs."
+
+DEPEND="app-admin/php-toolkit"
+RDEPEND="${DEPEND}"
+
+want_apache
+
+pkg_setup() {
+ PHPCONFUTILS_AUTO_USE=""
+
+ # Make sure the user has specified at least one SAPI
+ einfo "Determining SAPI(s) to build"
+ phpconfutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache2
+
+ # Threaded Apache2 support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if ! use threads ; then
+ APACHE2_SAFE_MPMS="itk peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if use concurrentmodphp ; then
+ ewarn
+ ewarn "'concurrentmodphp' makes it possible to load multiple, differently"
+ ewarn "versioned mod_php's into the same Apache instance. This is done with"
+ ewarn "a few linker tricks and workarounds, and is not guaranteed to always"
+ ewarn "work correctly, so use it at your own risk. Especially, do not use"
+ ewarn "this in conjunction with PHP modules (PECL, ...) other than the ones"
+ ewarn "you may find in the Portage tree or the PHP Overlay!"
+ ewarn "This is an experimental feature, so please rebuild PHP"
+ ewarn "without the 'concurrentmodphp' USE flag if you experience"
+ ewarn "any problems, and then reproduce any bugs before filing"
+ ewarn "them in Gentoo's Bugzilla or bugs.php.net."
+ ewarn "If you have conclusive evidence that a bug directly"
+ ewarn "derives from 'concurrentmodphp', please file a bug in"
+ ewarn "Gentoo's Bugzilla only."
+ ewarn
+ ebeep 5
+ fi
+ fi
+ fi
+
+ # fastbuild support
+ if use fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, so please rebuild PHP"
+ ewarn "without the 'fastbuild' USE flag if you experience"
+ ewarn "any problems, and then reproduce any bugs before filing"
+ ewarn "them in Gentoo's Bugzilla or bugs.php.net."
+ ewarn "If you have conclusive evidence that a bug directly"
+ ewarn "derives from 'fastbuild', please file a bug in"
+ ewarn "Gentoo's Bugzilla only."
+ ewarn
+ fi
+
+ php5_2-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if use cli || phpconfutils_usecheck cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if use cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PHP_PACKAGE}" == 1 ]] ; then
+ unpack ${A}
+ fi
+
+ cd "${S}"
+
+ if use kolab ; then
+ epatch ${FILESDIR}/KOLAB_${P}_Annotations.patch || die "Patching for kolab failed!"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ if use concurrentmodphp ; then
+ if [[ -n "${CONCURRENTMODPHP_PATCH}" ]] && [[ -f "${WORKDIR}/${CONCURRENTMODPHP_PATCH}" ]] ; then
+ epatch "${WORKDIR}/${CONCURRENTMODPHP_PATCH}"
+ else
+ ewarn "There is no concurrent mod_php patch available for this PHP release yet!"
+ fi
+ fi
+ fi
+ fi
+
+ # fastbuild support
+ if use fastbuild ; then
+ if [[ -n "${FASTBUILD_PATCH}" ]] && [[ -f "${WORKDIR}/${FASTBUILD_PATCH}" ]] ; then
+ epatch "${WORKDIR}/${FASTBUILD_PATCH}"
+ else
+ ewarn "There is no fastbuild patch available for this PHP release yet!"
+ fi
+ fi
+
+ # Now let the eclass do the rest and regenerate the configure
+ php5_2-sapi_src_unpack
+
+ # Fix Makefile.global:test to consider the CGI SAPI if present
+ if use cgi ; then
+ sed -e "s|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\"|test \! -z \"\$(top_builddir)/php-cli\" \&\& test -x \"\$(top_builddir)/php-cli\" \&\& test \! -z \"\$(top_builddir)/php-cgi\" \&\& test -x \"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
+ sed -e "s|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\"|TEST_PHP_EXECUTABLE=\"\$(top_builddir)/php-cli\" TEST_PHP_CGI_EXECUTABLE=\"\$(top_builddir)/php-cgi\"|g" -i Makefile.global
+ fi
+}
+
+src_compile() {
+ if use fastbuild && [[ -n "${FASTBUILD_PATCH}" ]] ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache2=0
+ my_conf=""
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache2)
+ build_apache2=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ phpconfutils_extension_enable "discard-path" "discard-path" 0
+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs2=/usr/sbin/apxs2"
+
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+
+ # Now we know what we are building, build it
+ php5_2-sapi_src_compile
+
+ # To keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php5"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php5/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php5"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php5/ext-active"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php-cgi || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
+ fi
+
+ if [[ ${build_apache2} = 1 ]] ; then
+ einfo
+ einfo "Building apache${APACHE_VERSION} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${APACHE_VERSION}-php5\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${APACHE_VERSION}-php5/ext-active\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to make apache${APACHE_VERSION} SAPI"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+ my_conf=""
+
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Concurrent PHP Apache2 modules support
+ if use concurrentmodphp ; then
+ append-ldflags "-Wl,--version-script=${FILESDIR}/php5-ldvs"
+ fi
+ fi
+ fi
+
+ for x in ${PHPSAPIS} ; do
+ # Support the Apache2 extras, they must be set globally for all
+ # SAPIs to work correctly, especially for external PHP extensions
+ if use apache2 ; then
+ if [[ "${APACHE_VERSION}" != "0" ]] ; then
+ # Threaded Apache2 support
+ if use threads ; then
+ my_conf="${my_conf} --enable-maintainer-zts"
+ ewarn "Enabling ZTS for Apache2 MPM"
+ fi
+ fi
+ fi
+
+ if [[ "${CLEAN_REQUIRED}" = 1 ]] ; then
+ make clean
+ fi
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ my_conf="${my_conf} --enable-cli --disable-cgi"
+ php5_2-sapi_src_compile
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ ;;
+ cgi)
+ my_conf="${my_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ phpconfutils_extension_enable "discard-path" "discard-path" 0
+ phpconfutils_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_2-sapi_src_compile
+ cp sapi/cgi/php-cgi php-cgi || die "Unable to copy CGI SAPI"
+ ;;
+ apache2)
+ my_conf="${my_conf} --disable-cli --with-apxs2=/usr/sbin/apxs2"
+ php5_2-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ my_conf=""
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # Let the eclass do the common work
+ php5_2-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+
+ PHPSAPI="${x}"
+
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_2-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_2-sapi_install_ini
+ ;;
+ apache2)
+ einfo "Installing Apache${APACHE_VERSION} SAPI"
+ make INSTALL_ROOT="${D}" install-sapi || die "Unable to install ${x} SAPI"
+ if use concurrentmodphp ; then
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5-concurrent (70_mod_php5_concurr.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5_concurr.conf-apache2" "70_mod_php5_concurr.conf"
+
+ # Put the ld version script in the right place so it's always accessible
+ insinto "/var/lib/php-pkg/${CATEGORY}/${PN}-${PVR}/"
+ doins "${FILESDIR}/php5-ldvs"
+
+ # Redefine the extension dir to have the modphp suffix
+ PHPEXTDIR="`"${D}/${destdir}/bin/php-config" --extension-dir`-versioned"
+ else
+ einfo "Installing Apache${APACHE_VERSION} config file for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ newins "${FILESDIR}/70_mod_php5.conf-apache2" "70_mod_php5.conf"
+ fi
+ php5_2-sapi_install_ini
+ ;;
+ esac
+ done
+
+ # Install env.d files
+ newenvd "${FILESDIR}/20php5-envd" "20php5"
+ sed -e "s|/lib/|/$(get_libdir)/|g" -i "${D}/etc/env.d/20php5"
+}
+
+pkg_postinst() {
+ # Output some general info to the user
+ if use apache2 ; then
+ APACHE2_MOD_DEFINE="PHP5"
+ if use concurrentmodphp ; then
+ APACHE2_MOD_CONF="70_mod_php5_concurr"
+ else
+ APACHE2_MOD_CONF="70_mod_php5"
+ fi
+ apache-module_pkg_postinst
+ fi
+
+ # Update Apache2 to use mod_php
+ if use apache2 ; then
+ "${ROOT}/usr/sbin/php-select" -t apache2 php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 2 ]] ; then
+ php-select apache2 php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "Apache2 is configured to load a different version of PHP."
+ ewarn "To make Apache2 use PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select apache2 php5"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cli
+ if use cli || phpconfutils_usecheck cli ; then
+ "${ROOT}/usr/sbin/php-select" -t php php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "/usr/bin/php links to a different version of PHP."
+ ewarn "To make /usr/bin/php point to PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select php php5"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-cgi
+ if use cgi ; then
+ "${ROOT}/usr/sbin/php-select" -t php-cgi php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ ${exitStatus} == 5 ]] ; then
+ php-select php-cgi php5
+ elif [[ ${exitStatus} == 4 ]] ; then
+ ewarn
+ ewarn "/usr/bin/php-cgi links to a different version of PHP."
+ ewarn "To make /usr/bin/php-cgi point to PHP v5, use php-select:"
+ ewarn
+ ewarn " php-select php-cgi php5"
+ ewarn
+ fi
+ fi
+
+ # Create the symlinks for php-devel
+ "${ROOT}/usr/sbin/php-select" -t php-devel php5 > /dev/null 2>&1
+ exitStatus=$?
+ if [[ $exitStatus == 5 ]] ; then
+ php-select php-devel php5
+ elif [[ $exitStatus == 4 ]] ; then
+ ewarn
+ ewarn "/usr/bin/php-config and/or /usr/bin/phpize are linked to a"
+ ewarn "different version of PHP. To make them point to PHP v5, use"
+ ewarn "php-select:"
+ ewarn
+ ewarn " php-select php-devel php5"
+ ewarn
+ fi
+
+ php5_2-sapi_pkg_postinst
+}
+
+src_test() {
+ einfo ">>> Test phase [test]: ${CATEGORY}/${PF}"
+ if ! emake -j1 test ; then
+ hasq test ${FEATURES} && die "Make test failed. See above for details."
+ hasq test ${FEATURES} || eerror "Make test failed. See above for details."
+ fi
+}
diff --git a/dev-perl/perl-kolab/ChangeLog b/dev-perl/perl-kolab/ChangeLog
new file mode 100644
index 0000000..079464d
--- /dev/null
+++ b/dev-perl/perl-kolab/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for dev-perl/perl-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 11 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org> perl-kolab-2.1.ebuild:
+ Updated to the newer cyrus-imap-admin ebuild.
+
diff --git a/dev-perl/perl-kolab/Manifest b/dev-perl/perl-kolab/Manifest
new file mode 100644
index 0000000..4242438
--- /dev/null
+++ b/dev-perl/perl-kolab/Manifest
@@ -0,0 +1,24 @@
+AUX kolab_services 2862 RMD160 8210ceccd575b61b7738af6f8b0bd16c61185588 SHA1 1d23c96cd04172aa07f0638ad38b41c4ce0cb9b5 SHA256 b0bcc0c7dfb0edfb32fa1239c6d2347620b2dd0c05d3a71201dd6514a52c1184
+MD5 d533c9df73cf8f000a120d5e17f74a03 files/kolab_services 2862
+RMD160 8210ceccd575b61b7738af6f8b0bd16c61185588 files/kolab_services 2862
+SHA256 b0bcc0c7dfb0edfb32fa1239c6d2347620b2dd0c05d3a71201dd6514a52c1184 files/kolab_services 2862
+AUX perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch 2242 RMD160 c5071b50b275dedfa7779b16aa0e299ac5e7ee04 SHA1 41f3894f37147da9c1755691066e908864af55d4 SHA256 e677bb60d1bc515c42b621edfcd1a2a89026449080dc114c410da7e0ca98779c
+MD5 7efbc51963868f591d12381980e0e792 files/perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch 2242
+RMD160 c5071b50b275dedfa7779b16aa0e299ac5e7ee04 files/perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch 2242
+SHA256 e677bb60d1bc515c42b621edfcd1a2a89026449080dc114c410da7e0ca98779c files/perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch 2242
+DIST perl-kolab-2.1-gentoo-20070510.tar.bz2 79381 RMD160 68c0c8aeda64fe1104b105cd2669d6156675dc8a SHA1 fd20a7bc5cadfa69e01958ecaea57dbfb2f7e5af SHA256 66a6197a2b37333e88bb46ed286e5a8e3235427e67f0d8d59f2d96712108d427
+EBUILD perl-kolab-2.1.ebuild 1850 RMD160 941aa855b2d9bd76bcc818e64431d7ef8581f1a3 SHA1 49f3ca6ce5f7464a1a1690fddc827d4970ef29ea SHA256 9105c4ef5f7016d33845a451ccac94719255c5fc1a3d55d8d502559978b565db
+MD5 710645070bbe1cf8bb79931f9cccc34f perl-kolab-2.1.ebuild 1850
+RMD160 941aa855b2d9bd76bcc818e64431d7ef8581f1a3 perl-kolab-2.1.ebuild 1850
+SHA256 9105c4ef5f7016d33845a451ccac94719255c5fc1a3d55d8d502559978b565db perl-kolab-2.1.ebuild 1850
+MISC ChangeLog 241 RMD160 4a20ef7cf22da7045c065f755f555f3c496c708c SHA1 c12718fc18475f59158ee1bbd698f3b951c1a2b9 SHA256 2f1c1b4bf5d80f274f983c09dd864635066b8eeb7fd38ad26ececf0e278d0908
+MD5 0088a225f5139204a68ad5ef3b61c4f8 ChangeLog 241
+RMD160 4a20ef7cf22da7045c065f755f555f3c496c708c ChangeLog 241
+SHA256 2f1c1b4bf5d80f274f983c09dd864635066b8eeb7fd38ad26ececf0e278d0908 ChangeLog 241
+MISC metadata.xml 232 RMD160 251750822acfe36f54ec830fa053e985a7278a33 SHA1 fdbcf61b9d99ee20f934ecc104ade9609a229e78 SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1
+MD5 472818759cc5022b4fff0910a12b75d1 metadata.xml 232
+RMD160 251750822acfe36f54ec830fa053e985a7278a33 metadata.xml 232
+SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1 metadata.xml 232
+MD5 ee6a80a58f21b178c51d3fadb22e9775 files/digest-perl-kolab-2.1 292
+RMD160 99ccbddbd312c6b0f18eabe1b97f862f103d6ece files/digest-perl-kolab-2.1 292
+SHA256 015f380b9555f6e6e48163df1eab5d650aee1c3aec9128ea14cbf38f482afad5 files/digest-perl-kolab-2.1 292
diff --git a/dev-perl/perl-kolab/files/digest-perl-kolab-2.1 b/dev-perl/perl-kolab/files/digest-perl-kolab-2.1
new file mode 100644
index 0000000..bf3700d
--- /dev/null
+++ b/dev-perl/perl-kolab/files/digest-perl-kolab-2.1
@@ -0,0 +1,3 @@
+MD5 5f52b380d08abecc441918b548fa447e perl-kolab-2.1-gentoo-20070510.tar.bz2 79381
+RMD160 68c0c8aeda64fe1104b105cd2669d6156675dc8a perl-kolab-2.1-gentoo-20070510.tar.bz2 79381
+SHA256 66a6197a2b37333e88bb46ed286e5a8e3235427e67f0d8d59f2d96712108d427 perl-kolab-2.1-gentoo-20070510.tar.bz2 79381
diff --git a/dev-perl/perl-kolab/files/kolab_services b/dev-perl/perl-kolab/files/kolab_services
new file mode 100755
index 0000000..9838d0c
--- /dev/null
+++ b/dev-perl/perl-kolab/files/kolab_services
@@ -0,0 +1,93 @@
+#!/bin/bash
+##
+## Kolab Service tool
+##
+## Copyright (c) 2007 p@rdus <http://www.pardus.de>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+service=$1
+action=$2
+
+case "${service}" in
+ openldap)
+ case "${action}" in
+ restart)
+ /etc/init.d/slurpd --quiet restart &
+ /etc/init.d/slapd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ saslauthd)
+ case "${action}" in
+ restart)
+ /etc/init.d/saslauthd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ apache)
+ case "${action}" in
+ restart)
+ /etc/init.d/apache2 --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ postfix)
+ case "${action}" in
+ restart)
+ /etc/init.d/postfix --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ imapd)
+ case "${action}" in
+ restart)
+ /etc/init.d/cyrus --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ amavisd)
+ case "${action}" in
+ restart)
+ /etc/init.d/amavisd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ clamav)
+ case "${action}" in
+ restart)
+ /etc/init.d/clamd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ proftpd)
+ case "${action}" in
+ restart)
+ [ -f /etc/init.d/proftpd ] && /etc/init.d/proftpd --quiet restart &;;
+ start)
+ [ -f /etc/init.d/proftpd ] && /etc/init.d/proftpd --quiet status || /etc/init.d/proftpd --quiet start &;;
+ stop)
+ [ -f /etc/init.d/proftpd ] && /etc/init.d/proftpd --quiet status && /etc/init.d/proftpd stop &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ *)
+ echo "kolab:ERROR: Invalid service \"${service}\"." 1>&2;;
+esac
diff --git a/dev-perl/perl-kolab/files/perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch b/dev-perl/perl-kolab/files/perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch
new file mode 100644
index 0000000..38fcd04
--- /dev/null
+++ b/dev-perl/perl-kolab/files/perl-kolab_perl-kolab_Kolab_Kolab.pm.in-2.1.patch
@@ -0,0 +1,63 @@
+--- perl-kolab/perl-kolab/Kolab/Kolab.pm.in 2007-05-10 15:08:45.000000000 +0200
++++ perl-kolab/perl-kolab/Kolab/Kolab.pm.in.gentoo 2007-05-10 15:12:11.000000000 +0200
+@@ -399,50 +399,49 @@
+ {
+ if ($haschanged{'slapd'}) {
+ &log('K', 'Restarting OpenLDAP...');
+- system("@KOLABRC@ rc openldap restart &");
++ system("@KOLABSERVICES@ openldap restart &");
+ }
+
+ if ($haschanged{'saslauthd'}) {
+ &log('K', 'Restarting SASLAuthd...');
+- system("@KOLABRC@ rc sasl stop; sleep 1; @sbindir@/saslauthd -a ldap -n 5");
++ system("@KOLABSERVICES@ saslauthd restart &");
+ }
+
+ if ($haschanged{'apache'}) {
+ &log('K', 'Reloading Apache...');
+- system("@sbindir@/apachectl graceful");
++ system("@KOLABSERVICES@ apache restart &");
+ }
+
+ if ($haschanged{'postfix'}) {
+ &log('K', 'Reloading Postfix...');
+- system("@sbindir@/postfix reload");
++ system("@KOLABSERVICES@ postfix restart &");
+ }
+
+ if ($haschanged{'imapd'}) {
+ &log('K', 'Restarting imapd...');
+- # Would it be enough with a reload here? /steffen
+- system("@KOLABRC@ rc imapd restart");
++ system("@KOLABSERVICES@ cyrus restart &");
+ }
+
+ if ($haschanged{'amavisd'}) {
+ &log('K', 'Restarting amavisd...');
+- system("@KOLABRC@ rc amavisd restart");
++ system("@KOLABSERVICES@ amavisd restart &");
+ }
+
+ if ($haschanged{'clamav'}) {
+ &log('K', 'Restarting clamav...');
+- system("@KOLABRC@ rc clamav restart");
++ system("@KOLABSERVICES@ clamav restart &");
+ }
+
+ if ($config{'proftpd-ftp'} =~ /true/i) {
+ Kolab::log('K', 'Starting ProFTPd if not running');
+- system("@KOLABRC@ rc proftpd start");
++ system("@KOLABSERVICES@ proftpd start &");
+ if ($haschanged{'proftpd'}) {
+ &log('K', 'Reloading ProFTPd...');
+- kill('SIGHUP', `cat @ftpserver_pidfile@`);
++ system("@KOLABSERVICES@ proftpd restart &");
+ }
+ } else {
+ &log('K', 'Stopping ProFTPd, if running...');
+- system("@KOLABRC@ rc proftpd stop");
++ system("@KOLABSERVICES@ proftpd stop &");
+ }
+
+ %Kolab::Conf::haschanged = ();
diff --git a/dev-perl/perl-kolab/metadata.xml b/dev-perl/perl-kolab/metadata.xml
new file mode 100644
index 0000000..393e9ef
--- /dev/null
+++ b/dev-perl/perl-kolab/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>wrobel@gentoo.org</email>
+ <name>Gunnar Wrobel</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/dev-perl/perl-kolab/perl-kolab-2.1.ebuild b/dev-perl/perl-kolab/perl-kolab-2.1.ebuild
new file mode 100644
index 0000000..81c82ff
--- /dev/null
+++ b/dev-perl/perl-kolab/perl-kolab-2.1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils perl-module
+
+MY_P=perl-kolab-2.1-gentoo-20070510
+
+DESCRIPTION="Perl modules for the Kolab groupware server"
+HOMEPAGE="http://www.kolab.org"
+SRC_URI="http://build.pardus.de/downloads/${MY_P}.tar.bz2"
+
+SLOT="0"
+
+LICENSE="GPL-2"
+KEYWORDS="x86 amd64"
+IUSE=""
+
+DEPEND=""
+
+RDEPEND="dev-lang/perl
+ perl-core/DB_File
+
+ !>net-mail/cyrus-imap-admin-2.3.9-r20
+ =net-mail/cyrus-imap-admin-2.3.9-r20
+ !<net-mail/cyrus-imap-admin-2.3.9-r20
+
+ dev-perl/perl-ldap
+ dev-perl/MIME-tools
+ dev-perl/MIME-Lite
+ dev-perl/Mail-IMAPClient
+ dev-perl/URI"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ #############################################################
+ # Create the special kolab users and their groups
+
+ # The kolab groups will have the same name as the kolab users
+ local musr="kolab"
+ local rusr="kolab-r"
+ local nusr="kolab-n"
+
+ local kolabusers="${musr}:kolab-management-account
+ ${rusr}:kolab-restricted-account
+ ${nusr}:kolab-non-priviledged-account"
+
+ for user in ${kolabusers}
+ do
+ enewgroup ${user/:*/}
+ enewuser ${user/:*/} -1 /bin/bash / ${user/:*/} "-cadded by portage for kolab [${user/*:/}]"
+ done
+}
+
+src_unpack() {
+
+ unpack ${A} && cd "${S}"
+
+ ## Patching the code for gentoo
+
+ for PATCH in ${FILESDIR}/*-${PV}.patch
+ do
+ epatch ${PATCH}
+ done
+}
+
+src_compile() {
+
+ perlinfo
+
+ local myconf
+ myconf="${myconf} --localstatedir=/var"
+ myconf="${myconf} --with-dist=gentoo"
+ myconf="${myconf} --libexecdir=/usr/lib"
+
+ econf ${myconf} || die
+ emake || die
+}
+
+src_install() {
+
+ #############################################################
+ # Install perl source code
+
+ make install DESTDIR=${D} || die
+
+ # Add this script until we have a better solution
+ dosbin ${FILESDIR}/kolab_services
+}
diff --git a/dev-php/PEAR-Horde-Channel/Manifest b/dev-php/PEAR-Horde-Channel/Manifest
new file mode 100644
index 0000000..a7b3f92
--- /dev/null
+++ b/dev-php/PEAR-Horde-Channel/Manifest
@@ -0,0 +1,7 @@
+EBUILD PEAR-Horde-Channel-1.0.ebuild 687 RMD160 d017ab37bcba28cbdcb6da1b21bc18744d85bb32 SHA1 138499caec0a23f97b284d5e783d249153a19e60 SHA256 b33021f950c77c9eae6f11656a4e7da6dedc93dc9190d7c163f04b69719b77dd
+MD5 19e494aedbdd2e9e555570fd322d3d80 PEAR-Horde-Channel-1.0.ebuild 687
+RMD160 d017ab37bcba28cbdcb6da1b21bc18744d85bb32 PEAR-Horde-Channel-1.0.ebuild 687
+SHA256 b33021f950c77c9eae6f11656a4e7da6dedc93dc9190d7c163f04b69719b77dd PEAR-Horde-Channel-1.0.ebuild 687
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-PEAR-Horde-Channel-1.0 0
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-PEAR-Horde-Channel-1.0 0
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-PEAR-Horde-Channel-1.0 0
diff --git a/dev-php/PEAR-Horde-Channel/PEAR-Horde-Channel-1.0.ebuild b/dev-php/PEAR-Horde-Channel/PEAR-Horde-Channel-1.0.ebuild
new file mode 100644
index 0000000..30aeba6
--- /dev/null
+++ b/dev-php/PEAR-Horde-Channel/PEAR-Horde-Channel-1.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-Auth/PEAR-Auth-1.3.2.ebuild,v 1.1 2006/09/17 13:52:44 chtekk Exp $
+
+inherit php-pear-r1 depend.php
+
+DESCRIPTION="Dummy ebuild for an additional Horde PEAR channel."
+LICENSE="PHP"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+RDEPEND=""
+
+SRC_URI=""
+
+src_unpack() { :;}
+src_install() { :;}
+
+pkg_postinst() {
+
+ pear clear-cache
+
+ # Update PEAR/PECL channels as needed, add new ones to the list if needed
+ pearchans="pear.horde.org"
+
+ for chan in ${pearchans} ; do
+ pear channel-discover ${chan}
+ pear channel-update ${chan}
+ done
+}
diff --git a/dev-php/PEAR-Horde-Channel/files/digest-PEAR-Horde-Channel-1.0 b/dev-php/PEAR-Horde-Channel/files/digest-PEAR-Horde-Channel-1.0
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dev-php/PEAR-Horde-Channel/files/digest-PEAR-Horde-Channel-1.0
diff --git a/dev-php/PEAR-Net_IMAP/Manifest b/dev-php/PEAR-Net_IMAP/Manifest
new file mode 100644
index 0000000..a267b79
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/Manifest
@@ -0,0 +1,28 @@
+AUX IMAP.php 84242 RMD160 641aeff3dba69a9036989581f382749a6b9c859b SHA1 4e8b75bbda5f634c533769a28b4969405e6f8b92 SHA256 8dbb22e042519a7d23f1d0b9131a3baa7673da115ad445ccbf79495bc16adfea
+MD5 43c97e19fea40058b64826cd13b6ac98 files/IMAP.php 84242
+RMD160 641aeff3dba69a9036989581f382749a6b9c859b files/IMAP.php 84242
+SHA256 8dbb22e042519a7d23f1d0b9131a3baa7673da115ad445ccbf79495bc16adfea files/IMAP.php 84242
+AUX IMAPProtocol.php 95496 RMD160 6385a5d3ce3404d2abb7d15ebab8c7742fac6c38 SHA1 01e613345d6840b7bb4250d1c7d521b75742ddd8 SHA256 f4af8e11872bd74b2558b0b9a0ec7b1ae1d28ad5480a1bc046e74bcd3b815ff7
+MD5 84b61843ba5e4b31f940aa60a71357be files/IMAPProtocol.php 95496
+RMD160 6385a5d3ce3404d2abb7d15ebab8c7742fac6c38 files/IMAPProtocol.php 95496
+SHA256 f4af8e11872bd74b2558b0b9a0ec7b1ae1d28ad5480a1bc046e74bcd3b815ff7 files/IMAPProtocol.php 95496
+AUX imap-logout.patch 762 RMD160 6ebe07156be046ea08d0ed00dd9b62368216d280 SHA1 af27024b75ad789a3d03e04410536e3723e6213c SHA256 1233423da46a61a1344baf9add1265c1f8b59c3ca567765076197147bb3ef346
+MD5 d6ad9fcf2176cdd326280b8bbc256af6 files/imap-logout.patch 762
+RMD160 6ebe07156be046ea08d0ed00dd9b62368216d280 files/imap-logout.patch 762
+SHA256 1233423da46a61a1344baf9add1265c1f8b59c3ca567765076197147bb3ef346 files/imap-logout.patch 762
+DIST Net_IMAP-1.0.3.tgz 27192 RMD160 d62d38754678165b47b564ea95d74850e77fe512 SHA1 937be765214c589985c4a77becd21329eb04a0a9 SHA256 9b89d403db3e065ec0910aa2ede70ed84131f4086eece9ebbb9572858ca5baab
+DIST Net_IMAP-1.1.0beta1.tgz 35776 RMD160 0d98086f7946cf1ef4ecf4413f77bbf50336ac7f SHA1 66561bd673be48da20dcfbbf75f12d77c01df47b SHA256 7ffe6985881258fc66dc22d1fca87727b1b69ebf38594fe578265243d2093631
+EBUILD PEAR-Net_IMAP-1.0.3-r2.ebuild 513 RMD160 159350d52610d41d77173f4e1bd8096aee677171 SHA1 996a7c33bb39e2bcf96336d5f13a695e3618b8c1 SHA256 d450280926696a0867a6a4e06d8df819eb387e537bdb3380b197b998fae56862
+MD5 c1c957e08aab29dfc2c88890146cb3a4 PEAR-Net_IMAP-1.0.3-r2.ebuild 513
+RMD160 159350d52610d41d77173f4e1bd8096aee677171 PEAR-Net_IMAP-1.0.3-r2.ebuild 513
+SHA256 d450280926696a0867a6a4e06d8df819eb387e537bdb3380b197b998fae56862 PEAR-Net_IMAP-1.0.3-r2.ebuild 513
+EBUILD PEAR-Net_IMAP-1.1.0_beta1.ebuild 675 RMD160 6759e883a7074590815a4fe6e82763821a85b3f5 SHA1 36e38ee47bd5161e6ae6796eb5e33c4d2d2630b4 SHA256 2c4f93760ddcdbf93a2546b05943ecd66dd2fed762a6ef7829cbf13fb94a268c
+MD5 53c69812c7ce72a6207e45e7a0069d8e PEAR-Net_IMAP-1.1.0_beta1.ebuild 675
+RMD160 6759e883a7074590815a4fe6e82763821a85b3f5 PEAR-Net_IMAP-1.1.0_beta1.ebuild 675
+SHA256 2c4f93760ddcdbf93a2546b05943ecd66dd2fed762a6ef7829cbf13fb94a268c PEAR-Net_IMAP-1.1.0_beta1.ebuild 675
+MD5 f0ed683d6c893ce23f9b0cd9c55b7b02 files/digest-PEAR-Net_IMAP-1.0.3-r2 232
+RMD160 86d96b9eb26fd5028e5610f18ba7e07ad827a2f2 files/digest-PEAR-Net_IMAP-1.0.3-r2 232
+SHA256 81eca1ac83c6c1f466b414f7fe7c1277d55ed17a38d51005cab3ddfcfe4736bb files/digest-PEAR-Net_IMAP-1.0.3-r2 232
+MD5 31d9f3c38cbb74d93df0d665b79f8484 files/digest-PEAR-Net_IMAP-1.1.0_beta1 247
+RMD160 96c6ccad0dad6e8f55b424b46734d24750319c0f files/digest-PEAR-Net_IMAP-1.1.0_beta1 247
+SHA256 b1a486182cc4fd61eee7b7345b2e996f0cd91103a16aa0e8387f240fbc1e1196 files/digest-PEAR-Net_IMAP-1.1.0_beta1 247
diff --git a/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.0.3-r2.ebuild b/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.0.3-r2.ebuild
new file mode 100644
index 0000000..ac1f94d
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.0.3-r2.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.0.3-r1.ebuild,v 1.14 2006/02/18 20:14:58 agriffis Exp $
+
+inherit php-pear-r1 eutils
+
+DESCRIPTION="Provides an implementation of the IMAP protocol."
+
+LICENSE="PHP"
+SLOT="0"
+KEYWORDS="x86 ~amd64"
+IUSE=""
+RDEPEND=">=dev-php/PEAR-Net_Socket-1.0.6-r1"
+
+src_unpack() {
+
+ unpack "${A}"
+
+ cd "${S}"
+
+ epatch ${FILESDIR}/imap-logout.patch
+
+}
diff --git a/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.1.0_beta1.ebuild b/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.1.0_beta1.ebuild
new file mode 100644
index 0000000..89fc3c1
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.1.0_beta1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-php/PEAR-Net_IMAP/PEAR-Net_IMAP-1.0.3-r1.ebuild,v 1.14 2006/02/18 20:14:58 agriffis Exp $
+
+inherit php-pear-r1 eutils
+
+PEAR_PV="1.1.0beta1"
+PEAR_PN="${PHP_PEAR_PKG_NAME}-${PEAR_PV}"
+SRC_URI="http://pear.php.net/get/${PEAR_PN}.tgz"
+S="${WORKDIR}/${PEAR_PN}"
+
+DESCRIPTION="Provides an implementation of the IMAP protocol."
+
+LICENSE="PHP"
+SLOT="0"
+KEYWORDS="x86 ~amd64"
+IUSE=""
+RDEPEND=">=dev-php/PEAR-Net_Socket-1.0.6-r1"
+
+src_unpack() {
+
+ unpack "${A}"
+
+ cd "${S}"
+
+ cp ${FILESDIR}/IMAP.php .
+ cp ${FILESDIR}/IMAPProtocol.php .
+}
diff --git a/dev-php/PEAR-Net_IMAP/files/IMAP.php b/dev-php/PEAR-Net_IMAP/files/IMAP.php
new file mode 100644
index 0000000..76c37ec
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/files/IMAP.php
@@ -0,0 +1,2681 @@
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Author: Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar> |
+// +----------------------------------------------------------------------+
+
+
+require_once 'Net/IMAPProtocol.php';
+
+
+/**
+ * Provides an implementation of the IMAP protocol using PEAR's
+ * Net_Socket:: class.
+ *
+ * @package Net_IMAP
+ * @author Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar>
+ */
+class Net_IMAP extends Net_IMAPProtocol {
+
+ /**
+ * Constructor
+ *
+ * Instantiates a new Net_SMTP object, overriding any defaults
+ * with parameters that are passed in.
+ *
+ * @param string The server to connect to.
+ * @param int The port to connect to.
+ * @param string The value to give when sending EHLO or HELO.
+ */
+ function Net_IMAP($host = 'localhost', $port = 143)
+ {
+ $this->Net_IMAPProtocol();
+ $ret = $this->connect( $host , $port );
+ }
+
+
+
+ /**
+ * Attempt to connect to the IMAP server located at $host $port
+ * @param string $host The IMAP server
+ * @param string $port The IMAP port
+ * @param bool $useTLS enable TLS support
+ *
+ * It is only useful in a very few circunstances
+ * because the contructor already makes this job
+ * @return true on success or PEAR_Error
+ *
+ * @access public
+ * @since 1.0
+ */
+ function connect($host, $port)
+ {
+ $ret = $this->cmdConnect($host, $port, $useTLS = true);
+ if($ret === true ){
+ // Determine server capabilities
+ $res = $this->cmdCapability();
+
+ // check if we can enable TLS via STARTTLS (requires PHP 5 >= 5.1.0RC1 for stream_socket_enable_crypto)
+ if ($this->hasCapability('STARTTLS') === true && $useTLS === true && function_exists('stream_socket_enable_crypto') === true) {
+ if (PEAR::isError($res = $this->cmdStartTLS())) {
+ return $res;
+ }
+ }
+ return $ret;
+ }
+ if(empty($ret)){
+ return new PEAR_Error("Unexpected response on connection");
+ }
+ if(PEAR::isError($ret) ){
+ return $ret;
+ }
+ if(isset( $ret["RESPONSE"]["CODE"] ) ){
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ }
+
+ return $ret;
+ }
+
+
+
+ /**
+ * Attempt to authenticate to the IMAP server.
+ * @param string $user The userid to authenticate as.
+ * @param string $pass The password to authenticate with.
+ * @param string $useauthenticate true: authenticate using
+ * the IMAP AUTHENTICATE command. false: authenticate using
+ * the IMAP AUTHENTICATE command. 'string': authenticate using
+ * the IMAP AUTHENTICATE command but using the authMethod in 'string'
+ * @param boolean $selectMailbox automaticaly select inbox on login (false does not)
+ *
+ * @return true on success or PEAR_Error
+ *
+ * @access public
+ * @since 1.0
+ */
+ function login($user, $pass, $useauthenticate = true, $selectMailbox=true)
+ {
+ if ( $useauthenticate ){
+ //$useauthenticate is a string if the user hardcodes an AUTHMethod
+ // (the user calls $imap->login("user","password","CRAM-MD5"); for example!
+
+ $method = is_string( $useauthenticate ) ? $useauthenticate : null;
+
+ //Try the selected Auth method
+ if ( PEAR::isError( $ret = $this->cmdAuthenticate( $user , $pass , $method ) ) ) {
+ // Verify the methods that we have in common with the server
+ if(is_array($this->_serverAuthMethods)){
+ $commonMethods=array_intersect ($this->supportedAuthMethods, $this->_serverAuthMethods );
+ }else{
+ $this->_serverAuthMethods=null;
+ }
+ if($this->_serverAuthMethods == null || count($commonMethods) == 0 || $this->supportedAuthMethods == null ){
+ // The server does not have any auth method, so I try LOGIN
+ if ( PEAR::isError( $ret = $this->cmdLogin( $user, $pass ) ) ) {
+ return $ret;
+ }
+ }else{
+ return $ret;
+ }
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ }else{
+ //The user request "PLAIN" auth, we use the login command
+ if ( PEAR::isError( $ret = $this->cmdLogin( $user, $pass ) ) ) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ }
+
+ if($selectMailbox){
+ //Select INBOX
+ if ( PEAR::isError( $ret=$this->cmdSelect( $this->getCurrentMailbox() ) ) ) {
+ return $ret;
+ }
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Disconnect function. Sends the QUIT command
+ * and closes the socket.
+ *
+ * @param boolean $expungeOnExit (default = false)
+ *
+ * @return mixed true on success / Pear_Error on failure
+ *
+ * @access public
+ */
+ function disconnect($expungeOnExit = false)
+ {
+ if($expungeOnExit){
+ if (PEAR::isError($ret=$this->cmdExpunge())) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ $ret=$this->cmdLogout();
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ }
+
+ if (PEAR::isError($ret=$this->cmdLogout())) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ return true;
+ }
+
+
+
+ /**
+ * Changes the default/current mailbox to $mailbox
+ *
+ * @param string $mailbox Mailbox to select
+ *
+ * @return mixed true on success / Pear_Error on failure
+ *
+ * @access public
+ */
+ function selectMailbox($mailbox)
+ {
+ if (PEAR::isError($ret=$this->cmdSelect($mailbox))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Checks the mailbox $mailbox
+ *
+ * @param string $mailbox Mailbox to examine
+ *
+ * @return mixed true on success / Pear_Error on failure
+ *
+ * @access public
+ */
+ function examineMailbox($mailbox)
+ {
+ if (PEAR::isError($ret=$this->cmdExamine($mailbox))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ //$ret_aux["EXISTS"]=$ret["PARSED"]["EXISTS"];
+ //$ret_aux["RECENT"]=$ret["PARSED"]["RECENT"];
+ $ret = $ret["PARSED"];
+ return $ret;
+ }
+
+
+
+ /**
+ * Returns the raw headers of the specified message.
+ *
+ * @param int $msg_id Message number
+ * @param $part_id Part ID
+ * @param boolean $uidFetch msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed Either raw headers or false on error
+ *
+ * @access public
+ */
+ function getRawHeaders($msg_id, $part_id = '', $uidFetch = false)
+ {
+ if($part_id != '') {
+ $command = "BODY[$part_id.HEADER]";
+ } else {
+ $command = "BODY[HEADER]";
+ }
+ if($uidFetch == true) {
+ $ret=$this->cmdUidFetch($msg_id, $command);
+ } else {
+ $ret=$this->cmdFetch($msg_id, $command);
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ $ret=$ret["PARSED"][0]["EXT"][$command]["CONTENT"];
+ return $ret;
+ }
+
+
+
+ /**
+ * Returns the headers of the specified message in an
+ * associative array. Array keys are the header names, array
+ * values are the header values. In the case of multiple headers
+ * having the same names, eg Received:, the array value will be
+ * an indexed array of all the header values.
+ *
+ * @param int $msg_id Message number
+ * @param boolean $keysToUpper false (default) original header names
+ * true change keys (header names) toupper
+ * @param $part_id Part ID
+ * @param boolean $uidFetch msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed Either array of headers or false on error
+ *
+ * @access public
+ */
+ function getParsedHeaders($msg_id, $keysToUpper = false, $part_id = '', $uidFetch = false)
+ {
+ if (PEAR::isError($ret=$this->getRawHeaders($msg_id, $part_id, $uidFetch))) {
+ return $ret;
+ }
+
+ $raw_headers = rtrim($ret);
+ $raw_headers = preg_replace("/\r\n[ \t]+/", ' ', $raw_headers); // Unfold headers
+ $raw_headers = explode("\r\n", $raw_headers);
+ foreach ($raw_headers as $value) {
+ $name = substr($value, 0, $pos = strpos($value, ':'));
+ if ($keysToUpper) {
+ $name = strtoupper($name);
+ }
+ $value = ltrim(substr($value, $pos + 1));
+ if (isset($headers[$name]) && is_array($headers[$name])) {
+ $headers[$name][] = $value;
+ } elseif (isset($headers[$name])) {
+ $headers[$name] = array($headers[$name], $value);
+ } else {
+ $headers[$name] = $value;
+ }
+ }
+ return $headers;
+ }
+
+
+
+ /**
+ * Returns an array containing the message ID, the size and the UID
+ * of each message selected.
+ * message selection can be a valid IMAP command, a number or an array of
+ * messages
+ *
+ * @param $msg_id Message number
+ *
+ * @return mixed Either array of message data or PearError on error
+ *
+ * @access public
+ */
+ function getMessagesList($msg_id = null)
+ {
+ if( $msg_id != null){
+ if(is_array($msg_id)){
+ $message_set=$this->_getSearchListFromArray($msg_id);
+ }else{
+ $message_set=$msg_id;
+ }
+ }else{
+ $message_set="1:*";
+ }
+ if (PEAR::isError($ret=$this->cmdFetch($message_set,"(RFC822.SIZE UID)"))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ foreach($ret["PARSED"] as $msg){
+ $ret_aux[]=array("msg_id"=>$msg["NRO"],"size" => $msg["EXT"]["RFC822.SIZE"],"uidl"=> $msg["EXT"]["UID"]);
+ }
+ return $ret_aux;
+ }
+
+
+
+ /**
+ * Message summary
+ *
+ * @param mixed $msg_id Message number
+ * @param boolean $uidFetch msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed Either array of headers or PEAR::Error on error
+ *
+ * @access public
+ */
+ function getSummary($msg_id = null, $uidFetch = false)
+ {
+ if( $msg_id != null){
+ if(is_array($msg_id)){
+ $message_set=$this->_getSearchListFromArray($msg_id);
+ }else{
+ $message_set=$msg_id;
+ }
+ }else{
+ $message_set="1:*";
+ }
+ if($uidFetch) {
+ $ret=$this->cmdUidFetch($message_set,"(RFC822.SIZE UID FLAGS ENVELOPE INTERNALDATE BODY.PEEK[HEADER.FIELDS (CONTENT-TYPE)])");
+ } else {
+ $ret=$this->cmdFetch($message_set,"(RFC822.SIZE UID FLAGS ENVELOPE INTERNALDATE BODY.PEEK[HEADER.FIELDS (CONTENT-TYPE)])");
+ }
+ #$ret=$this->cmdFetch($message_set,"(RFC822.SIZE UID FLAGS ENVELOPE INTERNALDATE BODY[1.MIME])");
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ #print "<hr>"; var_dump($ret["PARSED"]); print "<hr>";
+
+ if(isset( $ret["PARSED"] ) ){
+ for($i=0; $i<count($ret["PARSED"]) ; $i++){
+ $a=$ret["PARSED"][$i]['EXT']['ENVELOPE'];
+ $a['MSG_NUM']=$ret["PARSED"][$i]['NRO'];
+ $a['UID']=$ret["PARSED"][$i]['EXT']['UID'];
+ $a['FLAGS']=$ret["PARSED"][$i]['EXT']['FLAGS'];
+ $a['INTERNALDATE']=$ret["PARSED"][$i]['EXT']['INTERNALDATE'];
+ $a['SIZE']=$ret["PARSED"][$i]['EXT']['RFC822.SIZE'];
+ if(isset($ret["PARSED"][$i]['EXT']['BODY[HEADER.FIELDS (CONTENT-TYPE)]']['CONTENT'])) {
+ if(preg_match('/^content-type: (.*);/iU', $ret["PARSED"][$i]['EXT']['BODY[HEADER.FIELDS (CONTENT-TYPE)]']['CONTENT'], $matches)) {
+ $a['MIMETYPE']=strtolower($matches[1]);
+ }
+ } elseif (isset($ret["PARSED"][$i]['EXT']['BODY[HEADER.FIELDS ("CONTENT-TYPE")]']['CONTENT'])) {
+ // some versions of cyrus send "CONTENT-TYPE" and CONTENT-TYPE only
+ if (preg_match('/^content-type: (.*);/iU', $ret["PARSED"][$i]['EXT']['BODY[HEADER.FIELDS ("CONTENT-TYPE")]']['CONTENT'], $matches)) {
+ $a['MIMETYPE']=strtolower($matches[1]);
+ }
+ }
+ $env[]=$a;
+ $a=null;
+ }
+ return $env;
+ }
+
+ //return $ret;
+ }
+
+
+
+ /**
+ * Returns the body of the message with given message number.
+ *
+ * @param $msg_id Message number
+ * @param boolean $uidFetch msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed Either message body or false on error
+ *
+ * @access public
+ */
+ function getBody($msg_id, $uidFetch = false)
+ {
+ if($uidFetch) {
+ $ret=$this->cmdUidFetch($msg_id,"BODY[TEXT]");
+ } else {
+ $ret=$this->cmdFetch($msg_id,"BODY[TEXT]");
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ $ret=$ret["PARSED"][0]["EXT"]["BODY[TEXT]"]["CONTENT"];
+ //$ret=$resp["PARSED"][0]["EXT"]["RFC822"]["CONTENT"];
+ return $ret;
+ }
+
+
+ /**
+ * Returns the body of the message with given message number.
+ *
+ * @param $msg_id Message number
+ * @param string $partId Message number
+ * @param boolean $uidFetch msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed Either message body or false on error
+ *
+ * @access public
+ */
+ function getBodyPart($msg_id, $partId, $uidFetch = false)
+ {
+ if($uidFetch) {
+ $ret=$this->cmdUidFetch($msg_id,"BODY[$partId]");
+ } else {
+ $ret=$this->cmdFetch($msg_id,"BODY[$partId]");
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ $ret=$ret["PARSED"][0]["EXT"]["BODY[$partId]"]["CONTENT"];
+ //$ret=$resp["PARSED"][0]["EXT"]["RFC822"]["CONTENT"];
+ return $ret;
+ }
+
+
+
+ /**
+ * Returns the body of the message with given message number.
+ *
+ * @param $msg_id Message number
+ * @param boolean $uidFetch msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed Either message body or false on error
+ *
+ * @access public
+ */
+ function getStructure($msg_id, $uidFetch = false)
+ {
+ #print "IMAP.php::getStructure<pre>";
+ #$this->setDebug(true);
+ #print "<pre>";
+ if($uidFetch) {
+ $ret=$this->cmdUidFetch($msg_id,"BODYSTRUCTURE");
+ } else {
+ $ret=$this->cmdFetch($msg_id,"BODYSTRUCTURE");
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ $ret=$ret["PARSED"][0]["EXT"]["BODYSTRUCTURE"][0];
+ $structure = array();
+
+ $mimeParts = array();
+ $this->_parseStructureArray($ret, $mimeParts);
+
+ return array_shift($mimeParts);
+ }
+
+
+ /**
+ * Parse structure array
+ *
+ * @param $_structure
+ * @param &$_mimeParts
+ * @param $_partID
+ *
+ * @return nothing
+ *
+ * @access private
+ */
+ function _parseStructureArray($_structure, &$_mimeParts, $_partID = '')
+ {
+ // something went wrong
+ if(!is_array($_structure)) {
+ return false;
+ }
+
+ #print "<hr>Net_IMAP::_parseStructureArray _partID: $_partID<br>";
+ $mimeParts = array();
+ $subPartID = 1;
+ $partID = ($_partID == '') ? '' : $_partID.'.';
+ if(is_array($_structure[0])) {
+ $this->_parseStructureMultipartArray($_structure, $_mimeParts, $_partID);
+ } else {
+ switch(strtoupper($_structure[0])) {
+ case 'TEXT':
+ $this->_parseStructureTextArray($_structure, $_mimeParts, $partID.$subPartID);
+ break;
+
+ case 'MESSAGE':
+ $this->_parseStructureMessageArray($_structure, $_mimeParts, $partID.$subPartID);
+ break;
+ }
+ }
+
+ }
+
+
+
+ /**
+ * Parse multibpart structure array
+ *
+ * @param $_structure
+ * @param &$_mimeParts
+ * @param $_partID
+ * @param boolean $_parentIsMessage
+ *
+ * @return noting
+ *
+ * @access private
+ */
+ function _parseStructureMultipartArray($_structure, &$_mimeParts, $_partID, $_parentIsMessage = false)
+ {
+ // a multipart/mixed, multipart/report or multipart/alternative get's no own partid, if the parent is message/rfc822
+ if ($_parentIsMessage == true && is_array($_structure[0])) {
+ foreach ($_structure as $structurePart) {
+ if (!is_array($structurePart)) {
+ $subType = strtolower($structurePart);
+ break;
+ }
+ }
+ if ($subType == 'mixed' || $subType == 'report' || $subType == 'alternative') {
+ $_partID = substr($_partID, 0, strrpos($_partID, '.'));
+ }
+ }
+
+ $subPartID = 1;
+ $partID = ($_partID == '') ? '' : $_partID.'.';
+ $subMimeParts = array();
+ foreach ($_structure as $structurePart) {
+ if (is_array($structurePart)) {
+ if (is_array($structurePart[0])) {
+ // another multipart inside the multipart
+ $this->_parseStructureMultipartArray($structurePart, $subMimeParts, $partID.$subPartID);
+ } else {
+ switch(strtoupper($structurePart[0])) {
+ case 'IMAGE':
+ $this->_parseStructureImageArray($structurePart, $subMimeParts, $partID.$subPartID);
+ break;
+ case 'MESSAGE':
+ $this->_parseStructureMessageArray($structurePart, $subMimeParts, $partID.$subPartID);
+ break;
+ case 'TEXT':
+ $this->_parseStructureTextArray($structurePart, $subMimeParts, $partID.$subPartID);
+ break;
+ default:
+ $this->_parseStructureApplicationArray($structurePart, $subMimeParts, $partID.$subPartID);
+ break;
+ }
+ }
+ $subPartID++;
+ } else {
+ $part = new stdClass;
+ $part->type = 'MULTIPART';
+ $part->subType = strtoupper($structurePart);
+
+ $part->subParts = $subMimeParts;
+
+ if ($_partID == '') {
+ $part->partID = 0;
+ $_mimeParts = array(0 => $part);
+ } else {
+ $part->partID = $_partID;
+ $_mimeParts = array($_partID => $part);
+ }
+ return;
+ }
+ }
+ }
+
+ /**
+ * Parse structure image array
+ *
+ * @param $_structure
+ * @param &$_mimeParts
+ * @param $_partID
+ *
+ * @return noting
+ *
+ * @access private
+ */
+ function _parseStructureImageArray($_structure, &$_mimeParts, $_partID)
+ {
+ #print "Net_IMAP::_parseStructureImageArray _partID: $_partID<br>";
+ $part = $this->_parseStructureCommonFields($_structure);
+ $part->cid = $_structure[3];
+ $part->partID = $_partID;
+
+ $_mimeParts[$_partID] = $part;
+ }
+
+
+
+ /**
+ * Parse structure application array
+ *
+ * @params $_structure
+ * @params &$_mimeParts
+ * @params $_partID
+ *
+ * @return noting
+ *
+ * @access private
+ */
+ function _parseStructureApplicationArray($_structure, &$_mimeParts, $_partID)
+ {
+ #print "Net_IMAP::_parseStructureApplicationArray _partID: $_partID<br>";
+ $part = $this->_parseStructureCommonFields($_structure);
+ if(is_array($_structure[8])) {
+ if(isset($_structure[8][0]) && $_structure[8][0] != 'NIL') {
+ $part->disposition = strtoupper($_structure[8][0]);
+ }
+ if(is_array($_structure[8][1])) {
+ foreach($_structure[8][1] as $key => $value) {
+ if($key%2 == 0) {
+ $part->dparameters[strtoupper($_structure[8][1][$key])] = $_structure[8][1][$key+1];
+ }
+ }
+ }
+ }
+ $part->partID = $_partID;
+
+ $_mimeParts[$_partID] = $part;
+ }
+
+
+
+ /**
+ * Parse structure message array
+ *
+ * @params $_structure
+ * @params &$_mimeParts
+ * @params $_partID
+ *
+ * @return nothing
+ *
+ * @access private
+ */
+ function _parseStructureMessageArray($_structure, &$_mimeParts, $_partID)
+ {
+ #print "Net_IMAP::_parseStructureMessageArray _partID: $_partID<br>";
+ $part = $this->_parseStructureCommonFields($_structure);
+
+ if(is_array($_structure[8][0])) {
+ $this->_parseStructureMultipartArray($_structure[8], $subMimeParts, $_partID.'.1', true);
+ } else {
+ $this->_parseStructureArray($_structure[8], $subMimeParts, $_partID);
+ }
+
+ if(is_array($subMimeParts)) {
+ $part->subParts = $subMimeParts;
+ }
+ $part->partID = $_partID;
+
+ $_mimeParts[$_partID] = $part;
+ }
+
+
+
+ /**
+ * Parse structure text array
+ *
+ * @params $_structure
+ * @params &$_mimeParts
+ * @params $_partID
+ *
+ * @return nothing
+ *
+ * @access private
+ */
+ function _parseStructureTextArray($_structure, &$_mimeParts, $_partID)
+ {
+ #print "Net_IMAP::_parseStructureTextArray _partID: $_partID<br>";
+ $part = $this->_parseStructureCommonFields($_structure);
+ $part->lines = $_structure[7];
+ if(is_array($_structure[8])) {
+ if(isset($_structure[8][0]) && $_structure[8][0] != 'NIL') {
+ $part->disposition = strtoupper($_structure[8][0]);
+ }
+ if(is_array($_structure[8][1])) {
+ foreach($_structure[8][1] as $key => $value) {
+ if($key%2 == 0) {
+ $part->dparameters[strtoupper($_structure[8][1][$key])] = $_structure[8][1][$key+1];
+ }
+ }
+ }
+ }
+ $part->partID = $_partID;
+
+ $_mimeParts[$_partID] = $part;
+ }
+
+
+
+ /**
+ * Parse structure common fields
+ *
+ * @param &$_structure
+ *
+ * @return object part object (stdClass)
+ *
+ * @access private
+ */
+ function _parseStructureCommonFields(&$_structure)
+ {
+ #print "Net_IMAP::_parseStructureTextArray _partID: $_partID<br>";
+ $part = new stdClass;
+ $part->type = strtoupper($_structure[0]);
+ $part->subType = strtoupper($_structure[1]);
+ if(is_array($_structure[2])) {
+ foreach($_structure[2] as $key => $value) {
+ if($key%2 == 0) {
+ $part->parameters[strtoupper($_structure[2][$key])] = $_structure[2][$key+1];
+ }
+ }
+ }
+ $part->encoding = strtoupper($_structure[5]);
+ $part->bytes = $_structure[6];
+
+ return $part;
+ }
+
+
+
+ /**
+ * Returns the entire message with given message number.
+ *
+ * @param $msg_id Message number (default = null)
+ * @param boolean $indexIsMessageNumber (default = true)
+ *
+ * @return mixed Either entire message or false on error
+ *
+ * @access public
+ */
+ function getMessages($msg_id = null, $indexIsMessageNumber=true)
+ {
+ //$resp=$this->cmdFetch($msg_id,"(BODY[TEXT] BODY[HEADER])");
+ if( $msg_id != null){
+ if(is_array($msg_id)){
+ $message_set=$this->_getSearchListFromArray($msg_id);
+ }else{
+ $message_set=$msg_id;
+ }
+ }else{
+ $message_set="1:*";
+ }
+
+ $ret=$this->cmdFetch($message_set,"RFC822");
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ if(isset($ret["PARSED"])){
+ foreach($ret["PARSED"] as $msg){
+ if(isset($msg["EXT"]["RFC822"]["CONTENT"])){
+ if($indexIsMessageNumber){
+ $ret_aux[$msg["NRO"]]=$msg["EXT"]["RFC822"]["CONTENT"];
+ }else{
+ $ret_aux[]=$msg["EXT"]["RFC822"]["CONTENT"];
+ }
+ }
+ }
+ return $ret_aux;
+ }
+ return array();
+ }
+
+
+
+ /**
+ * Returns number of messages in this mailbox
+ *
+ * @param string $mailbox the mailbox (default is current mailbox)
+ *
+ * @return mixed Either number of messages or Pear_Error on failure
+ *
+ * @access public
+ */
+ function getNumberOfMessages($mailbox = '')
+ {
+ if ( $mailbox == '' || $mailbox == null ){
+ $mailbox=$this->getCurrentMailbox();
+ }
+ if (PEAR::isError($ret = $this->cmdStatus($mailbox, 'MESSAGES'))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ if( isset($ret["PARSED"]["STATUS"]["ATTRIBUTES"]["MESSAGES"] ) ){
+ if( !is_numeric( $ret["PARSED"]["STATUS"]["ATTRIBUTES"]["MESSAGES"] ) ){
+ // if this array does not exists means that there is no messages in the mailbox
+ return 0;
+ }else{
+ return $ret["PARSED"]["STATUS"]["ATTRIBUTES"]["MESSAGES"];
+ }
+
+ }
+ return 0;
+ }
+
+
+
+ /**
+ * Returns number of UnSeen messages in this mailbox
+ *
+ * @param string $mailbox the mailbox (default is current mailbox)
+ *
+ * @return mixed Either number of messages or Pear_Error on failure
+ *
+ * @access public
+ */
+ function getNumberOfUnSeenMessages($mailbox = '')
+ {
+ if ( $mailbox == '' ){
+ $mailbox = $this->getCurrentMailbox();
+ }
+ if (PEAR::isError($ret = $this->cmdStatus($mailbox, 'UNSEEN'))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ if( isset($ret["PARSED"]["STATUS"]["ATTRIBUTES"]["UNSEEN"] ) ){
+ if( !is_numeric( $ret["PARSED"]["STATUS"]["ATTRIBUTES"]["UNSEEN"] ) ){
+ // if this array does not exists means that there is no messages in the mailbox
+ return 0;
+ }else{
+ return $ret["PARSED"]["STATUS"]["ATTRIBUTES"]["UNSEEN"];
+ }
+
+ }
+ return 0;
+ }
+
+
+
+ /**
+ * Returns number of UnSeen messages in this mailbox
+ *
+ * @param string $mailbox the mailbox (default is current mailbox)
+ *
+ * @return mixed Either number of messages or Pear_Error on failure
+ *
+ * @access public
+ */
+ function getNumberOfRecentMessages($mailbox = '')
+ {
+ if ( $mailbox == '' ){
+ $mailbox = $this->getCurrentMailbox();
+ }
+ if (PEAR::isError($ret = $this->cmdStatus($mailbox, 'RECENT'))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ if( isset($ret["PARSED"]["STATUS"]["ATTRIBUTES"]["RECENT"] ) ){
+ if( !is_numeric( $ret["PARSED"]["STATUS"]["ATTRIBUTES"]["RECENT"] ) ){
+ // if this array does not exists means that there is no messages in the mailbox
+ return 0;
+ }else{
+ return $ret["PARSED"]["STATUS"]["ATTRIBUTES"]["RECENT"];
+ }
+
+ }
+ return 0;
+ }
+
+
+
+ /**
+ * Returns number of UnSeen messages in this mailbox
+ *
+ * @param string $mailbox the mailbox (default is current mailbox)
+ *
+ * @return mixed Either number of messages or Pear_Error on error
+ *
+ * @access public
+ */
+ function getStatus($mailbox = '')
+ {
+ if ( $mailbox == '' ){
+ $mailbox = $this->getCurrentMailbox();
+ }
+ if (PEAR::isError($ret = $this->cmdStatus($mailbox, array('MESSAGES', 'RECENT', 'UIDNEXT', 'UIDVALIDITY', 'UNSEEN')))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ if( isset($ret["PARSED"]["STATUS"]["ATTRIBUTES"]["RECENT"] ) ){
+ return $ret["PARSED"]["STATUS"]["ATTRIBUTES"];
+ }
+ return 0;
+ }
+
+
+
+ /**
+ * Returns an array containing the message envelope
+ *
+ * @param $mailbox get's not used anywhere (will be removed with next major release)
+ * @param mixed $msg_id Message number (default = null)
+ * @param boolean $uidFetch msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed Either the envelopes or Pear_Error on error
+ *
+ * @access public
+ */
+ function getEnvelope($mailbox = '', $msg_id = null, $uidFetch = false)
+ {
+ if ( $mailbox == '' ){
+ $mailbox = $this->getCurrentMailbox();
+ }
+
+ if( $msg_id != null){
+ if(is_array($msg_id)){
+ $message_set=$this->_getSearchListFromArray($msg_id);
+ }else{
+ $message_set=$msg_id;
+ }
+ }else{
+ $message_set="1:*";
+ }
+
+
+ if($uidFetch) {
+ $ret=$this->cmdUidFetch($message_set,"ENVELOPE");
+ } else {
+ $ret=$this->cmdFetch($message_set,"ENVELOPE");
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ if(isset( $ret["PARSED"] ) ){
+ for($i=0; $i<count($ret["PARSED"]) ; $i++){
+ $a=$ret["PARSED"][$i]['EXT']['ENVELOPE'];
+ $a['MSG_NUM']=$ret["PARSED"][$i]['NRO'];
+ $env[]=$a;
+ }
+ return $env;
+ }
+ return new PEAR_Error('Error, undefined number of messages');
+
+
+ }
+
+
+
+ /**
+ * Returns the sum of all the sizes of messages in $mailbox
+ * WARNING!!! The method's performance is not good
+ * if you have a lot of messages in the mailbox
+ * Use with care!
+ *
+ * @params string $mailbox the mailbox (default is current mailbox)
+ *
+ * @return mixed Either size of maildrop or false on error
+ *
+ * @access public
+ */
+ function getMailboxSize($mailbox = '')
+ {
+
+ if ( $mailbox != '' && $mailbox != $this->getCurrentMailbox() ){
+ // store the actual selected mailbox name
+ $mailbox_aux = $this->getCurrentMailbox();
+ if ( PEAR::isError( $ret = $this->selectMailbox( $mailbox ) ) ) {
+ return $ret;
+ }
+ }
+
+ $ret=$this->cmdFetch("1:*","RFC822.SIZE");
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ // Restore the default mailbox if it was changed
+ if ( $mailbox != '' && $mailbox != $this->getCurrentMailbox() ){
+ if ( PEAR::isError( $ret = $this->selectMailbox( $mailbox_aux ) ) ) {
+ return $ret;
+ }
+ }
+ // return 0 because the server says that there is no message in the mailbox
+ return 0;
+ }
+
+ $sum=0;
+
+ if(!isset($ret["PARSED"]) ){
+ // if the server does not return a "PARSED" part
+ // we think that it does not suppoprt select or has no messages in it.
+ return 0;
+ }
+ foreach($ret["PARSED"] as $msgSize){
+ if( isset($msgSize["EXT"]["RFC822.SIZE"]) ){
+ $sum+= $msgSize["EXT"]["RFC822.SIZE"];
+ }
+ }
+
+ if ( $mailbox != '' && $mailbox != $this->getCurrentMailbox() ){
+ // re-select the mailbox
+ if ( PEAR::isError( $ret = $this->selectMailbox( $mailbox_aux ) ) ) {
+ return $ret;
+ }
+ }
+
+ return $sum;
+ }
+
+
+
+ /**
+ * Marks a message for deletion. Only will be deleted if the
+ * disconnect() method is called with auto-expunge on true or expunge()
+ * method is called.
+ *
+ * @param $msg_id Message to delete (default = null)
+ * @param boolean $uidStore msg_id contains UID's instead of Message Sequence Number if set to true (default = false)
+ *
+ * @return mixed true on success / Pear_Error on failure
+ *
+ * @access public
+ */
+ function deleteMessages($msg_id = null, $uidStore = false)
+ {
+ /* As said in RFC2060...
+ C: A003 STORE 2:4 +FLAGS (\Deleted)
+ S: * 2 FETCH FLAGS (\Deleted \Seen)
+ S: * 3 FETCH FLAGS (\Deleted)
+ S: * 4 FETCH FLAGS (\Deleted \Flagged \Seen)
+ S: A003 OK STORE completed
+ */
+ //Called without parammeters deletes all the messages in the mailbox
+ // You can also provide an array of numbers to delete those emails
+ if( $msg_id != null){
+ if(is_array($msg_id)){
+ $message_set=$this->_getSearchListFromArray($msg_id);
+ }else{
+ $message_set=$msg_id;
+ }
+ }else{
+ $message_set="1:*";
+ }
+
+
+ $dataitem="+FLAGS.SILENT";
+ $value="\Deleted";
+ if($uidStore == true) {
+ $ret=$this->cmdUidStore($message_set,$dataitem,$value);
+ } else {
+ $ret=$this->cmdStore($message_set,$dataitem,$value);
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Copies mail from one folder to another
+ *
+ * @param string $dest_mailbox mailbox name to copy sessages to
+ * @param mixed $msg_id the messages that I want to copy (all by default) it also
+ * can be an array
+ * @param string $source_mailbox mailbox name from where the messages are copied (default is current mailbox)
+ * @param bool $uidCopy msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed true on Success/PearError on Failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function copyMessages($dest_mailbox, $msg_id = null , $source_mailbox = null, $uidCopy = false )
+ {
+ if($source_mailbox == null){
+ $source_mailbox = $this->getCurrentMailbox();
+ }else{
+ if ( PEAR::isError( $ret = $this->selectMailbox( $source_mailbox ) ) ) {
+ return $ret;
+ }
+ }
+ //Called without parammeters copies all messages in the mailbox
+ // You can also provide an array of numbers to copy those emails
+ if( $msg_id != null){
+ if(is_array($msg_id)){
+ $message_set=$this->_getSearchListFromArray($msg_id);
+ }else{
+ $message_set=$msg_id;
+ }
+ }else{
+ $message_set="1:*";
+ }
+
+ if($uidCopy == true) {
+ $ret = $this->cmdUidCopy($message_set, $dest_mailbox );
+ } else {
+ $ret = $this->cmdCopy($message_set, $dest_mailbox );
+ }
+ if ( PEAR::isError( $ret ) ) {
+ return $ret;
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Appends a mail to a mailbox
+ *
+ * @param string $rfc_message the message to append in RFC822 format
+ * @param string $mailbox mailbox name to append to (default is current mailbox)
+ * @param string $flags_list set flags appended message
+ *
+ * @return mixed true on success / Pear_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function appendMessage($rfc_message, $mailbox = null , $flags_list = '')
+ {
+ if($mailbox == null){
+ $mailbox = $this->getCurrentMailbox();
+ }
+ $ret=$this->cmdAppend($mailbox,$rfc_message,$flags_list);
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Get the namespace
+ *
+ * @return mixed namespace or PearError on failure
+ *
+ * @access public
+ * @since 1.1
+ */
+ function getNamespace()
+ {
+ if (PEAR::isError($ret = $this->cmdNamespace())) {
+ return $ret;
+ }
+ if(strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ foreach($ret["PARSED"]["NAMESPACES"] as $type => $singleNameSpace) {
+ if(!is_array($singleNameSpace)) {
+ continue;
+ }
+
+ foreach ($singleNameSpace as $nameSpaceData) {
+ $nameSpaces[$type][] = array(
+ 'name' => $this->utf_7_decode($nameSpaceData[0]),
+ 'delimter' => $this->utf_7_decode($nameSpaceData[1])
+ );
+ }
+ }
+
+ return $nameSpaces;
+ }
+
+
+
+ /******************************************************************
+ ** **
+ ** MAILBOX RELATED METHODS **
+ ** **
+ ******************************************************************/
+
+ /**
+ * Gets the HierachyDelimiter character used to create subfolders cyrus users "."
+ * and wu-imapd uses "/"
+ *
+ * $param string the mailbox to get the hierarchy from
+ *
+ * @return string the hierarchy delimiter
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getHierarchyDelimiter( $mailbox = '' )
+ {
+
+ /* RFC2060 says: "the command LIST "" "" means get the hierachy delimiter:
+ An empty ("" string) mailbox name argument is a special request to
+ return the hierarchy delimiter and the root name of the name given
+ in the reference. The value returned as the root MAY be null if
+ the reference is non-rooted or is null. In all cases, the
+ hierarchy delimiter is returned. This permits a client to get the
+ hierarchy delimiter even when no mailboxes by that name currently
+ exist."
+ */
+ if( PEAR::isError( $ret = $this->cmdList( $mailbox , '' ) ) ){
+ return $ret;
+ }
+ if(isset($ret["PARSED"][0]["EXT"]["LIST"]["HIERACHY_DELIMITER"]) ){
+ return $ret["PARSED"][0]["EXT"]["LIST"]["HIERACHY_DELIMITER"];
+ }
+ return new PEAR_Error( 'the IMAP Server does not support HIERACHY_DELIMITER!' );
+ }
+
+
+
+ /**
+ * Returns an array containing the names of the selected mailboxes
+ *
+ * @param string $reference base mailbox to start the search (default is current mailbox)
+ * @param string $restriction_search false or 0 means return all mailboxes
+ * true or 1 return only the mailbox that contains that exact name
+ * 2 return all mailboxes in that hierarchy level
+ * @param string $returnAttributes true means return an assoc array containing mailbox names and mailbox attributes
+ * false - the default - means return an array of mailboxes
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getMailboxes($reference = '', $restriction_search = 0, $returnAttributes=false)
+ {
+
+ if ( is_bool($restriction_search) ){
+ $restriction_search = (int) $restriction_search;
+ }
+
+ if ( is_int( $restriction_search ) ){
+ switch ( $restriction_search ) {
+ case 0:
+ $mailbox = "*";
+ break;
+ case 1:
+ $mailbox = $reference;
+ $reference = '';
+ break;
+ case 2:
+ $mailbox = "%";
+ break;
+ }
+ }else{
+ if ( is_string( $restriction_search ) ){
+ $mailbox = $restriction_search;
+ }else {
+ return new PEAR_Error('Wrong data for 2nd parameter');
+ }
+ }
+
+ if( PEAR::isError( $ret = $this->cmdList($reference, $mailbox) ) ){
+ return $ret;
+ }
+
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ $ret_aux=array();
+ if( isset($ret["PARSED"]) ){
+ foreach( $ret["PARSED"] as $mbox ){
+
+ //If the folder has the \NoSelect atribute we don't put in the list
+ // it solves a bug in wu-imap that crash the IMAP server if we select that mailbox
+ if( isset($mbox["EXT"]["LIST"]["NAME_ATTRIBUTES"]) ){
+ if( !in_array('\NoSelect',$mbox["EXT"]["LIST"]["NAME_ATTRIBUTES"]) ){
+ if( $returnAttributes){
+ $ret_aux[]=array( 'MAILBOX' => $mbox["EXT"]["LIST"]["MAILBOX_NAME"],
+ 'ATTRIBUTES' => $mbox["EXT"]["LIST"]["NAME_ATTRIBUTES"] ,
+ 'HIERACHY_DELIMITER' => $mbox["EXT"]["LIST"]["HIERACHY_DELIMITER"] ) ;
+ }else{
+ $ret_aux[]=$mbox["EXT"]["LIST"]["MAILBOX_NAME"];
+ }
+ }
+ }
+ }
+ }
+ return $ret_aux;
+ }
+
+
+
+ /**
+ * check if the mailbox name exists
+ *
+ * @param string $mailbox mailbox name to check existance
+ *
+ * @return mixed boolean true/false or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function mailboxExist($mailbox)
+ {
+ // true means do an exact match
+ if( PEAR::isError( $ret = $this->getMailboxes( $mailbox , true ) ) ){
+ return $ret;
+ }
+ if( count( $ret ) > 0 ){
+ foreach ($ret as $mailbox_name) {
+ if ($mailbox_name == $mailbox) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+
+
+ /**
+ * Creates the mailbox $mailbox
+ *
+ * @param string $mailbox mailbox name to create
+ * @param array $options options to pass to create (default is no options)
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function createMailbox($mailbox, $options = null)
+ {
+ if (PEAR::isError($ret = $this->cmdCreate($mailbox, $options))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Deletes the mailbox $mailbox
+ *
+ * @param string $mailbox mailbox name to delete
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function deleteMailbox($mailbox)
+ {
+ // TODO verificar que el mailbox se encuentra vacio y, sino borrar los mensajes antes~!!!!!!
+ // ToDo find someone who can translate the above todo
+ if (PEAR::isError($ret = $this->cmdDelete($mailbox))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Renames the mailbox $mailbox
+ *
+ * @param string $oldmailbox mailbox name to rename
+ * @param string $newmailbox new name for the mailbox
+ * @param array $options options to pass to rename
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function renameMailbox($oldmailbox, $newmailbox, $options = null)
+ {
+ if (PEAR::isError($ret = $this->cmdRename($oldmailbox, $newmailbox, $options))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+
+ /******************************************************************
+ ** **
+ ** SUBSCRIPTION METHODS **
+ ** **
+ ******************************************************************/
+
+ /**
+ * Subscribes to the selected mailbox
+ *
+ * @param string $mailbox mailbox name to subscribe (default is current mailbox)
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function subscribeMailbox($mailbox = null )
+ {
+ if($mailbox == null){
+ $mailbox = $this->getCurrentMailbox();
+ }
+ if (PEAR::isError($ret = $this->cmdSubscribe($mailbox))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Removes the subscription to a mailbox
+ *
+ * @param string $mailbox mailbox name to unsubscribe (default is current mailbox)
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function unsubscribeMailbox($mailbox = null)
+ {
+ if($mailbox == null){
+ $mailbox = $this->getCurrentMailbox();
+ }
+ if (PEAR::isError($ret = $this->cmdUnsubscribe($mailbox))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * Lists the subscription to mailboxes
+ *
+ * @param string $mailbox_base mailbox name start the search (see to getMailboxes() )
+ * @param string $mailbox_name mailbox name filter the search (see to getMailboxes() )
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function listsubscribedMailboxes($reference = '' , $restriction_search = 0, $returnAttributes = false)
+ {
+ if ( is_bool($restriction_search) ){
+ $restriction_search = (int) $restriction_search;
+ }
+
+ if ( is_int( $restriction_search ) ){
+ switch ( $restriction_search ) {
+ case 0:
+ $mailbox = "*";
+ break;
+ case 1:
+ $mailbox = $reference;
+ $reference = '%';
+ break;
+ case 2:
+ $mailbox = "%";
+ break;
+ }
+ }else{
+ if ( is_string( $restriction_search ) ){
+ $mailbox = $restriction_search;
+ }else {
+ return new PEAR_Error("UPS... you ");
+ }
+ }
+
+ if( PEAR::isError( $ret=$this->cmdLsub($reference, $mailbox) ) ){
+ return $ret;
+ }
+ //$ret=$this->cmdLsub($mailbox_base, $mailbox_name);
+
+
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ $ret_aux=array();
+ if( isset($ret["PARSED"]) ){
+ foreach( $ret["PARSED"] as $mbox ){
+ if( isset($mbox["EXT"]["LSUB"]["MAILBOX_NAME"]) ){
+ if( $returnAttributes){
+ $ret_aux[]=array(
+ 'MAILBOX' => $mbox["EXT"]["LSUB"]["MAILBOX_NAME"],
+ 'ATTRIBUTES' => $mbox["EXT"]["LSUB"]["NAME_ATTRIBUTES"],
+ 'HIERACHY_DELIMITER' => $mbox["EXT"]["LSUB"]["HIERACHY_DELIMITER"]
+ ) ;
+ }else{
+ $ret_aux[]=$mbox["EXT"]["LSUB"]["MAILBOX_NAME"];
+
+ }
+ }
+ }
+ }
+ return $ret_aux;
+ }
+
+
+
+
+ /******************************************************************
+ ** **
+ ** FLAGS METHODS **
+ ** **
+ ******************************************************************/
+
+ /**
+ * Lists the flags of the selected messages
+ *
+ * @param mixed $msg_id the message list
+ *
+ * @return mixed array on success/PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getFlags( $msg_id = null )
+ {
+ // You can also provide an array of numbers to those emails
+ if( $msg_id != null){
+ if(is_array($msg_id)){
+ $message_set=$this->_getSearchListFromArray($msg_id);
+ }else{
+ $message_set=$msg_id;
+ }
+ }else{
+ $message_set="1:*";
+ }
+
+
+ if (PEAR::isError($ret = $this->cmdFetch($message_set, 'FLAGS'))) {
+ return $ret;
+ }
+ if(strtoupper($ret["RESPONSE"]["CODE"]) != "OK"){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ $flags=array();
+ if(isset($ret["PARSED"])){
+ foreach($ret["PARSED"] as $msg_flags){
+ if(isset($msg_flags["EXT"]["FLAGS"])){
+ $flags[]=$msg_flags["EXT"]["FLAGS"];
+ }
+ }
+ }
+ return $flags;
+ }
+
+
+
+ /**
+ * Sets the flags of the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ * @param mixed $flags flags to set (space separated String or array)
+ * @param string $mod "set" to set flags (default)
+ * "add" to add flags
+ * "remove" to remove flags
+ * @param boolean $uidStore msg_id contains UID's instead of Message Sequence Number if set to true
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function setFlags($msg_id, $flags, $mod = 'set', $uidStore = false)
+ {
+ // you can also provide an array of numbers to those emails
+ if ($msg_id == 'all') {
+ $message_set = '1:*';
+ } else {
+ if (is_array($msg_id)) {
+ $message_set = $this->_getSearchListFromArray($msg_id);
+ } else {
+ $message_set = $msg_id;
+ }
+ }
+
+ $flaglist = '';
+ if (is_array($flags)) {
+ $flaglist = implode(' ', $flags);
+ } else {
+ $flaglist = $flags;
+ }
+
+ switch ($mod) {
+ case 'set':
+ $dataitem = 'FLAGS';
+ break;
+ case 'add':
+ $dataitem = '+FLAGS';
+ break;
+ case 'remove':
+ $dataitem = '-FLAGS';
+ break;
+ default:
+ // Wrong Input
+ return new PEAR_Error('wrong input $mod');
+ break;
+ }
+
+ if($uidStore == true) {
+ $ret=$this->cmdUidStore($message_set, $dataitem, $flaglist);
+ } else {
+ $ret=$this->cmdStore($message_set, $dataitem, $flaglist);
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if (strtoupper($ret['RESPONSE']['CODE']) != 'OK') {
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ return true;
+ }
+
+
+
+ /**
+ * adds flags to the selected messages
+ *
+ * @param mixed $flags flags to set (space separated String or array)
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function addFlags($msg_id, $flags)
+ {
+ return $this->setFlags($msg_id, $flags, $mod = 'add');
+ }
+
+
+
+ /**
+ * adds the Seen flag (\Seen) to the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function addSeen($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Seen', $mod = 'add');
+ }
+
+
+
+ /**
+ * adds the Answered flag (\Answered) to the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function addAnswered($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Answered', $mod = 'add');
+ }
+
+
+
+ /**
+ * adds the Deleted flag (\Deleted) to the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function addDeleted($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Deleted', $mod = 'add');
+ }
+
+
+
+ /**
+ * adds the Flagged flag (\Flagged) to the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function addFlagged($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Flagged', $mod = 'add');
+ }
+
+
+
+ /**
+ * adds the Draft flag (\Draft) to the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function addDraft($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Draft', $mod = 'add');
+ }
+
+
+
+ /**
+ * remove flags from the selected messages
+ *
+ * @param mixed $flags flags to remove (space separated string or array)
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function removeFlags($msg_id, $flags)
+ {
+ return $this->setFlags($msg_id, $flags, $mod = 'remove');
+ }
+
+
+
+ /**
+ * remove the Seen flag (\Seen) from the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function removeSeen($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Seen', $mod = 'remove');
+ }
+
+
+
+ /**
+ * remove the Answered flag (\Answered) from the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function removeAnswered($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Answered', $mod = 'remove');
+ }
+
+
+
+ /**
+ * remove the Deleted flag (\Deleted) from the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function removeDeleted($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Deleted', $mod = 'remove');
+ }
+
+
+
+ /**
+ * remove the Flagged flag (\Flagged) from the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function removeFlagged($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Flagged', $mod = 'remove');
+ }
+
+
+
+ /**
+ * remove the Draft flag (\Draft) from the selected messages
+ *
+ * @param mixed $msg_id the message list or string "all" for all
+ *
+ * @return mixed true on success/PearError on failure
+ *
+ * @since 1.1
+ * @access public
+ */
+ function removeDraft($msg_id)
+ {
+ return $this->setFlags($msg_id, '\Draft', $mod = 'remove');
+ }
+
+
+
+ /**
+ * check the Seen flag
+ *
+ * @param mixed $message_nro the message to check
+ *
+ * @return mixed true or false if the flag is set PearError on Failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function isSeen($message_nro)
+ {
+ return $this->hasFlag( $message_nro, "\\Seen" );
+ }
+
+
+
+ /**
+ * check the Answered flag
+ *
+ * @param mixed $message_nro the message to check
+ *
+ * @return mixed true or false if the flag is set PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function isAnswered($message_nro)
+ {
+ return $this->hasFlag( $message_nro, "\\Answered" );
+ }
+
+
+
+ /**
+ * check the flagged flag
+ *
+ * @param mixed $message_nro the message to check
+ *
+ * @return mixed true or false if the flag is set PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function isFlagged($message_nro)
+ {
+ return $this->hasFlag( $message_nro, "\\Flagged" );
+ }
+
+
+
+ /**
+ * check the Draft flag
+ *
+ * @param mixed $message_nro the message to check
+ *
+ * @return mixed true or false if the flag is set PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function isDraft($message_nro)
+ {
+ return $this->hasFlag( $message_nro, "\\Draft" );
+ }
+
+
+
+ /**
+ * check the Deleted flag
+ *
+ * @param mixed $message_nro the message to check
+ *
+ * @return mixed true or false if the flag is set PearError on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function isDeleted($message_nro)
+ {
+ return $this->hasFlag( $message_nro, "\\Deleted" );
+ }
+
+
+
+ /**
+ * checks if a flag is set
+ *
+ * @param mixed $message_nro the message to check
+ * @param string $flag the flag that should be checked
+ *
+ * @return mixed true or false if the flag is set PearError on Failure
+ *
+ * @since 1.0
+ * @access public
+ */
+ function hasFlag($message_nro,$flag)
+ {
+ if ( PEAR::isError( $resp = $this->getFlags( $message_nro ) ) ) {
+ return $resp;
+ }
+ if(isset($resp[0]) ){
+ if( is_array( $resp[0] ) ){
+ if( in_array( $flag , $resp[0] ) )
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+
+
+ /******************************************************************
+ ** **
+ ** MISC METHODS **
+ ** **
+ ******************************************************************/
+
+
+ /**
+ * expunge function. Sends the EXPUNGE command
+ *
+ * @return mixed true on success / PEAR Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function expunge()
+ {
+ if (PEAR::isError($ret = $this->cmdExpunge())) {
+ return $ret;
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * search function. Sends the SEARCH command
+ *
+ * @param string $search_list search criterias
+ * @param boolean $uidSearch if set to true UID SEARCH is send instead of SEARCH
+ *
+ * @return mixed message array or PEAR Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function search($search_list, $uidSearch = false)
+ {
+ if($uidSearch){
+ $ret = $this->cmdUidSearch($search_list);
+ }else{
+ $ret = $this->cmdSearch($search_list);
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return $ret["PARSED"]["SEARCH"]["SEARCH_LIST"];
+ }
+
+
+
+ /**
+ * sort function. Sends the SORT command
+ *
+ * @param string $sort_list sort program
+ * @param string $charset charset specification (default = 'US-ASCII')
+ * @param string $search_list searching criteria
+ * @param boolean $uidSort if set to true UID SORT is send instead of SORT
+ *
+ * @return mixed message array or PEAR Error on failure
+ *
+ * @access public
+ * @since 1.1
+ */
+ function sort($sort_list, $charset='US-ASCII', $search_list = '', $uidSort = false)
+ {
+ $sort_command = sprintf("(%s) %s %s", $sort_list, strtoupper($charset), $search_list);
+
+ if ($uidSort) {
+ $ret = $this->cmdUidSort($sort_command);
+ } else {
+ $ret = $this->cmdSort($sort_command);
+ }
+ if (PEAR::isError($ret)) {
+ return $ret;
+ }
+ if (strtoupper($ret['RESPONSE']['CODE']) != 'OK') {
+ return new PEAR_Error($ret['RESPONSE']['CODE'] . ", " . $ret['RESPONSE']['STR_CODE']);
+ }
+ return $ret['PARSED']['SORT']['SORT_LIST'];
+ }
+
+
+
+
+ /******************************************************************
+ ** **
+ ** QUOTA METHODS **
+ ** **
+ ******************************************************************/
+
+
+ /**
+ * Returns STORAGE quota details
+ *
+ * @param string $mailbox_name Mailbox to get quota info. (default is current mailbox)
+ *
+ * @return assoc array contaning the quota info on success or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getStorageQuotaRoot($mailbox_name = null )
+ {
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+
+
+ if ( PEAR::isError( $ret = $this->cmdGetQuotaRoot($mailbox_name) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ // if the error is that the user does not have quota set return an array
+ // and not pear error
+ if( substr(strtoupper($ret["RESPONSE"]["STR_CODE"]),0,9) == "QUOTAROOT" ){
+ return array('USED'=>'NOT SET', 'QMAX'=>'NOT SET');
+ }
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ if( isset( $ret['PARSED']['EXT']['QUOTA']['STORAGE'] ) ){
+ return $ret['PARSED']['EXT']['QUOTA']['STORAGE'];
+ }
+ return array('USED'=>'NOT SET', 'QMAX'=>'NOT SET');
+ }
+
+
+
+ /**
+ * Returns STORAGE quota details
+ *
+ * @param string $mailbox_name Mailbox to get quota info. (default is current mailbox)
+ *
+ * @return assoc array contaning the quota info on success or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getStorageQuota($mailbox_name = null )
+ {
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+
+
+ if ( PEAR::isError( $ret = $this->cmdGetQuota($mailbox_name) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ // if the error is that the user does not have quota set return an array
+ // and not pear error
+ if( substr(strtoupper($ret["RESPONSE"]["STR_CODE"]),0,5) == "QUOTA" ){
+ return array('USED'=>'NOT SET', 'QMAX'=>'NOT SET');
+ }
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ if( isset( $ret['PARSED']['EXT']['QUOTA']['STORAGE'] ) ){
+ return $ret['PARSED']['EXT']['QUOTA']['STORAGE'];
+ }
+ return array('USED'=>'NOT SET', 'QMAX'=>'NOT SET');
+ }
+
+
+
+ /**
+ * Returns MESSAGES quota details
+ *
+ * @param string $mailbox_name Mailbox to get quota info. (default is current mailbox)
+ *
+ * @return assoc array contaning the quota info on success or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getMessagesQuota($mailbox_name = null )
+ {
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+
+ if ( PEAR::isError( $ret = $this->cmdGetQuota($mailbox_name) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ // if the error is that the user does not have quota set return an array
+ // and not pear error
+ if( substr(strtoupper($ret["RESPONSE"]["STR_CODE"]),0,5) == "QUOTA" ){
+ return array('USED'=>'NOT SET', 'QMAX'=>'NOT SET');
+ }
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ if( isset( $ret['PARSED']['EXT']['QUOTA']['MESSAGES'] ) ){
+ return $ret['PARSED']['EXT']['QUOTA']['MESSAGES'];
+ }
+ return array('USED'=>'NOT SET', 'QMAX'=>'NOT SET');
+ }
+
+
+
+ /**
+ * sets STORAGE quota
+ *
+ * @param string $mailbox_name Mailbox to set quota
+ * @param int $quota Quotasize
+ *
+ * @return true on success or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function setStorageQuota($mailbox_name, $quota)
+ {
+ if ( PEAR::isError( $ret = $this->cmdSetQuota($mailbox_name,$quota) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * sets MESSAGES quota
+ *
+ * @param string $mailbox_name Mailbox to set quota
+ * @param int $quota Quotasize
+ *
+ * @return true on success or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function setMessagesQuota($mailbox_name, $quota)
+ {
+ if ( PEAR::isError( $ret = $this->cmdSetQuota($mailbox_name,'',$quota) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+
+ /******************************************************************
+ ** **
+ ** ACL METHODS **
+ ** **
+ ******************************************************************/
+
+
+ /**
+ * get the Access Control List details
+ *
+ * @param string $mailbox_name Mailbox to get ACL info. (default is current mailbox)
+ *
+ * @return mixed string on success or false or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getACL($mailbox_name = null )
+ {
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+ if ( PEAR::isError( $ret = $this->cmdGetACL($mailbox_name) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ if( isset($ret['PARSED']['USERS']) ){
+ return $ret['PARSED']['USERS'];
+ }else{
+ return false;
+ }
+ }
+
+
+
+ /**
+ * Set ACL on a mailbox
+ *
+ * @param string $mailbox_name the mailbox
+ * @param string $user user to set the ACL
+ * @param string $acl ACL list
+ *
+ * @return mixed true on success or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function setACL($mailbox_name, $user, $acl)
+ {
+ if ( PEAR::isError( $ret = $this->cmdSetACL($mailbox_name, $user, $acl) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * deletes the ACL on a mailbox
+ *
+ * @param string $mailbox_name the mailbox
+ * @param string $user user to delete the ACL
+ *
+ * @return mixed true on success, or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function deleteACL($mailbox_name, $user)
+ {
+ if ( PEAR::isError( $ret = $this->cmdDeleteACL($mailbox_name, $user) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+ return true;
+ }
+
+
+
+ /**
+ * returns the rights that the user logged on has on the mailbox
+ * this method can be used by any user, not only the administrator
+ *
+ * @param string $mailbox_name the mailbox to query rights (default is current mailbox)
+ *
+ * @return mixed string containing the list of rights on success, or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getMyRights($mailbox_name = null)
+ {
+
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+
+
+ if ( PEAR::isError( $ret = $this->cmdMyRights($mailbox_name) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+ if(isset($ret['PARSED']['GRANTED'])){
+ return $ret['PARSED']['GRANTED'];
+ }
+
+ return new PEAR_Error('Bogus response from server!' );
+ }
+
+
+
+ /**
+ * returns an array containing the rights for given user on the mailbox
+ * this method can be used by any user, not only the administrator
+ *
+ * @param string $user the user to query rights
+ * @param string $mailbox_name the mailbox to query rights (default is current mailbox)
+ *
+ * @return mixed string containing the list of rights on success, or PEAR_Error on failure
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getACLRights($user,$mailbox_name = null)
+ {
+
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+
+
+ if ( PEAR::isError( $ret = $this->cmdListRights($mailbox_name, $user) ) ) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if( strtoupper( $ret["RESPONSE"]["CODE"]) != "OK" ){
+ return new PEAR_Error($ret["RESPONSE"]["CODE"] . ", " . $ret["RESPONSE"]["STR_CODE"]);
+ }
+
+
+ if(isset($ret['PARSED']['GRANTED'])){
+ return $ret['PARSED']['GRANTED'];
+ }
+
+ return new PEAR_Error('Bogus response from server!' );
+
+ }
+
+
+
+
+ /******************************************************************
+ ** **
+ ** ANNOTATEMORE METHODS **
+ ** **
+ ******************************************************************/
+
+
+ /**
+ * set annotation
+ *
+ * @param string $entry
+ * @param array $values
+ * @param string $mailbox_name (default is current mailbox)
+ *
+ * @return mixed true on success or PEAR Error on failure
+ *
+ * @access public
+ * @since 1.0.2
+ */
+ function setAnnotation($entry, $values, $mailbox_name = null )
+ {
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+
+ if (PEAR::isError($ret = $this->cmdSetAnnotation($mailbox_name, $entry, $values))) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if (strtoupper($ret['RESPONSE']['CODE']) != 'OK') {
+ return new PEAR_Error($ret['RESPONSE']['CODE'] . ', ' . $ret['RESPONSE']['STR_CODE']);
+ }
+ return true;
+ }
+
+
+ /**
+ * delete annotation
+ *
+ * @param string $entry
+ * @param array $values
+ * @param string $mailbox_name (default is current mailbox)
+ *
+ * @return mixed true on success or PEAR Error on failure
+ *
+ * @access public
+ * @since 1.0.2
+ */
+ function deleteAnnotation($entry, $values, $mailbox_name = null )
+ {
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+
+ if (PEAR::isError($ret = $this->cmdDeleteAnnotation($mailbox_name, $entry, $values))) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if (strtoupper($ret['RESPONSE']['CODE']) != 'OK') {
+ return new PEAR_Error($ret['RESPONSE']['CODE'] . ', ' . $ret['RESPONSE']['STR_CODE']);
+ }
+ return true;
+ }
+
+
+ /**
+ * get annotation
+ *
+ * @param string $entry
+ * @param array $values
+ * @param string $mailbox_name (default is current mailbox)
+ *
+ * @return mixed array containing annotations on success or PEAR Error on failure
+ *
+ * @access public
+ * @since 1.0.2
+ */
+ function getAnnotation($entries, $values, $mailbox_name = null)
+ {
+ if($mailbox_name == null){
+ $mailbox_name = $this->getCurrentMailbox();
+ }
+ if (!is_array($entries)) {
+ $entries = array($entries);
+ }
+ if (!is_array($values)) {
+ $values = array($values);
+ }
+
+ if (PEAR::isError($ret = $this->cmdGetAnnotation($mailbox_name, $entries, $values))) {
+ return new PEAR_Error($ret->getMessage());
+ }
+ if (strtoupper($ret['RESPONSE']['CODE']) != 'OK') {
+ return new PEAR_Error($ret['RESPONSE']['CODE'] . ', ' . $ret['RESPONSE']['STR_CODE']);
+ }
+ $ret_aux = array();
+ if (isset($ret['PARSED'])) {
+ foreach ($ret['PARSED'] as $mbox) {
+ $rawvalues = $mbox['EXT']['ATTRIBUTES'];
+ $values = array();
+ for ($i = 0; $i < count($rawvalues); $i += 2) {
+ $values[$rawvalues[$i]] = $rawvalues[$i + 1];
+ }
+ $mbox['EXT']['ATTRIBUTES'] = $values;
+ $ret_aux[] = $mbox['EXT'];
+ }
+ }
+ if (count($ret_aux) == 1 && $ret_aux[0]['MAILBOX'] == $mailbox_name) {
+ if (count($entries) == 1 && $ret_aux[0]['ENTRY'] == $entries[0]) {
+ if (count($ret_aux[0]['ATTRIBUTES']) == 1 && count($values) == 1) {
+ $attrs = array_keys($ret_aux[0]['ATTRIBUTES']);
+ $vals = array_keys($values);
+ if ($attrs[0] == $vals[0]) {
+ return $ret_aux[0]['ATTRIBUTES'][$attrs[0]];
+ }
+ }
+ }
+ }
+ return $ret_aux;
+ }
+
+
+
+ /**
+ * Transform an array to a list to be used in the cmdFetch method
+ *
+ * @param array $arr array to transform
+ *
+ * @return string transformed array
+ *
+ * @access private
+ */
+ function _getSearchListFromArray($arr){
+
+ $txt=implode(',' , $arr);
+ return $txt;
+ }
+
+
+
+
+ /*****************************************************
+ Net_POP3 Compatibility functions:
+
+ Warning!!!
+ Those functions could dissapear in the future
+
+ *********************************************************/
+
+
+ /**
+ * same as getMailboxSize()
+ * Net_POP3 Compatibility function
+ *
+ * @return same as getMailboxSize();
+ *
+ * @access public
+ */
+ function getSize(){
+ return $this->getMailboxSize();
+ }
+
+ /**
+ * same as getNumberOfMessages($mailbox)
+ * Net_POP3 Compatibility function
+ *
+ * @param string $mailbox Mailbox (default is current mailbox)
+ *
+ * @return same as getNumberOfMessages($mailbox)
+ *
+ * @access public
+ */
+ function numMsg($mailbox = null){
+ return $this->getNumberOfMessages($mailbox);
+ }
+
+
+ /**
+ * Returns the entire message with given message number.
+ * Net_POP3 Compatibility function
+ *
+ * @param $msg_id Message number
+ *
+ * @return mixed either entire message or PEAR Error on failure
+ *
+ * @access public
+ */
+ function getMsg($msg_id)
+ {
+ if (PEAR::isError($ret = $this->getMessages($msg_id, false))) {
+ return $ret;
+ }
+ // false means that getMessages() must not use the msg number as array key
+ if(isset($ret[0])){
+ return $ret[0];
+ }else{
+ return $ret;
+ }
+
+ }
+
+
+
+ /**
+ * same as getMessagesList($msg_id)
+ * Net_POP3 Compatibility function
+ *
+ * @param $msg_id Message number
+ *
+ * @return same as getMessagesList()
+ *
+ * @access public
+ */
+ function getListing($msg_id = null)
+ {
+ return $this->getMessagesList($msg_id);
+ }
+
+
+
+ /**
+ * same as deleteMessages($msg_id)
+ * Net_POP3 Compatibility function
+ *
+ * @param $msg_id Message number
+ *
+ * @return same as deleteMessages()
+ *
+ * @access public
+ */
+ function deleteMsg($msg_id){
+ return $this->deleteMessages($msg_id);
+ }
+
+
+}
+?>
diff --git a/dev-php/PEAR-Net_IMAP/files/IMAPProtocol.php b/dev-php/PEAR-Net_IMAP/files/IMAPProtocol.php
new file mode 100644
index 0000000..b9fc7b3
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/files/IMAPProtocol.php
@@ -0,0 +1,3323 @@
+<?php
+//
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2003 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 2.02 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/2_02.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Author: Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar> |
+// +----------------------------------------------------------------------+
+require_once 'Net/Socket.php';
+
+
+
+/**
+ * Provides an implementation of the IMAP protocol using PEAR's
+ * Net_Socket:: class.
+ *
+ * @package Net_IMAP/Protocol
+ * @author Damian Alejandro Fernandez Sosa <damlists@cnba.uba.ar>
+ */
+class Net_IMAPProtocol {
+
+
+ /**
+ * The auth methods this class support
+ * @var array
+ */
+ var $supportedAuthMethods=array('DIGEST-MD5', 'CRAM-MD5', 'LOGIN');
+
+
+ /**
+ * The auth methods this class support
+ * @var array
+ */
+ var $supportedSASLAuthMethods=array('DIGEST-MD5', 'CRAM-MD5');
+
+
+ /**
+ * _serverAuthMethods
+ * @var boolean
+ */
+ var $_serverAuthMethods = null;
+
+
+ /**
+ * The the current mailbox
+ * @var string
+ */
+ var $currentMailbox = "INBOX" ;
+
+
+ /**
+ * The socket resource being used to connect to the IMAP server.
+ * @var resource
+ */
+ var $_socket = null;
+
+
+ /**
+ * The timeout for the connection to the IMAP server.
+ * @var int
+ */
+ var $_timeout = null;
+
+
+ /**
+ * The options for SSL/TLS connection
+ * (see documentation for stream_context_create)
+ * @var array
+ */
+ var $_streamContextOptions = null;
+
+
+ /**
+ * To allow class debuging
+ * @var boolean
+ */
+ var $_debug = false;
+ var $dbgDialog = '';
+
+
+ /**
+ * Print error messages
+ * @var boolean
+ */
+ var $_printErrors = false;
+
+
+ /**
+ * Command Number
+ * @var int
+ */
+ var $_cmd_counter = 1;
+
+
+ /**
+ * Command Number for IMAP commands
+ * @var int
+ */
+ var $_lastCmdID = 1;
+
+
+ /**
+ * Command Number
+ * @var boolean
+ */
+ var $_unParsedReturn = false;
+
+
+ /**
+ * _connected: checks if there is a connection made to a imap server or not
+ * @var boolean
+ */
+ var $_connected = false;
+
+
+ /**
+ * Capabilities
+ * @var boolean
+ */
+ var $_serverSupportedCapabilities = null;
+
+
+ /**
+ * Use UTF-7 funcionallity
+ * @var boolean
+ */
+ var $_useUTF_7 = true;
+
+
+
+ /**
+ * Constructor
+ *
+ * Instantiates a new Net_IMAP object.
+ *
+ * @since 1.0
+ */
+ function Net_IMAPProtocol()
+ {
+ $this->_socket = new Net_Socket();
+
+ /*
+ * Include the Auth_SASL package. If the package is not available,
+ * we disable the authentication methods that depend upon it.
+ */
+
+
+ if ((@include_once 'Auth/SASL.php') == false) {
+ foreach($this->supportedSASLAuthMethods as $SASLMethod){
+ $pos = array_search( $SASLMethod , $this->supportedAuthMethods);
+ unset($this->supportedAuthMethods[$pos]);
+ }
+ }
+
+ }
+
+
+ /**
+ * Attempt to connect to the IMAP server.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdConnect($host= "localhost" , $port = 143)
+ {
+ if( $this->_connected ){
+ return new PEAR_Error( 'already connected, logout first!' );
+ }
+ if (PEAR::isError($error = $this->_socket->connect($host, $port, null, $this->_timeout, $this->_streamContextOptions))) {
+ return $error;
+ }
+ if ( PEAR::isError( $this->_getRawResponse() ) ) {
+ return new PEAR_Error( 'unable to open socket' );
+ }
+ $this->_connected = true;
+ return true;
+ }
+
+
+ /**
+ * get the cmd ID
+ *
+ * @return string Returns the CmdID and increment the counter
+ *
+ * @access private
+ * @since 1.0
+ */
+ function _getCmdId()
+ {
+ $this->_lastCmdID = "A000" . $this->_cmd_counter ;
+ $this->_cmd_counter++;
+ return $this->_lastCmdID;
+ }
+
+
+ /**
+ * get the last cmd ID
+ *
+ * @return string Returns the last cmdId
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getLastCmdId()
+ {
+ return $this->_lastCmdID;
+ }
+
+
+
+
+ /**
+ * get current mailbox name
+ *
+ * @return string Returns the current mailbox
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getCurrentMailbox()
+ {
+ return $this->currentMailbox;
+ }
+
+
+
+
+ /**
+ * Sets the debuging information on or off
+ *
+ * @param boolean True or false
+ *
+ * @return nothing
+ * @access public
+ * @since 1.0
+ */
+ function setDebug($debug = true)
+ {
+ $this->_debug = $debug;
+ }
+
+
+ function getDebugDialog()
+ {
+ return $this->dbgDialog;
+ }
+
+ /**
+ * Sets printed output of errors on or of
+ *
+ * @param boolean true or false
+ *
+ * @return nothing
+ * @access public
+ * @since 1.1
+ */
+ function setPrintErrors($printErrors = true)
+ {
+ $this->_printErrors = $printErrors;
+ }
+
+
+ /**
+ * Send the given string of data to the server.
+ *
+ * @param string $data The string of data to send.
+ *
+ * @return mixed True on success or a PEAR_Error object on failure.
+ *
+ * @access private
+ * @since 1.0
+ */
+ function _send($data)
+ {
+ if($this->_socket->eof() ){
+ return new PEAR_Error( 'Failed to write to socket: (connection lost!) ' );
+ }
+ if ( PEAR::isError( $error = $this->_socket->write( $data ) ) ) {
+
+ return new PEAR_Error( 'Failed to write to socket: ' .
+ $error->getMessage() );
+ }
+
+ if( $this->_debug ){
+ // C: means this data was sent by the client (this class)
+ echo "C: $data";
+ $this->dbgDialog.="C: $data";
+ }
+ return true;
+ }
+
+ /**
+ * Receive the given string of data from the server.
+ *
+ * @return mixed a line of response on success or a PEAR_Error object on failure.
+ *
+ * @access private
+ * @since 1.0
+ */
+ function _recvLn()
+ {
+
+ if (PEAR::isError( $this->lastline = $this->_socket->gets( 8192 ) ) ) {
+ return new PEAR_Error('Failed to write to socket: ' .
+ $this->lastline->getMessage() );
+ }
+ if($this->_debug){
+ // S: means this data was sent by the IMAP Server
+ echo "S: " . $this->lastline . "" ;
+ $this->dbgDialog.="S: " . $this->lastline . "" ;
+ }
+ if( $this->lastline == '' ){
+ return new PEAR_Error('Failed to receive from the socket: ' );
+ }
+ return $this->lastline;
+ }
+
+
+
+
+
+ /**
+ * Send a command to the server with an optional string of arguments.
+ * A carriage return / linefeed (CRLF) sequence will be appended to each
+ * command string before it is sent to the IMAP server.
+ *
+ * @param string $commandId The IMAP cmdID to send to the server.
+ * @param string $command The IMAP command to send to the server.
+ * @param string $args A string of optional arguments to append
+ * to the command.
+ *
+ * @return mixed The result of the _send() call.
+ *
+ * @access private
+ * @since 1.0
+ */
+ function _putCMD($commandId , $command, $args = '')
+ {
+ if ( !empty( $args ) ) {
+ return $this->_send( $commandId . " " . $command . " " . $args . "\r\n" );
+ }
+ return $this->_send( $commandId . " " . $command . "\r\n" );
+ }
+
+
+
+
+
+
+ /**
+ * Get a response from the server with an optional string of commandID.
+ * A carriage return / linefeed (CRLF) sequence will be appended to each
+ * command string before it is sent to the IMAP server.
+ *
+ * @param string $commandid The IMAP commandid retrive from the server.
+ *
+ * @return string The result response.
+ *
+ * @access private
+ */
+ function _getRawResponse($commandId = '*')
+ {
+ $arguments = '';
+ while ( !PEAR::isError( $this->_recvLn() ) ) {
+ $reply_code = strtok( $this->lastline , ' ' );
+ $arguments.= $this->lastline;
+ if ( !(strcmp( $commandId , $reply_code ) ) ) {
+ return $arguments;
+ }
+ }
+ return $arguments;
+ }
+
+
+
+
+
+ /**
+ * get the "returning of the unparsed response" feature status
+ *
+ * @return boolean return if the unparsed response is returned or not
+ *
+ * @access public
+ * @since 1.0
+ *
+ */
+ function getUnparsedResponse()
+ {
+ return $this->_unParsedReturn;
+ }
+
+ /**
+ * set the options for a SSL/TLS connection
+ * (see documentation for stream_context_create)
+ *
+ * @param array $options the options for the SSL/TLS connection
+ * @return nothing
+ *
+ * @access public
+ * @since 1.1
+ */
+ function setStreamContextOptions($options)
+ {
+ $this->_streamContextOptions = $options;
+ }
+
+ /**
+ * set the the timeout for the connection to the IMAP server.
+ *
+ * @param int $timeout the timeout
+ * @return nothing
+ *
+ * @access public
+ * @since 1.1
+ */
+ function setTimeout($timeout)
+ {
+ $this->_timeout = $timeout;
+ }
+
+
+ /**
+ * set the "returning of the unparsed response" feature on or off
+ *
+ * @param boolean $status: true: feature is on
+ * @return nothing
+ *
+ * @access public
+ * @since 1.0
+ */
+ function setUnparsedResponse($status)
+ {
+ $this->_unParsedReturn = $status;
+ }
+
+
+
+
+
+
+ /**
+ * Attempt to login to the iMAP server.
+ *
+ * @param string The userid to authenticate as.
+ * @param string The password to authenticate with.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdLogin($uid , $pwd)
+ {
+ $param="\"$uid\" \"$pwd\"";
+ return $this->_genericCommand('LOGIN', $param);
+ }
+
+
+
+
+
+
+ /**
+ * Attempt to authenticate to the iMAP server.
+ * @param string The userid to authenticate as.
+ * @param string The password to authenticate with.
+ * @param string The cmdID.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdAuthenticate($uid , $pwd , $userMethod = null)
+ {
+
+ if( !$this->_connected ){
+ return new PEAR_Error('not connected!');
+ }
+
+ $cmdid = $this->_getCmdId();
+
+
+ if ( PEAR::isError( $method = $this->_getBestAuthMethod($userMethod) ) ) {
+ return $method;
+ }
+
+
+ switch ($method) {
+ case 'DIGEST-MD5':
+ $result = $this->_authDigest_MD5( $uid , $pwd , $cmdid );
+ break;
+ case 'CRAM-MD5':
+ $result = $this->_authCRAM_MD5( $uid , $pwd ,$cmdid );
+ break;
+ case 'LOGIN':
+ $result = $this->_authLOGIN( $uid , $pwd , $cmdid );
+ break;
+
+ default :
+ $result = new PEAR_Error( "$method is not a supported authentication method" );
+ break;
+ }
+
+ $args = $this->_getRawResponse( $cmdid );
+ return $this->_genericImapResponseParser( $args , $cmdid );
+
+ }
+
+
+
+
+
+
+
+
+ /* Authenticates the user using the DIGEST-MD5 method.
+ *
+ * @param string The userid to authenticate as.
+ * @param string The password to authenticate with.
+ * @param string The cmdID.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access private
+ * @since 1.0
+ */
+ function _authDigest_MD5($uid , $pwd , $cmdid)
+ {
+
+ if ( PEAR::isError($error = $this->_putCMD( $cmdid ,"AUTHENTICATE" , "DIGEST-MD5") ) ) {
+ return $error;
+ }
+
+ if (PEAR::isError( $args = $this->_recvLn() ) ) {
+ return $args;
+ }
+
+ $this->_getNextToken( $args , $plus );
+
+ $this->_getNextToken( $args , $space );
+
+ $this->_getNextToken( $args , $challenge );
+
+ $challenge = base64_decode( $challenge );
+
+ $digest = &Auth_SASL::factory('digestmd5');
+
+ $auth_str = base64_encode($digest->getResponse($uid, $pwd, $challenge,"localhost", "imap"));
+
+ if ( PEAR::isError( $error = $this->_send("$auth_str\r\n"))) {
+ return $error;
+ }
+
+ if ( PEAR::isError( $args = $this->_recvLn() )) {
+ return $args;
+ }
+ /*
+ * We don't use the protocol's third step because IMAP doesn't allow
+ * subsequent authentication, so we just silently ignore it.
+ */
+ if ( PEAR::isError( $error = $this->_send( "\r\n" ) ) ) {
+ return $error;
+ }
+ }
+
+
+
+
+
+
+
+
+ /* Authenticates the user using the CRAM-MD5 method.
+ *
+ * @param string The userid to authenticate as.
+ * @param string The password to authenticate with.
+ * @param string The cmdID.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access private
+ * @since 1.0
+ */
+ function _authCRAM_MD5($uid, $pwd, $cmdid)
+ {
+
+
+
+ if ( PEAR::isError($error = $this->_putCMD( $cmdid ,"AUTHENTICATE" , "CRAM-MD5") ) ) {
+ return $error;
+ }
+
+ if ( PEAR::isError( $args = $this->_recvLn() ) ) {
+ return $args;
+ }
+
+ $this->_getNextToken( $args , $plus );
+
+ $this->_getNextToken( $args , $space );
+
+ $this->_getNextToken( $args , $challenge );
+
+ $challenge = base64_decode( $challenge );
+
+ $cram = &Auth_SASL::factory('crammd5');
+
+ $auth_str = base64_encode( $cram->getResponse( $uid , $pwd , $challenge ) );
+
+ if ( PEAR::isError( $error = $this->_send( $auth_str."\r\n" ) ) ) {
+ return $error;
+ }
+
+ }
+
+
+
+
+
+
+
+
+
+ /* Authenticates the user using the LOGIN method.
+ *
+ * @param string The userid to authenticate as.
+ * @param string The password to authenticate with.
+ * @param string The cmdID.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access private
+ * @since 1.0
+ */
+ function _authLOGIN($uid, $pwd, $cmdid)
+ {
+
+ if (PEAR::isError($error = $this->_putCMD($cmdid,"AUTHENTICATE", "LOGIN"))) {
+ return $error;
+ }
+
+ if (PEAR::isError($args = $this->_recvLn() )) {
+ return $args;
+ }
+
+ $this->_getNextToken( $args , $plus );
+
+ $this->_getNextToken( $args , $space );
+
+ $this->_getNextToken( $args , $challenge );
+
+ $challenge = base64_decode( $challenge );
+
+ $auth_str = base64_encode( "$uid" );
+
+ if ( PEAR::isError( $error = $this->_send( $auth_str."\r\n" ) ) ) {
+ return $error;
+ }
+
+ if (PEAR::isError( $args = $this->_recvLn() ) ) {
+ return $args;
+ }
+
+ $auth_str = base64_encode( "$pwd" );
+
+ if ( PEAR::isError($error = $this->_send( $auth_str."\r\n" ) ) ) {
+ return $error;
+ }
+
+ }
+
+
+
+
+
+
+
+
+ /**
+ * Returns the name of the best authentication method that the server
+ * has advertised.
+ *
+ * @param string if !=null,authenticate with this method ($userMethod).
+ *
+ * @return mixed Returns a string containing the name of the best
+ * supported authentication method or a PEAR_Error object
+ * if a failure condition is encountered.
+ * @access private
+ * @since 1.0
+ */
+ function _getBestAuthMethod($userMethod = null)
+ {
+ $this->cmdCapability();
+
+ if($userMethod != null ){
+
+ $methods = array();
+
+ $methods[] = $userMethod;
+
+ }else{
+ $methods = $this->supportedAuthMethods;
+ }
+
+ if( ($methods != null) && ($this->_serverAuthMethods != null)){
+ foreach ( $methods as $method ) {
+ if ( in_array( $method , $this->_serverAuthMethods ) ) {
+ return $method;
+ }
+ }
+ $serverMethods=implode(',' ,$this->_serverAuthMethods);
+ $myMethods=implode(',' ,$this->supportedAuthMethods);
+ return new PEAR_Error("$method NOT supported authentication method!. This IMAP server " .
+ "supports these methods: $serverMethods, but I support $myMethods");
+ }else{
+ return new PEAR_Error("This IMAP server don't support any Auth methods");
+ }
+ }
+
+
+
+
+
+
+
+
+
+ /**
+ * Attempt to disconnect from the iMAP server.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdLogout()
+ {
+ if( !$this->_connected ){
+ return new PEAR_Error( 'not connected!' );
+ }
+
+ if ( PEAR::isError( $args = $this->_genericCommand( 'LOGOUT' ) ) ) {
+ return $args;
+ }
+ if (PEAR::isError( $this->_socket->disconnect() ) ) {
+ return new PEAR_Error('socket disconnect failed');
+ }
+
+ return $args;
+ // not for now
+ // return $this->_genericImapResponseParser($args,$cmdid);
+
+ }
+
+
+
+
+
+ /**
+ * Send the NOOP command.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdNoop()
+ {
+ return $this->_genericCommand('NOOP');
+ }
+
+
+
+
+
+
+
+
+
+ /**
+ * Send the CHECK command.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdCheck()
+ {
+ return $this->_genericCommand('CHECK');
+ }
+
+
+
+
+
+
+
+
+
+
+ /**
+ * Send the Select Mailbox Command
+ *
+ * @param string The mailbox to select.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdSelect($mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ if( !PEAR::isError( $ret= $this->_genericCommand('SELECT', $mailbox_name) ) ){
+ $this->currentMailbox = $mailbox;
+ }
+ return $ret;
+ }
+
+
+
+
+
+
+
+
+
+
+ /**
+ * Send the EXAMINE Mailbox Command
+ *
+ * @param string The mailbox to examine.
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdExamine($mailbox)
+ {
+
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ $ret=$this->_genericCommand('EXAMINE', $mailbox_name);
+ $parsed='';
+ if(isset( $ret["PARSED"] ) ){
+ for($i=0;$i<count($ret["PARSED"]); $i++){ $command=$ret["PARSED"][$i]["EXT"];
+ $parsed[key($command)]=$command[key($command)];
+ }
+ }
+ return array("PARSED"=>$parsed,"RESPONSE"=>$ret["RESPONSE"]);
+ }
+
+
+
+
+
+
+
+ /**
+ * Send the CREATE Mailbox Command
+ *
+ * @param string $mailbox The mailbox to create.
+ * @param array $options options to pass to create
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdCreate($mailbox, $options = null)
+ {
+ $args = "";
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ $args = $this->_getCreateParams($options);
+ return $this->_genericCommand('CREATE', $mailbox_name.$args);
+ }
+
+ /**
+ * Send the RENAME Mailbox Command
+ *
+ * @param string $mailbox The old mailbox name.
+ * @param string $new_mailbox The new (renamed) mailbox name.
+ * @param array $options options to pass to create
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdRename($mailbox, $new_mailbox, $options = null)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ $new_mailbox_name=$this->_createQuotedString($new_mailbox);
+ $args = $this->_getCreateParams($options);
+ return $this->_genericCommand('RENAME', "$mailbox_name $new_mailbox_name".$args );
+ }
+
+ /**
+ * Send the DELETE Mailbox Command
+ *
+ * @param string The mailbox name to delete.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdDelete($mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ return $this->_genericCommand('DELETE', $mailbox_name);
+ }
+
+
+
+
+
+
+
+ /**
+ * Send the SUSCRIBE Mailbox Command
+ *
+ * @param string The mailbox name to suscribe.
+ *
+ * @return array Returns an array containing the response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdSubscribe($mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ return $this->_genericCommand('SUBSCRIBE', $mailbox_name );
+ }
+
+
+
+
+
+
+
+
+ /**
+ * Send the UNSUSCRIBE Mailbox Command
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdUnsubscribe($mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ return $this->_genericCommand('UNSUBSCRIBE', $mailbox_name );
+ }
+
+
+
+
+
+
+
+
+ /**
+ * Send the FETCH Command
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdFetch($msgset, $fetchparam)
+ {
+ return $this->_genericCommand('FETCH' , "$msgset $fetchparam" );
+ }
+
+
+
+
+
+
+
+ /**
+ * Send the CAPABILITY Command
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdCapability()
+ {
+ $ret = $this->_genericCommand( 'CAPABILITY' );
+
+ if(isset( $ret["PARSED"] ) ){
+ $ret["PARSED"]=$ret["PARSED"][0]["EXT"]["CAPABILITY"];
+ //fill the $this->_serverAuthMethods and $this->_serverSupportedCapabilities arrays
+ foreach( $ret["PARSED"]["CAPABILITIES"] as $auth_method ){
+ if( strtoupper( substr( $auth_method , 0 ,5 ) ) == "AUTH=" )
+ $this->_serverAuthMethods[] = substr( $auth_method , 5 );
+ }
+ // Keep the capabilities response to use ir later
+ $this->_serverSupportedCapabilities = $ret["PARSED"]["CAPABILITIES"];
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Send the CAPABILITY Command
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdNamespace()
+ {
+ $ret = $this->_genericCommand( 'NAMESPACE' );
+
+ if(isset( $ret["PARSED"] ) ){
+ $ret["PARSED"]=$ret["PARSED"][0]["EXT"]["NAMESPACE"];
+ // Keep the namespace response for later use
+ $this->_namespace = $ret["PARSED"]["NAMESPACES"];
+ }
+
+ return $ret;
+ }
+
+
+ /**
+ * Send the STATUS Mailbox Command
+ *
+ * @param string $mailbox the mailbox name
+ * @param mixed $request the request status
+ * it could be an array or space separated string of
+ * MESSAGES | RECENT | UIDNEXT
+ * UIDVALIDITY | UNSEEN
+ * @return array Returns a Parsed Response
+ *
+ * @access public
+ * @since 1.0
+ */
+ function cmdStatus($mailbox, $request)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+
+ // make array from $request if it is none
+ if (!is_array($request)) {
+ $request = explode(' ', $request);
+ }
+
+ // see RFC 3501
+ $valid_status_data = array('MESSAGES', 'RECENT', 'UIDNEXT', 'UIDVALIDITY', 'UNSEEN');
+
+ foreach ($request as $status_data) {
+ if (!in_array($status_data, $valid_status_data)) {
+ $this->_prot_error("request '$status_data' is invalid! see RFC 3501!!!!" , __LINE__ , __FILE__);
+ }
+ }
+
+ // back to space separated string
+ $request = implode(' ', $request);
+
+ $ret = $this->_genericCommand('STATUS', $mailbox_name.' ('.$request.')');
+ if (isset($ret['PARSED'])) {
+ $ret['PARSED']=$ret['PARSED'][count($ret['PARSED'])-1]['EXT'];
+ }
+ return $ret;
+ }
+
+
+
+
+
+
+ /**
+ * Send the LIST Command
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdList($mailbox_base, $mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ $mailbox_base=$this->_createQuotedString($mailbox_base);
+ return $this->_genericCommand('LIST', "$mailbox_base $mailbox_name" );
+ }
+
+
+
+
+
+
+ /**
+ * Send the LSUB Command
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdLsub($mailbox_base, $mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ $mailbox_base=$this->_createQuotedString($mailbox_base);
+ return $this->_genericCommand('LSUB', "$mailbox_base $mailbox_name" );
+ }
+
+
+
+
+
+
+ /**
+ * Send the APPEND Command
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdAppend($mailbox, $msg , $flags_list = '' ,$time = '')
+ {
+ if(!$this->_connected){
+ return new PEAR_Error('not connected!');
+ }
+
+
+ $cmdid=$this->_getCmdId();
+ $msg_size=$this->_getLineLength($msg);
+
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ if($flags_list != '') {
+ $flags_list = " ($flags_list)";
+ }
+ // TODO:
+ // Falta el codigo para que flags list y time hagan algo!!
+ if( $this->hasCapability( "LITERAL+" ) == true ){
+ $param=sprintf("%s%s%s {%s+}\r\n%s",$mailbox_name,$flags_list,$time,$msg_size,$msg);
+ if (PEAR::isError($error = $this->_putCMD($cmdid , 'APPEND' , $param ) ) ) {
+ return $error;
+ }
+ }else{
+ $param=sprintf("%s%s%s {%s}",$mailbox_name,$flags_list,$time,$msg_size);
+ if (PEAR::isError($error = $this->_putCMD($cmdid , 'APPEND' , $param ) ) ) {
+ return $error;
+ }
+ if (PEAR::isError($error = $this->_recvLn() ) ) {
+ return $error;
+ }
+
+ if (PEAR::isError($error = $this->_send( $msg."\r\n" ) ) ) {
+ return $error;
+ }
+ }
+
+
+ $args=$this->_getRawResponse($cmdid);
+ $ret = $this->_genericImapResponseParser($args,$cmdid);
+ return $ret;
+ }
+
+
+
+ /**
+ * Send the CLOSE command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdClose()
+ {
+ return $this->_genericCommand('CLOSE');
+ }
+
+
+
+
+
+
+ /**
+ * Send the EXPUNGE command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+ function cmdExpunge()
+ {
+ $ret=$this->_genericCommand('EXPUNGE');
+
+ if(isset( $ret["PARSED"] ) ){
+ $parsed=$ret["PARSED"];
+ unset($ret["PARSED"]);
+ foreach($parsed as $command){
+ if( strtoupper($command["COMMAND"]) == 'EXPUNGE' ){
+ $ret["PARSED"][$command["COMMAND"]][]=$command["NRO"];
+ }else{
+ $ret["PARSED"][$command["COMMAND"]]=$command["NRO"];
+ }
+ }
+ }
+ return $ret;
+ }
+
+
+
+
+
+
+
+ /**
+ * Send the SEARCH command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdSearch($search_cmd)
+ {
+ /* if($_charset != '' )
+ $_charset = "[$_charset] ";
+ $param=sprintf("%s%s",$charset,$search_cmd);
+ */
+ $ret = $this->_genericCommand('SEARCH', $search_cmd );
+ if(isset( $ret["PARSED"] ) ){
+ $ret["PARSED"]=$ret["PARSED"][0]["EXT"];
+ }
+ return $ret;
+ }
+
+
+ /**
+ * Send the SORT command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.1
+ */
+ function cmdSort($sort_cmd)
+ {
+ /*
+ if ($_charset != '' )
+ $_charset = "[$_charset] ";
+ $param = sprintf("%s%s",$charset,$search_cmd);
+ */
+ $ret = $this->_genericCommand('SORT', $sort_cmd);
+ if (isset($ret['PARSED'])) {
+ $ret['PARSED'] = $ret['PARSED'][0]['EXT'];
+ }
+ return $ret;
+ }
+
+
+ /**
+ * Send the STORE command.
+ *
+ * @param string $message_set the sessage_set
+ * @param string $dataitem: the way we store the flags
+ * FLAGS: replace the flags whith $value
+ * FLAGS.SILENT: replace the flags whith $value but don't return untagged responses
+ *
+ * +FLAGS: Add the flags whith $value
+ * +FLAGS.SILENT: Add the flags whith $value but don't return untagged responses
+ *
+ * -FLAGS: Remove the flags whith $value
+ * -FLAGS.SILENT: Remove the flags whith $value but don't return untagged responses
+ *
+ * @param string $value
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdStore($message_set, $dataitem, $value)
+ {
+ /* As said in RFC2060...
+ C: A003 STORE 2:4 +FLAGS (\Deleted)
+ S: * 2 FETCH FLAGS (\Deleted \Seen)
+ S: * 3 FETCH FLAGS (\Deleted)
+ S: * 4 FETCH FLAGS (\Deleted \Flagged \Seen)
+ S: A003 OK STORE completed
+ */
+ if( $dataitem!="FLAGS" && $dataitem!="FLAGS.SILENT" && $dataitem!="+FLAGS" &&
+ $dataitem!="+FLAGS.SILENT" && $dataitem!="-FLAGS" && $dataitem!="-FLAGS.SILENT" ){
+ $this->_prot_error("dataitem '$dataitem' is invalid! see RFC2060!!!!" , __LINE__ , __FILE__ );
+ }
+ $param=sprintf("%s %s (%s)",$message_set,$dataitem,$value);
+ return $this->_genericCommand('STORE', $param );
+ }
+
+
+
+
+
+
+
+ /**
+ * Send the COPY command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdCopy($message_set, $mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ return $this->_genericCommand('COPY', sprintf("%s %s",$message_set,$mailbox_name) );
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ function cmdUidFetch($msgset, $fetchparam)
+ {
+ return $this->_genericCommand('UID FETCH', sprintf("%s %s",$msgset,$fetchparam) );
+ }
+
+
+
+
+
+
+
+
+ function cmdUidCopy($message_set, $mailbox)
+ {
+ $mailbox_name=$this->_createQuotedString($mailbox);
+ return $this->_genericCommand('UID COPY', sprintf("%s %s",$message_set,$mailbox_name) );
+ }
+
+
+
+
+
+
+
+
+ /**
+ * Send the UID STORE command.
+ *
+ * @param string $message_set the sessage_set
+ * @param string $dataitem: the way we store the flags
+ * FLAGS: replace the flags whith $value
+ * FLAGS.SILENT: replace the flags whith $value but don't return untagged responses
+ *
+ * +FLAGS: Add the flags whith $value
+ * +FLAGS.SILENT: Add the flags whith $value but don't return untagged responses
+ *
+ * -FLAGS: Remove the flags whith $value
+ * -FLAGS.SILENT: Remove the flags whith $value but don't return untagged responses
+ *
+ * @param string $value
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdUidStore($message_set, $dataitem, $value)
+ {
+ /* As said in RFC2060...
+ C: A003 STORE 2:4 +FLAGS (\Deleted)
+ S: * 2 FETCH FLAGS (\Deleted \Seen)
+ S: * 3 FETCH FLAGS (\Deleted)
+ S: * 4 FETCH FLAGS (\Deleted \Flagged \Seen)
+ S: A003 OK STORE completed
+ */
+ if( $dataitem!="FLAGS" && $dataitem!="FLAGS.SILENT" && $dataitem!="+FLAGS" &&
+ $dataitem!="+FLAGS.SILENT" && $dataitem!="-FLAGS" && $dataitem!="-FLAGS.SILENT" ){
+ $this->_prot_error("dataitem '$dataitem' is invalid! see RFC2060!!!!" , __LINE__ , __FILE__ );
+ }
+ return $this->_genericCommand('UID STORE', sprintf("%s %s (%s)",$message_set,$dataitem,$value) );
+ }
+
+
+
+
+
+
+
+
+
+
+ /**
+ * Send the SEARCH command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdUidSearch($search_cmd)
+ {
+ $ret=$this->_genericCommand('UID SEARCH', sprintf("%s",$search_cmd) );
+ if(isset( $ret["PARSED"] ) ){
+ $ret["PARSED"]=$ret["PARSED"][0]["EXT"];
+ }
+ return $ret;
+ }
+
+
+ /**
+ * Send the UID SORT command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.1
+ */
+ function cmdUidSort($sort_cmd)
+ {
+ $ret=$this->_genericCommand('UID SORT', sprintf("%s",$sort_cmd));
+ if (isset($ret['PARSED'])) {
+ $ret["PARSED"]=$ret["PARSED"][0]["EXT"];
+ }
+ return $ret;
+ }
+
+
+ /**
+ * Send the X command.
+ *
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or true on success.
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdX($atom, $parameters)
+ {
+ return $this->_genericCommand("X$atom", $parameters );
+ }
+
+
+
+
+
+
+
+
+/********************************************************************
+***
+*** HERE ENDS the RFC2060 IMAPS FUNCTIONS
+*** AND BEGIN THE EXTENSIONS FUNCTIONS
+***
+********************************************************************/
+
+
+
+
+
+
+
+/********************************************************************
+*** RFC2087 IMAP4 QUOTA extension BEGINS HERE
+********************************************************************/
+
+
+ /**
+ * Send the GETQUOTA command.
+ *
+ * @param string $mailbox_name the mailbox name to query for quota data
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or quota data on success
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdGetQuota($mailbox_name)
+ {
+
+
+ //Check if the IMAP server has QUOTA support
+ if( ! $this->hasQuotaSupport() ){
+ return new PEAR_Error("This IMAP server does not support QUOTA's! ");
+ }
+ $mailbox_name=sprintf("%s",$this->utf_7_encode($mailbox_name) );
+ $ret = $this->_genericCommand('GETQUOTA', $mailbox_name );
+ if(isset( $ret["PARSED"] ) ){
+ // remove the array index because the quota response returns only 1 line of output
+ $ret['PARSED']=$ret["PARSED"][0];
+ }
+ return $ret;
+ }
+
+
+ /**
+ * Send the GETQUOTAROOT command.
+ *
+ * @param string $mailbox_name the mailbox name to query for quota data
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or quota data on success
+ * @access public
+ * @since 1.0
+ */
+
+ function cmdGetQuotaRoot($mailbox_name)
+ {
+ //Check if the IMAP server has QUOTA support
+ if( ! $this->hasQuotaSupport() ){
+ return new PEAR_Error("This IMAP server does not support QUOTA's! ");
+ }
+ $mailbox_name=sprintf("%s",$this->utf_7_encode($mailbox_name) );
+ $ret = $this->_genericCommand('GETQUOTAROOT', $mailbox_name );
+
+ if(isset( $ret["PARSED"] ) ){
+ // remove the array index because the quota response returns only 1 line of output
+ $ret['PARSED']=$ret["PARSED"][1];
+ }
+ return $ret;
+ }
+
+
+
+
+ /**
+ * Send the SETQUOTA command.
+ *
+ * @param string $mailbox_name the mailbox name to query for quota data
+ * @param string $storageQuota sets the max number of bytes this mailbox can handle
+ * @param string $messagesQuota sets the max number of messages this mailbox can handle
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or quota data on success
+ * @access public
+ * @since 1.0
+ */
+// TODO: implement the quota by number of emails!!
+ function cmdSetQuota($mailbox_name, $storageQuota = null ,$messagesQuota = null )
+ {
+ //Check if the IMAP server has QUOTA support
+ if( ! $this->hasQuotaSupport() ){
+ return new PEAR_Error("This IMAP server does not support QUOTA's! ");
+ }
+
+ if( ($messagesQuota == null) && ( $storageQuota == null) ){
+ return new PEAR_Error('$storageQuota and $messagesQuota parameters can\'t be both null if you want to use quota');
+ }
+ $mailbox_name=$this->_createQuotedString($mailbox_name);
+ //Make the command request
+ $param=sprintf("%s (",$mailbox_name);
+ if($storageQuota != null ){
+ if ($storageQuota == -1) {
+ // set -1 to remove a quota
+ $param = sprintf("%s", $param);
+ } elseif ($storageQuota == strtolower('remove')) {
+ // this is a cyrus rmquota specific feature
+ // see http://email.uoa.gr/projects/cyrus/quota-patches/rmquota/
+ $param = sprintf("%sREMOVE 1", $param);
+ } else {
+ $param = sprintf("%sSTORAGE %s", $param, $storageQuota);
+ }
+ if( $messagesQuota != null ){
+ //if we have both types of quota on the same call we must append an space between
+ // those parameters
+ $param=sprintf("%s ",$param);
+ }
+ }
+ if($messagesQuota != null ){
+ $param=sprintf("%sMESSAGES %s",$param,$messagesQuota);
+
+ }
+ $param=sprintf("%s)",$param);
+
+ return $this->_genericCommand('SETQUOTA', $param );
+ }
+
+
+
+ /**
+ * Send the SETQUOTAROOT command.
+ *
+ * @param string $mailbox_name the mailbox name to query for quota data
+ * @param string $storageQuota sets the max number of bytes this mailbox can handle
+ * @param string $messagesQuota sets the max number of messages this mailbox can handle
+ * @return mixed Returns a PEAR_Error with an error message on any
+ * kind of failure, or quota data on success
+ * @access public
+ * @since 1.0
+ */
+ function cmdSetQuotaRoot($mailbox_name, $storageQuota = null ,$messagesQuota = null)
+ {
+ //Check if the IMAP server has QUOTA support
+ if( ! $this->hasQuotaSupport() ){
+ return new PEAR_Error("This IMAP server does not support QUOTA's! ");
+ }
+
+ if( ($messagesQuota == null) && ( $storageQuota == null) ){
+ return new PEAR_Error('$storageQuota and $messagesQuota parameters can\'t be both null if you want to use quota');
+ }
+ $mailbox_name=$this->_createQuotedString($mailbox_name);
+ //Make the command request
+ $param=sprintf("%s (",$mailbox_name);
+ if($storageQuota != null ){
+ $param=sprintf("%sSTORAGE %s",$param,$storageQuota);
+ if( $messagesQuota != null ){
+ //if we have both types of quota on the same call we must append an space between
+ // those parameters
+ $param=sprintf("%s ",$param);
+ }
+ }
+ if($messagesQuota != null ){
+ $param=sprintf("%sMESSAGES %s",$param,$messagesQuota);
+
+ }
+ $param=sprintf("%s)",$param);
+
+ return $this->_genericCommand('SETQUOTAROOT', $param );
+ }
+
+
+
+/********************************************************************
+*** RFC2087 IMAP4 QUOTA extension ENDS HERE
+********************************************************************/
+
+
+
+
+
+
+/********************************************************************
+*** RFC2086 IMAP4 ACL extension BEGINS HERE
+********************************************************************/
+
+
+
+
+ function cmdSetACL($mailbox_name, $user, $acl)
+ {
+
+ //Check if the IMAP server has ACL support
+ if( ! $this->hasAclSupport() ){
+ return new PEAR_Error("This IMAP server does not support ACL's! ");
+ }
+ $mailbox_name=$this->_createQuotedString($mailbox_name);
+ $user_name=$this->_createQuotedString($user);
+ if(is_array($acl)){
+ $acl=implode('',$acl);
+ }
+ return $this->_genericCommand('SETACL', sprintf("%s %s \"%s\"",$mailbox_name,$user_name,$acl) );
+ }
+
+
+
+
+
+
+ function cmdDeleteACL($mailbox_name, $user)
+ {
+ //Check if the IMAP server has ACL support
+ if( ! $this->hasAclSupport() ){
+ return new PEAR_Error("This IMAP server does not support ACL's! ");
+ }
+ $mailbox_name=$this->_createQuotedString($mailbox_name);
+
+ return $this->_genericCommand('DELETEACL', sprintf("%s \"%s\"",$mailbox_name,$user) );
+ }
+
+
+
+
+
+
+
+
+
+ function cmdGetACL($mailbox_name)
+ {
+ //Check if the IMAP server has ACL support
+ if( ! $this->hasAclSupport() ){
+ return new PEAR_Error("This IMAP server does not support ACL's! ");
+ }
+ $mailbox_name=$this->_createQuotedString($mailbox_name);
+ $ret = $this->_genericCommand('GETACL', sprintf("%s",$mailbox_name) );
+ if(isset( $ret["PARSED"] ) ){
+ $ret['PARSED']=$ret["PARSED"][0]["EXT"];
+
+ }
+ return $ret;
+ }
+
+
+
+
+
+
+
+ function cmdListRights($mailbox_name, $user)
+ {
+ //Check if the IMAP server has ACL support
+ if( ! $this->hasAclSupport() ){
+ return new PEAR_Error("This IMAP server does not support ACL's! ");
+ }
+ $mailbox_name=$this->_createQuotedString($mailbox_name);
+ $ret = $this->_genericCommand('LISTRIGHTS', sprintf("%s \"%s\"",$mailbox_name,$user) );
+ if(isset( $ret["PARSED"] ) ){
+ $ret["PARSED"]=$ret["PARSED"][0]["EXT"];
+ }
+ return $ret;
+ }
+
+
+
+
+
+
+
+
+
+ function cmdMyRights($mailbox_name)
+ {
+ //Check if the IMAP server has ACL support
+ if( ! $this->hasAclSupport() ){
+ return new PEAR_Error("This IMAP server does not support ACL's! ");
+ }
+ $mailbox_name=$this->_createQuotedString($mailbox_name);
+ $ret = $this->_genericCommand('MYRIGHTS', sprintf("%s",$mailbox_name) );
+ if(isset( $ret["PARSED"] ) ){
+ $ret["PARSED"]=$ret["PARSED"][0]["EXT"];
+ }
+ return $ret;
+ }
+
+
+/********************************************************************
+*** RFC2086 IMAP4 ACL extension ENDs HERE
+********************************************************************/
+
+
+
+
+
+
+
+
+
+
+
+
+/*******************************************************************************
+*** draft-daboo-imap-annotatemore-05 IMAP4 ANNOTATEMORE extension BEGINS HERE
+********************************************************************************/
+
+
+
+ function cmdSetAnnotation($mailbox_name, $entry, $values)
+ {
+ // Check if the IMAP server has ANNOTATEMORE support
+ if(!$this->hasAnnotateMoreSupport()) {
+ return new PEAR_Error('This IMAP server does not support the ANNOTATEMORE extension!');
+ }
+ if (!is_array($values)) {
+ return new PEAR_Error('Invalid $values argument passed to cmdSetAnnotation');
+ }
+
+ $vallist = '';
+ foreach ($values as $name => $value) {
+ $vallist .= "\"$name\" \"$value\" ";
+ }
+ $vallist = rtrim($vallist);
+
+ return $this->_genericCommand('SETANNOTATION', sprintf('"%s" "%s" (%s)', $mailbox_name, $entry, $vallist));
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+ function cmdDeleteAnnotation($mailbox_name, $entry, $values)
+ {
+ // Check if the IMAP server has ANNOTATEMORE support
+ if(!$this->hasAnnotateMoreSupport()) {
+ return new PEAR_Error('This IMAP server does not support the ANNOTATEMORE extension!');
+ }
+ if (!is_array($values)) {
+ return new PEAR_Error('Invalid $values argument passed to cmdDeleteAnnotation');
+ }
+
+ $vallist = '';
+ foreach ($values as $name) {
+ $vallist .= "\"$name\" NIL ";
+ }
+ $vallist = rtrim($vallist);
+
+ return $this->_genericCommand('SETANNOTATION', sprintf('"%s" "%s" (%s)', $mailbox_name, $entry, $vallist));
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+ function cmdGetAnnotation($mailbox_name, $entries, $values)
+ {
+ // Check if the IMAP server has ANNOTATEMORE support
+ if(!$this->hasAnnotateMoreSupport()) {
+ return new PEAR_Error('This IMAP server does not support the ANNOTATEMORE extension!');
+ }
+
+ $entlist = '';
+
+ if (!is_array($entries)) {
+ $entries = array($entries);
+ }
+
+ foreach ($entries as $name) {
+ $entlist .= "\"$name\" ";
+ }
+ $entlist = rtrim($entlist);
+ if (count($entries) > 1) {
+ $entlist = "($entlist)";
+ }
+
+
+
+ $vallist = '';
+ if (!is_array($values)) {
+ $values = array($values);
+ }
+
+ foreach ($values as $name) {
+ $vallist .= "\"$name\" ";
+ }
+ $vallist = rtrim($vallist);
+ if (count($values) > 1) {
+ $vallist = "($vallist)";
+ }
+
+ return $this->_genericCommand('GETANNOTATION', sprintf('"%s" %s %s', $mailbox_name, $entlist, $vallist));
+ }
+
+
+/*****************************************************************************
+*** draft-daboo-imap-annotatemore-05 IMAP4 ANNOTATEMORE extension ENDs HERE
+******************************************************************************/
+
+
+
+
+
+
+
+/********************************************************************
+***
+*** HERE ENDS THE EXTENSIONS FUNCTIONS
+*** AND BEGIN THE AUXILIARY FUNCTIONS
+***
+********************************************************************/
+
+
+
+
+
+ /**
+ * tell if the server has capability $capability
+ *
+ * @return true or false
+ *
+ * @access public
+ * @since 1.0
+ */
+ function getServerAuthMethods()
+ {
+ if( $this->_serverAuthMethods == null ){
+ $this->cmdCapability();
+ return $this->_serverAuthMethods;
+ }
+ return false;
+ }
+
+
+
+
+
+
+
+ /**
+ * tell if the server has capability $capability
+ *
+ * @return true or false
+ *
+ * @access public
+ * @since 1.0
+ */
+ function hasCapability($capability)
+ {
+ if( $this->_serverSupportedCapabilities == null ){
+ $this->cmdCapability();
+ }
+ if($this->_serverSupportedCapabilities != null ){
+ if( in_array( $capability , $this->_serverSupportedCapabilities ) ){
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+
+ /**
+ * tell if the server has Quota support
+ *
+ * @return true or false
+ *
+ * @access public
+ * @since 1.0
+ */
+ function hasQuotaSupport()
+ {
+ return $this->hasCapability('QUOTA');
+ }
+
+
+
+
+
+ /**
+ * tell if the server has Quota support
+ *
+ * @return true or false
+ *
+ * @access public
+ * @since 1.0
+ */
+ function hasAclSupport()
+ {
+ return $this->hasCapability('ACL');
+ }
+
+
+
+
+
+ /**
+ * tell if the server has support for the ANNOTATEMORE extension
+ *
+ * @return true or false
+ *
+ * @access public
+ * @since 1.0
+ */
+ function hasAnnotateMoreSupport()
+ {
+ return $this->hasCapability('ANNOTATEMORE');
+ }
+
+
+
+ function _createQuotedString($mailbox)
+ {
+ $search = array('\\', '"');
+ $replace = array('\\\\', '\\"');
+
+ $mailbox_name = str_replace($search, $replace, $mailbox);
+ $mailbox_name=sprintf("\"%s\"",$this->utf_7_encode($mailbox_name) );
+
+ return $mailbox_name;
+ }
+
+
+
+
+
+
+ /**
+ * Parses the responses like RFC822.SIZE and INTERNALDATE
+ *
+ * @param string the IMAP's server response
+ *
+ * @return string containing the parsed response
+ * @access private
+ * @since 1.0
+ */
+
+ function _parseOneStringResponse(&$str, $line,$file)
+ {
+ $this->_parseSpace($str , $line , $file );
+ $size = $this->_getNextToken($str,$uid);
+ return $uid;
+ }
+
+
+ /**
+ * Parses the FLAG response
+ *
+ * @param string the IMAP's server response
+ *
+ * @return Array containing the parsed response
+ * @access private
+ * @since 1.0
+ */
+ function _parseFLAGSresponse(&$str)
+ {
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+ $params_arr[] = $this->_arrayfy_content($str);
+ $flags_arr=array();
+ for( $i = 0 ; $i < count($params_arr[0]) ; $i++ ){
+ $flags_arr[] = $params_arr[0][$i];
+ }
+ return $flags_arr;
+ }
+
+
+
+
+
+ /**
+ * Parses the BODY response
+ *
+ * @param string the IMAP's server response
+ *
+ * @return Array containing the parsed response
+ * @access private
+ * @since 1.0
+ */
+
+ function _parseBodyResponse(&$str, $command){
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+ while($str[0] != ')' && $str!=''){
+ $params_arr[] = $this->_arrayfy_content($str);
+ }
+
+ return $params_arr;
+ }
+
+
+
+
+
+
+ /**
+ * Makes the content an Array
+ *
+ * @param string the IMAP's server response
+ *
+ * @return Array containing the parsed response
+ * @access private
+ * @since 1.0
+ */
+ function _arrayfy_content(&$str)
+ {
+ $params_arr=array();
+ $this->_getNextToken($str,$params);
+ if($params != '(' ){
+ return $params;
+ }
+ $this->_getNextToken($str,$params,false,false);
+ while ( $str != '' && $params != ')'){
+ if($params != '' ){
+ if($params[0] == '(' ){
+ $params=$this->_arrayfy_content( $params );
+ }
+ if($params != ' ' ){
+ //I don't remove the colons (") to handle the case of retriving " "
+ // If I remove the colons the parser will interpret this field as an imap separator (space)
+ // instead of a valid field so I remove the colons here
+ if($params=='""'){
+ $params='';
+ }else{
+ if($params[0]=='"'){
+ $params=substr($params,1,$this->_getLineLength($params)-2);
+ }
+ }
+ $params_arr[]=$params;
+ }
+ }else{
+ //if params if empty (for example i'm parsing 2 quotes ("")
+ // I'll append an array entry to mantain compatibility
+ $params_arr[]=$params;
+ }
+ $this->_getNextToken($str,$params,false,false);
+ }
+ return $params_arr;
+ }
+
+
+
+
+ /**
+ * Parses the BODY[],BODY[TEXT],.... responses
+ *
+ * @param string the IMAP's server response
+ *
+ * @return Array containing the parsed response
+ * @access private
+ * @since 1.0
+ */
+ function _parseContentresponse(&$str, $command)
+ {
+ $content = '';
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+ $size =$this->_getNextToken($str,$content);
+ return array( "CONTENT"=> $content , "CONTENT_SIZE" =>$size );
+ }
+
+
+
+
+
+
+
+
+ /**
+ * Parses the ENVELOPE response
+ *
+ * @param string the IMAP's server response
+ *
+ * @return Array containing the parsed response
+ * @access private
+ * @since 1.0
+ */
+ function _parseENVELOPEresponse(&$str)
+ {
+ $content = '';
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ $this->_getNextToken($str,$parenthesis);
+ if( $parenthesis != '(' ){
+ $this->_prot_error("must be a '(' but is a '$parenthesis' !!!!" , __LINE__ , __FILE__ );
+ }
+ // Get the email's Date
+ $this->_getNextToken($str,$date);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ // Get the email's Subject:
+ $this->_getNextToken($str,$subject);
+ //$subject=$this->decode($subject);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ //FROM LIST;
+ $from_arr = $this->_getAddressList($str);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ //"SENDER LIST\n";
+ $sender_arr = $this->_getAddressList($str);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ //"REPLY-TO LIST\n";
+ $reply_to_arr=$this->_getAddressList($str);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ //"TO LIST\n";
+ $to_arr = $this->_getAddressList($str);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ //"CC LIST\n";
+ $cc_arr = $this->_getAddressList($str);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ //"BCC LIST|$str|\n";
+ $bcc_arr = $this->_getAddressList($str);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ $this->_getNextToken($str,$in_reply_to);
+
+ $this->_parseSpace($str , __LINE__ , __FILE__ );
+
+ $this->_getNextToken($str,$message_id);
+
+ $this->_getNextToken($str,$parenthesis);
+
+ if( $parenthesis != ')' ){
+ $this->_prot_error("must be a ')' but is a '$parenthesis' !!!!" , __LINE__ , __FILE__ );
+ }
+
+ return array( "DATE"=> $date , "SUBJECT" => $subject,"FROM" => $from_arr,
+ "SENDER" => $sender_arr , "REPLY_TO" => $reply_to_arr, "TO" => $to_arr,
+ "CC" =>$cc_arr, "BCC"=> $bcc_arr, "IN_REPLY_TO" =>$in_reply_to, "MESSAGE_ID"=>$message_id );
+ }
+
+
+
+
+
+ /**
+ * Parses the ARRDLIST as defined in RFC
+ *
+ * @param string the IMAP's server response
+ *
+ * @return Array containing the parsed response
+ * @access private
+ * @since 1.0
+ */
+ function _getAddressList(&$str)
+ {
+ $params_arr = $this->_arrayfy_content($str);
+ if( !isset( $params_arr ) ){
+ return $params_arr;
+ }
+
+ if( is_array($params_arr) ){
+ foreach ($params_arr as $index => $address_arr) {
+ $personal_name = $address_arr[0];
+ $at_domain_list = $address_arr[1];
+ $mailbox_name = $address_arr[2];
+ $host_name = $address_arr[3];
+ if( $mailbox_name!='' && $host_name!='' ){
+ $email=$mailbox_name . "@" . $host_name;
+ }else{
+ $email=false;
+ }
+ if($email==false){
+ $rfc822_email=false;
+ }else{
+ if(!isset($personal_name)){
+ $rfc822_email= "<". $email . ">";
+ }else{
+ $rfc822_email= "\"". $personal_name ."\" <". $email . ">";
+ }
+ }
+ $email_arr[] = array ( "PERSONAL_NAME"=> $personal_name , "AT_DOMAIN_LIST"=>$at_domain_list ,
+ "MAILBOX_NAME"=> $this->utf_7_decode($mailbox_name), "HOST_NAME"=> $host_name,
+ "EMAIL"=>$email , "RFC822_EMAIL" => $rfc822_email );
+ }
+ return $email_arr;
+ }
+
+ return array();
+ }
+
+
+
+
+
+
+
+ /**
+ * Utility funcion to find the closing parenthesis ")" Position it takes care of quoted ones
+ *
+ * @param string the IMAP's server response
+ *
+ * @return int containing the pos of the closing parenthesis ")"
+ * @access private
+ * @since 1.0
+ */
+ function _getClosingBracesPos($str_line, $startDelim ='(', $stopDelim = ')' )
+ {
+ $len = $this->_getLineLength( $str_line );
+ $pos = 0;
+ // ignore all extra characters
+ // If inside of a string, skip string -- Boundary IDs and other
+ // things can have ) in them.
+ if ( $str_line[$pos] != $startDelim ) {
+ $this->_prot_error("_getClosingParenthesisPos: must start with a '(' but is a '". $str_line[$pos] ."'!!!!\n" .
+ "STR_LINE:$str_line|size:$len|POS: $pos\n" , __LINE__ , __FILE__ );
+ return( $len );
+ }
+ for( $pos = 1 ; $pos < $len ; $pos++ ){
+ if ($str_line[$pos] == $stopDelim ) {
+ break;
+ }
+ if ($str_line[$pos] == '"') {
+ $pos++;
+ while ( $str_line[$pos] != '"' && $pos < $len ) {
+ if ($str_line[$pos] == "\\" && $str_line[$pos + 1 ] == '"' )
+ $pos++;
+ if ($str_line[$pos] == "\\" && $str_line[$pos + 1 ] == "\\" )
+ $pos++;
+ $pos++;
+ }
+ }
+ if ( $str_line[$pos] == $startDelim ) {
+ $str_line_aux = substr( $str_line , $pos );
+ $pos_aux = $this->_getClosingBracesPos( $str_line_aux );
+ $pos+=$pos_aux;
+ }
+ }
+ if( $str_line[$pos] != $stopDelim ){
+ $this->_prot_error("_getClosingBracesPos: must be a $stopDelim but is a '". $str_line[$pos] ."'|POS:$pos|STR_LINE:$str_line!!!!" , __LINE__ , __FILE__ );
+ }
+
+ if( $pos >= $len )
+ return false;
+ return $pos;
+ }
+
+
+
+
+
+
+ /**
+ * Utility funcion to get from here to the end of the line
+ *
+ * @param string the IMAP's server response
+ *
+ * @return string containing the string to the end of the line
+ * @access private
+ * @since 1.0
+ */
+
+ function _getToEOL(&$str , $including = true)
+ {
+ $len = $this->_getLineLength( $str );
+ if( $including ){
+ for($i=0;$i<$len;$i++){
+ if( $str[$i] =="\n" )
+ break;
+ }
+ $content=substr($str,0,$i + 1);
+ $str=substr($str,$i + 1);
+ return $content;
+
+ }else{
+ for( $i = 0 ; $i < $len ; $i++ ){
+ if( $str[$i] =="\n" || $str[$i] == "\r")
+ break;
+ }
+ $content = substr( $str ,0 , $i );
+ $str = substr( $str , $i );
+ return $content;
+ }
+ }
+
+
+
+
+ /**
+ * Fetches the next IMAP token or parenthesis
+ *
+ * @param string the IMAP's server response
+ * @param string the next token
+ * @param boolean true: the parenthesis IS a token, false: I consider
+ * all the response in parenthesis as a token
+ *
+ * @return int containing the content size
+ * @access private
+ * @since 1.0
+ */
+
+
+ function _getNextToken(&$str, &$content, $parenthesisIsToken=true,$colonIsToken=true){
+ $len = $this->_getLineLength($str);
+ $pos = 0;
+ $content_size = false;
+ $content = false;
+ if($str == '' || $len < 2 ){
+ $content=$str;
+ return $len;
+ }
+ switch( $str[0] ){
+ case '{':
+ if( ($posClosingBraces = $this->_getClosingBracesPos($str, '{' , '}' )) == false ){
+ $this->_prot_error("_getClosingBracesPos() error!!!" , __LINE__ , __FILE__ );
+ }
+ if(! is_numeric( ( $strBytes = substr( $str , 1 , $posClosingBraces - 1) ) ) ){
+ $this->_prot_error("must be a number but is a '" . $strBytes ."'!!!!" , __LINE__ , __FILE__ );
+ }
+ if( $str[$posClosingBraces] != '}' ){
+ $this->_prot_error("must be a '}' but is a '" . $str[$posClosingBraces] ."'!!!!" , __LINE__ , __FILE__ );
+ }
+ if( $str[$posClosingBraces + 1] != "\r" ){
+ $this->_prot_error("must be a '\\r' but is a '" . $str[$posClosingBraces + 1] ."'!!!!" , __LINE__ , __FILE__ );
+ }
+ if( $str[$posClosingBraces + 2] != "\n" ){
+ $this->_prot_error("must be a '\\n' but is a '" . $str[$posClosingBraces + 2] ."'!!!!" , __LINE__ , __FILE__ );
+ }
+ $content = $this->_getSubstr( $str , $posClosingBraces + 3 , $strBytes );
+ if( $this->_getLineLength( $content ) != $strBytes ){
+ $this->_prot_error("content size is ". $this->_getLineLength($content) . " but the string reports a size of $strBytes!!!\n" , __LINE__ , __FILE__ );
+ }
+ $content_size = $strBytes;
+ //Advance the string
+ $str = $this->_getSubstr( $str , $posClosingBraces + $strBytes + 3 );
+ break;
+ case '"':
+ if($colonIsToken){
+ for($pos=1;$pos<$len;$pos++){
+ if ( $str[$pos] == "\"" ) {
+ break;
+ }
+ if ($str[$pos] == "\\" && $str[$pos + 1 ] == "\"" )
+ $pos++;
+ if ($str[$pos] == "\\" && $str[$pos + 1 ] == "\\" )
+ $pos++;
+ }
+ if($str[$pos] != '"' ){
+ $this->_prot_error("must be a '\"' but is a '" . $str[$pos] ."'!!!!" , __LINE__ , __FILE__ );
+ }
+ $content_size = $pos;
+ $content = substr( $str , 1 , $pos - 1 );
+ //Advance the string
+ $str = substr( $str , $pos + 1 );
+ }else{
+ for($pos=1;$pos<$len;$pos++){
+ if ( $str[$pos] == "\"" ) {
+ break;
+ }
+ if ($str[$pos] == "\\" && $str[$pos + 1 ] == "\"" )
+ $pos++;
+ if ($str[$pos] == "\\" && $str[$pos + 1 ] == "\\" )
+ $pos++;
+ }
+ if($str[$pos] != '"' ){
+ $this->_prot_error("must be a '\"' but is a '" . $str[$pos] ."'!!!!" , __LINE__ , __FILE__ );
+ }
+ $content_size = $pos;
+ $content = substr( $str , 0 , $pos + 1 );
+ //Advance the string
+ $str = substr( $str , $pos + 1 );
+
+ }
+ # we need to strip slashes for a quoted string
+ $content = stripslashes($content);
+ break;
+
+ case "\r":
+ $pos = 1;
+ if( $str[1] == "\n")
+ $pos++;
+ $content_size = $pos;
+ $content = substr( $str , 0 , $pos );
+ $str = substr( $str , $pos );
+ break;
+ case "\n":
+ $pos = 1;
+ $content_size = $pos;
+ $content = substr( $str , 0 , $pos );
+ $str = substr( $str , $pos );
+ break;
+ case '(':
+ if( $parenthesisIsToken == false ){
+ $pos = $this->_getClosingBracesPos( $str );
+ $content_size = $pos + 1;
+ $content = substr( $str , 0 , $pos + 1 );
+ $str = substr( $str , $pos + 1 );
+ }else{
+ $pos = 1;
+ $content_size = $pos;
+ $content = substr( $str , 0 , $pos );
+ $str = substr( $str , $pos );
+ }
+ break;
+ case ')':
+ $pos = 1;
+ $content_size = $pos;
+ $content = substr( $str , 0 , $pos );
+ $str = substr( $str , $pos );
+ break;
+ case ' ':
+ $pos = 1;
+ $content_size = $pos;
+ $content = substr( $str , 0 , $pos );
+ $str = substr( $str , $pos );
+ break;
+ default:
+ for( $pos = 0 ; $pos < $len ; $pos++ ){
+ if(substr( $str , 0 , 5 ) == 'BODY[' || substr( $str , 0 , 5 ) == 'BODY.') {
+ if($str[$pos] == ']') {
+ $pos++;
+ break;
+ }
+ } elseif ( $str[$pos] == ' ' || $str[$pos] == "\r" || $str[$pos] == ')' || $str[$pos] == '(' || $str[$pos] == "\n" ) {
+ break;
+ }
+ if ( $str[$pos] == "\\" && $str[$pos + 1 ] == ' ' )
+ $pos++;
+ if ( $str[$pos] == "\\" && $str[$pos + 1 ] == "\\" )
+ $pos++;
+ }
+ //Advance the string
+ if( $pos == 0 ){
+ $content_size = 1;
+ $content = substr( $str , 0 , 1 );
+ $str = substr( $str , 1 );
+ }else{
+ $content_size = $pos;
+ $content = substr( $str , 0 , $pos );
+ if($pos < $len){
+ $str = substr( $str , $pos );
+ }else{
+ //if this is the end of the string... exit the switch
+ break;
+ }
+
+
+ }
+ break;
+ }
+ return $content_size;
+ }
+
+
+
+
+
+ // ToDo: all real errors should be returned as PEAR error, others hidden by default
+ // NO extra output from this class!
+ /**
+ * Utility funcion to display to console the protocol errors
+ * printErrors() additionally has to be set to true
+ *
+ * @param string $str the error message
+ * @param int $line the line producing the error
+ * @param string $file file where the error was produced
+ *
+ * @return nothing
+ * @access private
+ * @since 1.0
+ */
+ function _prot_error($str , $line , $file, $printError = true)
+ {
+ if ($this->_printErrors && $printError) {
+ echo "$line,$file,PROTOCOL ERROR!:$str\n";
+ }
+ }
+
+
+
+
+ function _getEXTarray(&$str , $startDelim = '(' , $stopDelim = ')'){
+ /* I let choose the $startDelim and $stopDelim to allow parsing
+ the OK response so I also can parse a response like this
+ * OK [UIDNEXT 150] Predicted next UID
+ */
+ $this->_getNextToken( $str , $parenthesis );
+ if( $parenthesis != $startDelim ){
+ $this->_prot_error("must be a '$startDelim' but is a '$parenthesis' !!!!" , __LINE__ , __FILE__ );
+ }
+ $parenthesis = '';
+ $struct_arr = array();
+ while( $parenthesis != $stopDelim && $str != '' ){
+ // The command
+ $this->_getNextToken( $str , $token );
+ $token = strtoupper( $token );
+
+ if( ( $ret = $this->_retrParsedResponse( $str , $token ) ) != false ){
+ //$struct_arr[$token] = $ret;
+ $struct_arr=array_merge($struct_arr, $ret);
+ }
+
+ $parenthesis=$token;
+
+ }//While
+
+ if( $parenthesis != $stopDelim ){
+ $this->_prot_error("1_must be a '$stopDelim' but is a '$parenthesis' !!!!" , __LINE__ , __FILE__ );
+ }
+ return $struct_arr;
+ }
+
+
+
+
+
+ function _retrParsedResponse( &$str , $token, $previousToken = null)
+ {
+
+ //echo "\n\nTOKEN:$token\r\n";
+ $token = strtoupper($token);
+ switch( $token ){
+ case "RFC822.SIZE" :
+ return array($token=>$this->_parseOneStringResponse( $str,__LINE__ , __FILE__ ));
+ break;
+// case "RFC822.TEXT" :
+
+// case "RFC822.HEADER" :
+
+
+ case "RFC822" :
+ return array($token=>$this->_parseContentresponse( $str , $token ));
+ break;
+ case "FLAGS" :
+
+ case "PERMANENTFLAGS" :
+ return array($token=>$this->_parseFLAGSresponse( $str ));
+ break;
+
+ case "ENVELOPE" :
+ return array($token=>$this->_parseENVELOPEresponse( $str ));
+ break;
+ case "EXPUNGE" :
+ return false;
+ break;
+
+ case 'NOMODSEQ':
+ // ToDo: implement RFC 4551
+ return array($token=>'');
+ break;
+
+ case "UID" :
+
+ case "UIDNEXT" :
+
+ case "UIDVALIDITY" :
+
+ case "UNSEEN" :
+
+ case "MESSAGES" :
+
+ case "UIDNEXT" :
+
+ case "UIDVALIDITY" :
+
+ case "UNSEEN" :
+
+ case "INTERNALDATE" :
+ return array($token=>$this->_parseOneStringResponse( $str,__LINE__ , __FILE__ ));
+ break;
+ case "BODY" :
+
+ case "BODYSTRUCTURE" :
+ return array($token=>$this->_parseBodyResponse( $str , $token ));
+ break;
+ case "RECENT" :
+ if( $previousToken != null ){
+ $aux["RECENT"]=$previousToken;
+ return $aux;
+ }else{
+ return array($token=>$this->_parseOneStringResponse( $str,__LINE__ , __FILE__ ));
+ }
+ break;
+
+ case "EXISTS" :
+ return array($token=>$previousToken);
+ break;
+ case "READ-WRITE" :
+
+ case "READ-ONLY" :
+ return array($token=>$token);
+ break;
+ case "QUOTA" :
+ /*
+ A tipical GETQUOTA DIALOG IS AS FOLLOWS
+
+ C: A0004 GETQUOTA user.damian
+ S: * QUOTA user.damian (STORAGE 1781460 4000000)
+ S: A0004 OK Completed
+
+ another example of QUOTA response from GETQUOTAROOT:
+ C: A0008 GETQUOTAROOT INBOX
+ S: * QUOTAROOT INBOX ""
+ S: * QUOTA "" (STORAGE 0 1024000 MESSAGE 0 40000)
+ S: A0008 OK GETQUOTAROOT finished.
+
+ RFC 2087 section 5.1 says the list could be empty:
+
+ C: A0004 GETQUOTA user.damian
+ S: * QUOTA user.damian ()
+ S: A0004 OK Completed
+
+ quota_list ::= "(" #quota_resource ")"
+ quota_resource ::= atom SP number SP number
+ quota_response ::= "QUOTA" SP astring SP quota_list
+ */
+
+ $mailbox = $this->_parseOneStringResponse( $str,__LINE__ , __FILE__ );
+ $ret_aux = array('MAILBOX'=>$this->utf_7_decode($mailbox));
+
+ // courier fix
+ if ($str[0].$str[1] == "\r\n") {
+ return array($token => $ret_aux);
+ }
+ // end courier fix
+
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_parseString( $str , '(' , __LINE__ , __FILE__ );
+
+ // fetching quota resources ( BNF ::= #quota_resource but spce separated instead of comma)
+ $this->_getNextToken($str, $quota_resp );
+ while ($quota_resp != ')') {
+ if (($ext = $this->_retrParsedResponse($str, $quota_resp)) == false) {
+ $this->_prot_error("bogus response!!!!" , __LINE__ , __FILE__ );
+ }
+ $ret_aux=array_merge($ret_aux,$ext);
+
+ $this->_getNextToken($str, $quota_resp);
+ if ($quota_resp == ' ') {
+ $this->_getNextToken($str, $quota_resp);
+ }
+ }
+
+ // if empty list, apparently no STORAGE or MESSAGE quota set
+ return array($token=>$ret_aux);
+ break;
+
+ case "QUOTAROOT" :
+ /*
+ A tipical GETQUOTA DIALOG IS AS FOLLOWS
+
+ C: A0004 GETQUOTA user.damian
+ S: * QUOTA user.damian (STORAGE 1781460 4000000)
+ S: A0004 OK Completed
+ */
+ $mailbox = $this->utf_7_decode($this->_parseOneStringResponse( $str,__LINE__ , __FILE__ ));
+
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 0 ) );
+ if(empty($str_line)) {
+ $ret = @array( "MAILBOX"=>$this->utf_7_decode($mailbox));
+ } else {
+ $quotaroot = $this->_parseOneStringResponse( $str_line,__LINE__ , __FILE__ );
+ $ret = @array( "MAILBOX"=>$this->utf_7_decode($mailbox) , $token=>$quotaroot );
+ }
+ return array($token=>$ret);
+ break;
+ case "STORAGE" :
+ $used = $this->_parseOneStringResponse( $str,__LINE__ , __FILE__ );
+ $qmax = $this->_parseOneStringResponse( $str,__LINE__ , __FILE__ );
+ return array($token=>array("USED"=> $used, "QMAX" => $qmax));
+ break;
+ case "MESSAGE" :
+ $mused = $this->_parseOneStringResponse( $str,__LINE__ , __FILE__ );
+ $mmax = $this->_parseOneStringResponse( $str,__LINE__ , __FILE__ );
+ return array($token=>array("MUSED"=> $mused, "MMAX" => $mmax));
+ break;
+ case "FETCH" :
+ $this->_parseSpace( $str ,__LINE__ ,__FILE__ );
+ // Get the parsed pathenthesis
+ $struct_arr = $this->_getEXTarray( $str );
+ return $struct_arr;
+ break;
+ case "NAMESPACE" :
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken($str , $personal, false);
+ $struct_arr['NAMESPACES']['personal'] = $this->_arrayfy_content($personal);
+
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken($str , $others, false);
+ $struct_arr['NAMESPACES']['others'] = $this->_arrayfy_content($others);
+
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken($str , $shared, false);
+ $struct_arr['NAMESPACES']['shared'] = $this->_arrayfy_content($shared);
+
+ return array($token=>$struct_arr);
+ break;
+ case "CAPABILITY" :
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 0 ) );
+ $struct_arr["CAPABILITIES"] = explode( ' ' , $str_line );
+ return array($token=>$struct_arr);
+ break;
+ case "STATUS" :
+ $mailbox = $this->_parseOneStringResponse( $str,__LINE__ , __FILE__ );
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $ext = $this->_getEXTarray( $str );
+ $struct_arr["MAILBOX"] = $this->utf_7_decode($mailbox);
+ $struct_arr["ATTRIBUTES"] = $ext;
+ return array($token=>$struct_arr);
+ break;
+ case "LIST" :
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $params_arr = $this->_arrayfy_content( $str );
+
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken( $str , $hierarchydelim );
+
+ $this->_parseSpace( $str,__LINE__ , __FILE__);
+ $this->_getNextToken( $str , $mailbox_name );
+
+ $result_array = array( "NAME_ATTRIBUTES"=>$params_arr , "HIERACHY_DELIMITER"=>$hierarchydelim , "MAILBOX_NAME"=> $this->utf_7_decode($mailbox_name) );
+ return array($token=>$result_array);
+ break;
+ case "LSUB" :
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $params_arr = $this->_arrayfy_content( $str );
+
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken( $str , $hierarchydelim );
+
+ $this->_parseSpace( $str,__LINE__ , __FILE__);
+ $this->_getNextToken( $str , $mailbox_name );
+
+ $result_array = array( "NAME_ATTRIBUTES"=>$params_arr , "HIERACHY_DELIMITER"=>$hierarchydelim , "MAILBOX_NAME"=> $this->utf_7_decode($mailbox_name) );
+ return array($token=>$result_array);
+ break;
+
+ case "SEARCH" :
+ case 'SORT':
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 1) );
+ $struct_arr[$token.'_LIST'] = explode(' ', $str_line);
+ if (count($struct_arr[$token.'_LIST']) == 1 && $struct_arr[$token.'_LIST'][0]=='') {
+ $struct_arr[$token.'_LIST'] = null;
+ }
+ return array($token=>$struct_arr);
+ break;
+
+ case "OK" :
+ /* TODO:
+ parse the [ .... ] part of the response, use the method
+ _getEXTarray(&$str,'[',$stopDelim=']')
+
+ */
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 1 ) );
+ if($str_line[0] == '[' ){
+ $braceLen=$this->_getClosingBracesPos($str_line, '[', ']' );
+ $str_aux='('. substr($str_line,1,$braceLen -1). ')';
+ $ext_arr=$this->_getEXTarray($str_aux);
+ //$ext_arr=array($token=>$this->_getEXTarray($str_aux));
+ }else{
+ $ext_arr=$str_line;
+ //$ext_arr=array($token=>$str_line);
+ }
+ $result_array = $ext_arr;
+ return $result_array;
+ break;
+ case "NO" :
+ /* TODO:
+ parse the [ .... ] part of the response, use the method
+ _getEXTarray(&$str,'[',$stopDelim=']')
+
+ */
+
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 1 ) );
+ $result_array[] = @array( "COMMAND"=>$token , "EXT"=>$str_line );
+ return $result_array;
+ break;
+ case "BAD" :
+ /* TODO:
+ parse the [ .... ] part of the response, use the method
+ _getEXTarray(&$str,'[',$stopDelim=']')
+
+ */
+
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 1 ) );
+ $result_array[] = array( "COMMAND"=>$token , "EXT"=>$str_line );
+ return $result_array;
+ break;
+ case "BYE" :
+ /* TODO:
+ parse the [ .... ] part of the response, use the method
+ _getEXTarray(&$str,'[',$stopDelim=']')
+
+ */
+
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 1 ) );
+ $result_array[] = array( "COMMAND"=>$token , "EXT"=> $str_line );
+ return $result_array;
+ break;
+
+ case "LISTRIGHTS" :
+ $this->_parseSpace( $str ,__LINE__ , __FILE__ );
+ $this->_getNextToken( $str , $mailbox );
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken( $str , $user );
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken( $str , $granted );
+
+ $ungranted = explode( ' ' , rtrim( substr( $this->_getToEOL( $str , false ) , 1 ) ) );
+
+ $result_array = @array( "MAILBOX"=>$this->utf_7_decode($mailbox) , "USER"=>$user , "GRANTED"=>$granted , "UNGRANTED"=>$ungranted );
+ return $result_array;
+ break;
+
+ case "MYRIGHTS" :
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken( $str ,$mailbox );
+ // Patch to handle the alternate MYRIGHTS response from Courier-IMAP
+ if ($str==')'){
+ $granted = $mailbox;
+ $mailbox = $this->currentMailbox;
+ }else{
+ $this->_parseSpace( $str , __LINE__ , __FILE__ );
+ $this->_getNextToken( $str , $granted );
+ }
+ // End Patch
+
+ $result_array = array( "MAILBOX"=>$this->utf_7_decode($mailbox) , "GRANTED"=>$granted );
+ return $result_array;
+ break;
+
+ case 'ACL':
+ /*
+ RFC 4314:
+ acl-data = "ACL" SP mailbox *(SP identifier SP rights)
+ identifier = astring
+ rights = astring ;; only lowercase ASCII letters and digits are allowed.
+ */
+ //$str = " INBOX\r\nA0006 OK Completed\r\n";
+ $this->_parseSpace($str, __LINE__, __FILE__);
+ $this->_getNextToken($str, $mailbox);
+
+ $arr = array();
+ while (substr($str, 0, 2) != "\r\n") {
+ $this->_parseSpace($str, __LINE__, __FILE__);
+ $this->_getNextToken($str, $acl_user);
+ $this->_parseSpace($str, __LINE__, __FILE__);
+ $this->_getNextToken($str, $acl_rights);
+ $arr[] = array('USER'=>$acl_user, 'RIGHTS'=>$acl_rights);
+ }
+
+ $result_array = array('MAILBOX'=>$this->utf_7_decode($mailbox), 'USERS'=>$arr);
+ return $result_array;
+ break;
+
+ case "ANNOTATION" :
+ $this->_parseSpace($str, __LINE__, __FILE__);
+ $this->_getNextToken($str, $mailbox);
+
+ $this->_parseSpace($str, __LINE__, __FILE__);
+ $this->_getNextToken($str, $entry);
+
+ $this->_parseSpace($str, __LINE__, __FILE__);
+ $attrs = $this->_arrayfy_content($str);
+
+ $result_array = array('MAILBOX' => $mailbox, 'ENTRY' => $entry , 'ATTRIBUTES' => $attrs);
+ return $result_array;
+ break;
+
+ case "":
+ $this->_prot_error( "PROTOCOL ERROR!:str empty!!" , __LINE__ , __FILE__ );
+ break;
+ case "(":
+ $this->_prot_error("OPENING PARENTHESIS ERROR!!!!!!!!!!!!!!!!!" , __LINE__ , __FILE__ );
+ break;
+ case ")":
+ //"CLOSING PARENTHESIS BREAK!!!!!!!"
+ break;
+ case "\r\n":
+ $this->_prot_error("BREAK!!!!!!!!!!!!!!!!!" , __LINE__ , __FILE__ );
+ break;
+ case ' ':
+ // this can happen and we just ignore it
+ // This happens when - for example - fetch returns more than 1 parammeter
+ // for example you ask to get RFC822.SIZE and UID
+ //$this->_prot_error("SPACE BREAK!!!!!!!!!!!!!!!!!" , __LINE__ , __FILE__ );
+ break;
+ default:
+ $body_token=strtoupper(substr($token,0,5));
+ $rfc822_token=strtoupper(substr($token,0,7));
+
+ if( $body_token == 'BODY[' || $body_token == 'BODY.' || $rfc822_token == 'RFC822.' ) {
+ //echo "TOKEN:$token\n";
+ //$this->_getNextToken( $str , $mailbox );
+ return array($token=>$this->_parseContentresponse( $str , $token ));
+ }else{
+ $this->_prot_error( "UNIMPLEMMENTED! I don't know the parameter '$token' !!!" , __LINE__ , __FILE__ );
+ }
+ break;
+ }
+ return false;
+}
+
+
+
+
+
+
+ /*
+ * Verifies that the next character IS a space
+ */
+ function _parseSpace(&$str, $line, $file, $printError = true)
+ {
+ /*
+ This code repeats a lot in this class
+ so i make it a function to make all the code shorter
+ */
+ $this->_getNextToken( $str , $space );
+ if( $space != ' ' ){
+ $this->_prot_error("must be a ' ' but is a '$space' !!!!" , $line , $file,$printError );
+ }
+ return $space;
+ }
+
+
+
+
+
+
+ function _parseString( &$str , $char , $line , $file )
+ {
+ /*
+ This code repeats a lot in this class
+ so i make it a function to make all the code shorter
+ */
+ $this->_getNextToken( $str , $char_aux );
+ if( strtoupper($char_aux) != strtoupper( $char ) ){
+ $this->_prot_error("must be a $char but is a '$char_aux' !!!!", $line , $file );
+ }
+ return $char_aux;
+ }
+
+
+
+
+
+ function _genericImapResponseParser( &$str , $cmdid = null )
+ {
+
+ $result_array=array();
+ if( $this->_unParsedReturn ){
+ $unparsed_str = $str;
+ }
+
+ $this->_getNextToken($str, $token);
+
+ while ($token != $cmdid && $str != '') {
+ if ($token == '+' ) {
+ //if the token is + ignore the line
+ // TODO: verify that this is correct!!!
+ $this->_getToEOL($str);
+ $this->_getNextToken($str, $token);
+ }
+
+ $this->_parseString($str, ' ', __LINE__, __FILE__);
+
+ $this->_getNextToken($str, $token);
+ if ($token == '+') {
+ $this->_getToEOL($str);
+ $this->_getNextToken($str, $token);
+ } else {
+ if (is_numeric($token)) {
+ // The token is a NUMBER so I store it
+ $msg_nro = $token;
+ $this->_parseSpace($str, __LINE__, __FILE__);
+
+ // I get the command
+ $this->_getNextToken($str, $command);
+
+ if (($ext_arr = $this->_retrParsedResponse($str, $command, $msg_nro)) == false) {
+ // if this bogus response cis a FLAGS () or EXPUNGE response
+ // the ignore it
+ if ($command != 'FLAGS' && $command != 'EXPUNGE') {
+ $this->_prot_error("bogus response!!!!" , __LINE__ , __FILE__, false);
+ }
+ }
+ $result_array[] = array('COMMAND'=>$command, 'NRO'=>$msg_nro, 'EXT'=>$ext_arr);
+ } else {
+ // OK the token is not a NUMBER so it MUST be a COMMAND
+ $command = $token;
+
+ /* Call the parser return the array
+ take care of bogus responses!
+ */
+
+ if (($ext_arr = $this->_retrParsedResponse($str, $command)) == false) {
+ $this->_prot_error("bogus response!!!! (COMMAND:$command)", __LINE__, __FILE__);
+ }
+ $result_array[] = array('COMMAND'=>$command, 'EXT'=>$ext_arr);
+ }
+ }
+
+
+ $this->_getNextToken($str, $token);
+
+ $token = strtoupper($token);
+ if( $token != "\r\n" && $token != '' ){
+ $this->_prot_error("PARSE ERROR!!! must be a '\\r\\n' here but is a '$token'!!!! (getting the next line)|STR:|$str|" , __LINE__ , __FILE__ );
+ }
+ $this->_getNextToken( $str , $token );
+
+ if($token == "+" ){
+ //if the token is + ignore the line
+ // TODO: verify that this is correct!!!
+ $this->_getToEOL( $str );
+ $this->_getNextToken( $str , $token );
+ }
+ }//While
+ // OK we finish the UNTAGGED Response now we must parse the FINAL TAGGED RESPONSE
+ //TODO: make this a litle more elegant!
+ $this->_parseSpace( $str , __LINE__ , __FILE__, false );
+
+ $this->_getNextToken( $str , $cmd_status );
+
+ $str_line = rtrim (substr( $this->_getToEOL( $str ) , 1 ) );
+
+
+ $response["RESPONSE"]=array( "CODE"=>$cmd_status , "STR_CODE"=>$str_line , "CMDID"=>$cmdid );
+
+ $ret=$response;
+ if( !empty($result_array)){
+ $ret=array_merge($ret,array("PARSED"=>$result_array) );
+ }
+
+ if( $this->_unParsedReturn ){
+ $unparsed["UNPARSED"]=$unparsed_str;
+ $ret=array_merge($ret,$unparsed);
+ }
+
+
+ if( isset($status_arr) ){
+ $status["STATUS"]=$status_arr;
+ $ret=array_merge($ret,$status);
+ }
+ return $ret;
+
+}
+
+
+
+
+ function _genericCommand($command, $params = '')
+ {
+ if( !$this->_connected ){
+ return new PEAR_Error( "not connected! (CMD:$command)" );
+ }
+ $cmdid = $this->_getCmdId();
+ $this->_putCMD( $cmdid , $command , $params );
+ $args=$this->_getRawResponse( $cmdid );
+ return $this->_genericImapResponseParser( $args , $cmdid );
+ }
+
+
+
+ function utf_7_encode($str)
+ {
+ if($this->_useUTF_7 == false ){
+ return $str;
+ }
+
+ if(function_exists('mb_convert_encoding')) {
+ return mb_convert_encoding($str, "UTF7-IMAP", "ISO-8859-1");
+ }
+
+ $encoded_utf7 = '';
+ $base64_part = '';
+ if(is_array($str)){
+ return new PEAR_Error('error');
+ }
+
+ for ($i = 0; $i < $this->_getLineLength($str); $i++) {
+ //those chars should be base64 encoded
+ if ( ((ord($str[$i]) >= 39 ) and (ord($str[$i]) <= 126 )) or ((ord($str[$i]) >= 32 ) and (ord($str[$i]) <= 37 )) ) {
+ if ($base64_part) {
+ $encoded_utf7 = sprintf("%s&%s-", $encoded_utf7, str_replace('=', '',base64_encode($base64_part)) );
+ $base64_part = '';
+ }
+ $encoded_utf7 = sprintf("%s%s",$encoded_utf7 , $str[$i]);
+ } else {
+ //handle &
+ if (ord($str[$i]) == 38 ) {
+ if ($base64_part) {
+ $encoded_utf7 = sprintf("%s&%s-", $encoded_utf7, str_replace('=', '',base64_encode($base64_part)) );
+ $base64_part = '';
+ }
+ $encoded_utf7 = sprintf("%s&-", $encoded_utf7 );
+ } else {
+ $base64_part = sprintf("%s%s",$base64_part , $str[$i]);
+ //$base64_part = sprintf("%s%s%s",$base64_part , chr(0) , $str[$i]);
+ }
+ }
+ }
+ if ($base64_part) {
+ $encoded_utf7 = sprintf("%s&%s-", $encoded_utf7, str_replace('=', '',base64_encode($base64_part)) );
+ $base64_part = '';
+ }
+
+ return $encoded_utf7;
+ }
+
+
+ function utf_7_decode($str)
+ {
+
+ if($this->_useUTF_7 == false ){
+ return $str;
+ }
+
+ //return imap_utf7_decode($str);
+
+ if(function_exists('mb_convert_encoding')) {
+ return mb_convert_encoding($str, "ISO-8859-1", "UTF7-IMAP");
+ }
+
+ $base64_part = '';
+ $decoded_utf7 = '';
+
+ for ($i = 0; $i < $this->_getLineLength($str); $i++) {
+ if ( $this->_getLineLength($base64_part) > 0 ) {
+ if ($str[$i] == '-') {
+ if ($base64_part == '&') {
+ $decoded_utf7 = sprintf("%s&" , $decoded_utf7 );
+ } else {
+ $next_part_decoded= base64_decode( substr( $base64_part, 1 ) ) ;
+ $decoded_utf7 = sprintf("%s%s", $decoded_utf7 , $next_part_decoded );
+ }
+ $base64_part = '';
+
+ } else {
+ $base64_part = sprintf("%s%s", $base64_part , $str[$i] );
+ }
+ } else {
+ if ($str[$i] == '&') {
+ $base64_part = '&';
+ } else {
+ $decoded_utf7 = sprintf("%s%s", $decoded_utf7 , $str[$i] );
+ }
+ }
+ }
+ return $decoded_utf7;
+ }
+
+ /**
+ * Make CREATE/RENAME compatible option params
+ *
+ * @param array $options options to format
+ * @return string Returns a string for formatted parameters
+ *
+ * @access private
+ * @since 1.1
+ */
+ function _getCreateParams($options)
+ {
+ $args = "";
+ if(is_null($options) === false && is_array($options) === true) {
+ foreach($options as $opt => $data) {
+ switch(strtoupper($opt)) {
+ case "PARTITION":
+ $args .= sprintf(" %s",$this->utf_7_encode($data));
+ break;
+ default:
+ // ignore any unknown options
+ break;
+ }
+ }
+ }
+ return $args;
+ }
+
+ /**
+ * Return true if the TLS negotiation was successful
+ *
+ * @access public
+ * @return mixed true on success, PEAR_Error on failure
+ */
+ function cmdStartTLS()
+ {
+ if (PEAR::isError($res = $this->_genericCommand("STARTTLS"))) {
+ return $res;
+ }
+
+ if(stream_socket_enable_crypto($this->_socket->fp, true, STREAM_CRYPTO_METHOD_TLS_CLIENT) == false) {
+ $msg = 'Failed to establish TLS connection';
+ return new PEAR_Error($msg);
+ }
+
+ if($this->_debug === true) {
+ echo "STARTTLS Negotiation Successful\n";
+ }
+
+ // RFC says we need to query the server capabilities again
+ if(PEAR::isError($res = $this->cmdCapability() )) {
+ $msg = 'Failed to connect, server said: ' . $res->getMessage();
+ return new PEAR_Error($msg);
+ }
+ return true;
+ }
+
+ function _getLineLength($string)
+ {
+ if (extension_loaded('mbstring')) {
+ return mb_strlen($string,'latin1');
+ } else {
+ return strlen($string);
+ }
+ }
+
+ function _getSubstr($string, $start, $length = false)
+ {
+ if (extension_loaded('mbstring')) {
+ if($length !== false) {
+ return mb_substr($string, $start, $length, 'latin1');
+ } else {
+ $strlen = mb_strlen($string,'latin1');
+ return mb_substr($string, $start, $strlen, 'latin1');
+ }
+ } else {
+ if($length !== false) {
+ return substr($string, $start, $length);
+ } else {
+ return substr($string, $start);
+ }
+ }
+ }
+
+}//Class
+?>
diff --git a/dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.0.3-r2 b/dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.0.3-r2
new file mode 100644
index 0000000..70922b8
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.0.3-r2
@@ -0,0 +1,3 @@
+MD5 4f2f821cf1edb68533c62f8eb7acbde9 Net_IMAP-1.0.3.tgz 27192
+RMD160 d62d38754678165b47b564ea95d74850e77fe512 Net_IMAP-1.0.3.tgz 27192
+SHA256 9b89d403db3e065ec0910aa2ede70ed84131f4086eece9ebbb9572858ca5baab Net_IMAP-1.0.3.tgz 27192
diff --git a/dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.1.0_beta1 b/dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.1.0_beta1
new file mode 100644
index 0000000..e4c3f57
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/files/digest-PEAR-Net_IMAP-1.1.0_beta1
@@ -0,0 +1,3 @@
+MD5 bf14c3f1816417a5a22abf8ef506dfb2 Net_IMAP-1.1.0beta1.tgz 35776
+RMD160 0d98086f7946cf1ef4ecf4413f77bbf50336ac7f Net_IMAP-1.1.0beta1.tgz 35776
+SHA256 7ffe6985881258fc66dc22d1fca87727b1b69ebf38594fe578265243d2093631 Net_IMAP-1.1.0beta1.tgz 35776
diff --git a/dev-php/PEAR-Net_IMAP/files/imap-logout.patch b/dev-php/PEAR-Net_IMAP/files/imap-logout.patch
new file mode 100644
index 0000000..0d010c6
--- /dev/null
+++ b/dev-php/PEAR-Net_IMAP/files/imap-logout.patch
@@ -0,0 +1,23 @@
+--- IMAPProtocol.php~ 2006-03-14 10:24:38.000000000 +0100
++++ IMAPProtocol.php 2006-03-14 10:47:35.000000000 +0100
+@@ -699,9 +699,9 @@
+ return new PEAR_Error('socket disconnect failed');
+ }
+
+- return $args;
++ //return $args;
+ // not for now
+- //return $this->_genericImapResponseParser($args,$cmdid);
++ return $this->_genericImapResponseParser($args,$cmdid);
+
+ }
+
+@@ -2706,7 +2706,7 @@
+ */
+
+ $str_line = rtrim( substr( $this->_getToEOL( $str , false ) , 1 ) );
+- $result_array[] = array( "COMMAND"=>$command , "EXT"=> $str_line );
++ $result_array[] = array( "COMMAND"=>$token , "EXT"=> $str_line );
+ return $result_array;
+ break;
+
diff --git a/dev-php/horde-framework-kolab/ChangeLog b/dev-php/horde-framework-kolab/ChangeLog
new file mode 100644
index 0000000..5fb04fa
--- /dev/null
+++ b/dev-php/horde-framework-kolab/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for dev-php/horde-framework-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 15 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch,
+ +files/HK-GW-No_ldap_extension-3.2_ALPHA.patch,
+ +files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch,
+ +files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch,
+ +files/HK-GW-Share_caching-3.2_ALPHA.patch, ++,
+ -horde-framework-kolab-3.2_ALPHA.ebuild:
+ Updated to the last Horde release.
+
diff --git a/dev-php/horde-framework-kolab/Manifest b/dev-php/horde-framework-kolab/Manifest
new file mode 100644
index 0000000..93980cf
--- /dev/null
+++ b/dev-php/horde-framework-kolab/Manifest
@@ -0,0 +1,36 @@
+AUX HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch 971 RMD160 6dbcf1da9f6a3749f4bd3e2b9abe4af822c3c90a SHA1 0eebbd328ca510c49afc94e3b05ab1acef689d7b SHA256 d743cfc25139d2d57ebc8f88644dd818f83a8736d0c5c4a60f50fc828ca13130
+MD5 23251a2a5cd86688aef9b50d6a2d51e9 files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch 971
+RMD160 6dbcf1da9f6a3749f4bd3e2b9abe4af822c3c90a files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch 971
+SHA256 d743cfc25139d2d57ebc8f88644dd818f83a8736d0c5c4a60f50fc828ca13130 files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch 971
+AUX HK-GW-Fix_annotation_use-3.2_ALPHA.patch 2519 RMD160 87cb5a19177743534ba4c7042c0aaec3886f9ddd SHA1 0e684d6215700ccc5d639c99961f5cb5e82e63d3 SHA256 99d38971731f0fb9aed73b9b564f3d7c761e598fc04f790846825742202b21ec
+MD5 46e9ca06b433e706fad8ec8b3d405672 files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch 2519
+RMD160 87cb5a19177743534ba4c7042c0aaec3886f9ddd files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch 2519
+SHA256 99d38971731f0fb9aed73b9b564f3d7c761e598fc04f790846825742202b21ec files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch 2519
+AUX HK-GW-Fix_the_share_params-3.2_ALPHA.patch 1278 RMD160 bcf64bfe652600189105d009d7545072f6279e25 SHA1 bade96f596dcbdff82394927b404d021be32b97e SHA256 74aa40994eb00be6cf9f46a20e06ce84bf9188f8f93c2d3895df71a9541219b1
+MD5 c97c0cf9a4db82e92a4a2b24facbb20d files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch 1278
+RMD160 bcf64bfe652600189105d009d7545072f6279e25 files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch 1278
+SHA256 74aa40994eb00be6cf9f46a20e06ce84bf9188f8f93c2d3895df71a9541219b1 files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch 1278
+AUX HK-GW-No_ldap_extension-3.2_ALPHA.patch 1094 RMD160 d4267f4fbe3d13c26e5ebf41d0d0d4cc78a84689 SHA1 b598d7e1c26027546f975e8a9f85b1b58ed6028d SHA256 214f9266316a5755acf937f7c760140569656e3c5fcd4e3e60684569d868ce3b
+MD5 4f9920a97c234f3a83674007caac1bd7 files/HK-GW-No_ldap_extension-3.2_ALPHA.patch 1094
+RMD160 d4267f4fbe3d13c26e5ebf41d0d0d4cc78a84689 files/HK-GW-No_ldap_extension-3.2_ALPHA.patch 1094
+SHA256 214f9266316a5755acf937f7c760140569656e3c5fcd4e3e60684569d868ce3b files/HK-GW-No_ldap_extension-3.2_ALPHA.patch 1094
+AUX HK-GW-Share_caching-3.2_ALPHA.patch 10843 RMD160 1c7c655822aa956ca5744df2b21f12e36d635206 SHA1 80724ea797bf76b980e9db33f7a210b2bce3a6e2 SHA256 a8fc5eadca6b69c46e884ec5e08a376328004758bb6f9c305a018837318de46d
+MD5 899377da477c6b61c1c0484a9fd9b61a files/HK-GW-Share_caching-3.2_ALPHA.patch 10843
+RMD160 1c7c655822aa956ca5744df2b21f12e36d635206 files/HK-GW-Share_caching-3.2_ALPHA.patch 10843
+SHA256 a8fc5eadca6b69c46e884ec5e08a376328004758bb6f9c305a018837318de46d files/HK-GW-Share_caching-3.2_ALPHA.patch 10843
+DIST horde-framework-3.2_ALPHA.tar.bz2 1039078 RMD160 604b9081308b60827977ad0406546d232073e07e SHA1 19290ab3827c6642e4ad175f8bcf847be727de41 SHA256 2c4319e2ed7147519c2eabcbc4bc042e2e08b2f2d24fc10f281a6e1135d1ebeb
+EBUILD horde-framework-kolab-3.2_alpha.ebuild 2051 RMD160 4511f148e9e14e6d401db800aec18405aaba4b1f SHA1 1cb2559d049c22659610e1e89a26cc86a8f1ea6d SHA256 3f5607f7bbfa59653e01f0639c77f5576856d39c082ef9076af008c4a6ad1581
+MD5 5a0a83b9297b56845563119c70178f2d horde-framework-kolab-3.2_alpha.ebuild 2051
+RMD160 4511f148e9e14e6d401db800aec18405aaba4b1f horde-framework-kolab-3.2_alpha.ebuild 2051
+SHA256 3f5607f7bbfa59653e01f0639c77f5576856d39c082ef9076af008c4a6ad1581 horde-framework-kolab-3.2_alpha.ebuild 2051
+MISC ChangeLog 515 RMD160 73c1bf0b8f3169c8c0bfa4e8a9b39b7f9f33b511 SHA1 cae8fd2fff9dc0fd7a8b6ad2a0bd9e6837457b07 SHA256 77cb4d8735d067da1a2026bec1078f9aea1742e22347ef973457e087909e62a5
+MD5 4bfc419bcc58470bf25f725343127e4f ChangeLog 515
+RMD160 73c1bf0b8f3169c8c0bfa4e8a9b39b7f9f33b511 ChangeLog 515
+SHA256 77cb4d8735d067da1a2026bec1078f9aea1742e22347ef973457e087909e62a5 ChangeLog 515
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 92f8b694b0511a90d36c52a4e2fed900 files/digest-horde-framework-kolab-3.2_alpha 283
+RMD160 6e9f37814f7ec5b05d327009ff2b4c50c512fb1c files/digest-horde-framework-kolab-3.2_alpha 283
+SHA256 7f032d0ed01e47891c8f0c355ba985a0455453745e6187ca6547abf909ee4a8b files/digest-horde-framework-kolab-3.2_alpha 283
diff --git a/dev-php/horde-framework-kolab/files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch b/dev-php/horde-framework-kolab/files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch
new file mode 100644
index 0000000..c012ab1
--- /dev/null
+++ b/dev-php/horde-framework-kolab/files/HK-GW-Fix_Prefs_for_Ingo-3.2_ALPHA.patch
@@ -0,0 +1,21 @@
+This patch is required if you want to use Ingo with the Kolab server.
+
+diff -r f70aff109444 framework/Prefs/Prefs/kolab.php
+--- a/framework/Prefs/Prefs/kolab.php Tue Sep 25 11:52:12 2007 +0200
++++ b/framework/Prefs/Prefs/kolab.php Tue Sep 25 11:53:21 2007 +0200
+@@ -1,5 +1,6 @@
+ <?php
+
++require_once 'Horde/Auth.php';
+ require_once 'Horde/Prefs/ldap.php';
+ require_once 'Horde/Kolab.php';
+
+@@ -38,6 +39,8 @@ class Prefs_kolab extends Prefs_ldap {
+ 'version' => '3',
+ 'basedn' => $GLOBALS['conf']['kolab']['ldap']['basedn'],
+ 'fetchdn' => true,
++ 'username' => Auth::getAuth(),
++ 'password' => Auth::getCredential('password'),
+ 'searchdn' => $GLOBALS['conf']['kolab']['ldap']['phpdn'],
+ 'searchpass' => $GLOBALS['conf']['kolab']['ldap']['phppw'],
+ 'uid' => array('mail', 'uid'));
diff --git a/dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch b/dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch
new file mode 100644
index 0000000..f4d66a2
--- /dev/null
+++ b/dev-php/horde-framework-kolab/files/HK-GW-Fix_annotation_use-3.2_ALPHA.patch
@@ -0,0 +1,57 @@
+Move to better IMAP annotation entries.
+
+diff -r 47e8cc47adcf framework/Kolab/Kolab/IMAP.php
+--- a/framework/Kolab/Kolab/IMAP.php Wed Oct 03 19:30:01 2007 +0200
++++ b/framework/Kolab/Kolab/IMAP.php Wed Oct 03 19:33:53 2007 +0200
+@@ -31,6 +31,11 @@ require_once 'Horde/MIME/Structure.php';
+ * that are used by Kolab clients.
+ */
+ define('KOLAB_ANNOT_ROOT', '/vendor/kolab/');
++
++/**
++ * The root of the Horde annotation hierarchy on the IMAP server
++ */
++define('HORDE_ANNOT_ROOT', '/vendor/horde/');
+
+ /**
+ * The annotation, as defined by the Kolab format spec, that is used to store
+diff -r 47e8cc47adcf framework/Share/Share/kolab.php
+--- a/framework/Share/Share/kolab.php Wed Oct 03 19:30:01 2007 +0200
++++ b/framework/Share/Share/kolab.php Wed Oct 03 19:33:53 2007 +0200
+@@ -11,7 +11,7 @@ require_once 'Horde/Kolab.php';
+ /**
+ * Horde-specific annotations on the imap folder have this prefix.
+ */
+-define('KOLAB_ANNOT_SHARE_ATTR', KOLAB_ANNOT_ROOT . 'h-share-attr-');
++define('HORDE_ANNOT_SHARE_ATTR', HORDE_ANNOT_ROOT . 'share-');
+
+ /**
+ * Marks a share without a name. These shares are still invalid
+@@ -1000,7 +1000,12 @@ class ImapObject_Share {
+ function getAttribute($attribute)
+ {
+ $imap = &$this->_storage->getImap();
+- $annotation = $imap->getAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, 'value.shared', $this->_folder);
++ if ($attribute == 'desc') {
++ $entry = '/comment';
++ } else {
++ $entry = HORDE_ANNOT_SHARE_ATTR . $attribute;
++ }
++ $annotation = $imap->getAnnotation($entry, 'value.shared', $this->_folder);
+ if (is_a($annotation, 'PEAR_Error') || empty($annotation)) {
+ $annotation = '';
+ }
+@@ -1170,7 +1175,12 @@ class ImapObject_Share {
+ $imap = &$this->_storage->getImap();
+ // setAnnotation apparently does not suppoort UTF-8 nor any special characters
+ $store = base64_encode($value);
+- $result = $imap->setAnnotation(KOLAB_ANNOT_SHARE_ATTR . $attribute, array('value.shared' => $store), $this->_folder);
++ if ($attribute == 'desc') {
++ $entry = '/comment';
++ } else {
++ $entry = HORDE_ANNOT_SHARE_ATTR . $attribute;
++ }
++ $result = $imap->setAnnotation($entry, array('value.shared' => $store), $this->_folder);
+ if (is_a($result, 'PEAR_Error')) {
+ return $result;
+ }
diff --git a/dev-php/horde-framework-kolab/files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch b/dev-php/horde-framework-kolab/files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch
new file mode 100644
index 0000000..5c63849
--- /dev/null
+++ b/dev-php/horde-framework-kolab/files/HK-GW-Fix_the_share_params-3.2_ALPHA.patch
@@ -0,0 +1,30 @@
+Fixes the params array now used in turba.
+
+diff -r e60357d4352e framework/Share/Share/kolab.php
+--- a/framework/Share/Share/kolab.php Tue Oct 02 10:28:53 2007 +0200
++++ b/framework/Share/Share/kolab.php Tue Oct 02 11:47:54 2007 +0200
+@@ -1036,7 +1036,9 @@ class ImapObject_Share {
+ case 'params':
+ $params = $this->getAttribute('params');
+ if (is_a($params, 'PEAR_Error') || $params == '') {
+- $params = serialize(array('source' => 'kolab'));
++ $params = serialize(array('source' => 'kolab',
++ 'default' => $this->get('default'),
++ 'name' => $this->get('name')));
+ }
+ $this->data['params'] = $params;
+ break;
+@@ -1080,6 +1082,13 @@ class ImapObject_Share {
+ }
+ $this->data['folder'] = String::convertCharset($value, NLS::getCharset(), 'UTF7-IMAP');
+ $this->data['name'] = $this->getTitle($this->data['folder']);
++ break;
++
++ case 'params':
++ $value = unserialize($value);
++ if (isset($value['default'])) {
++ $this->data['default'] = $value['default'];
++ }
+ break;
+
+ default:
diff --git a/dev-php/horde-framework-kolab/files/HK-GW-No_ldap_extension-3.2_ALPHA.patch b/dev-php/horde-framework-kolab/files/HK-GW-No_ldap_extension-3.2_ALPHA.patch
new file mode 100644
index 0000000..b486d00
--- /dev/null
+++ b/dev-php/horde-framework-kolab/files/HK-GW-No_ldap_extension-3.2_ALPHA.patch
@@ -0,0 +1,30 @@
+Do not require the LDAP extension to be compiled into PHP.
+This patch is only required if you install Horde for Kolab on a web server that has PHP without LDAP support.
+
+diff -r 1bee7bf8dc53 framework/Kolab/Kolab.php
+--- a/framework/Kolab/Kolab.php Mon Sep 24 11:27:58 2007 +0200
++++ b/framework/Kolab/Kolab.php Tue Sep 25 11:50:19 2007 +0200
+@@ -5,9 +5,6 @@ require_once 'Horde.php';
+
+ /** We need access to the Kolab IMAP storage */
+ require_once 'Horde/Kolab/IMAP.php';
+-
+-/** We need the LDAP module for access to the Horde LDAP db */
+-require_once 'Horde/Kolab/LDAP.php';
+
+ /** We need the Kolab date functions */
+ require_once 'Horde/Kolab/Date.php';
+@@ -813,6 +810,13 @@ class Kolab {
+ */
+ function kolabMailForAlias($alias)
+ {
++ // Do not try to rewrite the alias if we do not have LDAP support
++ if (!function_exists('ldap_connect')) {
++ return $alias;
++ }
++
++ require_once 'Horde/Kolab/LDAP.php';
++
+ $kolab_ldap =& new Horde_Kolab_LDAP;
+ if (is_a($kolab_ldap, 'PEAR_Error')) {
+ return $result;
diff --git a/dev-php/horde-framework-kolab/files/HK-GW-Share_caching-3.2_ALPHA.patch b/dev-php/horde-framework-kolab/files/HK-GW-Share_caching-3.2_ALPHA.patch
new file mode 100644
index 0000000..6710321
--- /dev/null
+++ b/dev-php/horde-framework-kolab/files/HK-GW-Share_caching-3.2_ALPHA.patch
@@ -0,0 +1,325 @@
+Fixes the share caching for the Share module.
+* * *
+Fixes the global share caching.
+
+diff -r 3d04200d5eec framework/Kolab/Kolab/IMAP.php
+--- a/framework/Kolab/Kolab/IMAP.php Wed Oct 10 11:19:54 2007 +0200
++++ b/framework/Kolab/Kolab/IMAP.php Wed Oct 10 11:20:13 2007 +0200
+@@ -371,7 +371,18 @@ class Kolab_IMAP {
+ */
+ function listFolders()
+ {
+- $folders = array();
++ require_once 'Horde/SessionObjects.php';
++
++ static $folders = array();
++
++ if (empty($folders)) {
++ $session = &Horde_SessionObjects::singleton();
++ $folders = &$session->query('horde_kolab_imaplist');
++ }
++
++ if (!empty($folders)) {
++ return $folders;
++ }
+
+ // Connect to the IMAP server
+ $imap = &Kolab_IMAP_Connection::singleton(Kolab::getServer('imap'),
+@@ -417,6 +428,9 @@ class Kolab_IMAP {
+
+ $folders[] = array($folder, $foldertype, $default);
+ }
++
++ $session = &Horde_SessionObjects::singleton();
++ $session->overwrite('horde_kolab_imaplist', $folders, false);
+
+ $imap->disconnect();
+
+diff -r 3d04200d5eec framework/Share/Share/kolab.php
+--- a/framework/Share/Share/kolab.php Wed Oct 10 11:19:54 2007 +0200
++++ b/framework/Share/Share/kolab.php Wed Oct 10 11:20:13 2007 +0200
+@@ -66,6 +66,38 @@ class Horde_Share_kolab extends Horde_Sh
+ }
+
+ /**
++ * Initializes the object.
++ */
++ function __wakeup()
++ {
++ global $conf;
++
++ if (empty($conf['kolab']['enabled'])) {
++ Horde::fatal('You must enable the kolab settings to use the Kolab Share driver.', __FILE__, __LINE__);
++ }
++
++ foreach (array_keys($this->_cache) as $name) {
++ $this->_cache[$name]->setShareOb($this);
++ $this->_cache[$name]->storageObject->setStorage($this->_storage);
++ }
++
++ parent::__wakeup();
++ }
++
++ /**
++ * Returns the properties that need to be serialized.
++ *
++ * @return array List of serializable properties.
++ */
++ function __sleep()
++ {
++ $properties = get_object_vars($this);
++ unset($properties['_sortList']);
++ $properties = array_keys($properties);
++ return $properties;
++ }
++
++ /**
+ * Returns an array of all shares that $userid has access to.
+ *
+ * @param string $userid The userid of the user to check access for.
+@@ -242,7 +274,14 @@ class Horde_Share_Storage_kolab {
+ function Horde_Share_Storage_kolab($app)
+ {
+ $this->_app = $app;
+-
++ return $this->__wakeup();
++ }
++
++ /**
++ * Initializes the object.
++ */
++ function __wakeup()
++ {
+ // Connect to the IMAP server
+ $this->_imap = &Kolab_IMAP_Connection::singleton(Kolab::getServer('imap'),
+ $GLOBALS['conf']['kolab']['imap']['port'],
+@@ -254,6 +293,19 @@ class Horde_Share_Storage_kolab {
+ if (is_a($result, 'PEAR_Error')) {
+ return $result;
+ }
++ }
++
++ /**
++ * Returns the properties that need to be serialized.
++ *
++ * @return array List of serializable properties.
++ */
++ function __sleep()
++ {
++ $properties = get_object_vars($this);
++ unset($properties['_imap']);
++ $properties = array_keys($properties);
++ return $properties;
+ }
+
+ /**
+@@ -363,10 +415,12 @@ class Horde_Share_Storage_kolab {
+ * @param string $object The share to fetch.
+ * @param string $class Subclass of Horde_Share_Object to use. Defaults
+ * to ImapObject_Share.
++ * @param array $perms The permissions of the share if known
++ *
+ * @return Horde_Share_Object_kolab The share object or a PEAR error if
+ * the share was not found.
+ */
+- function &getObject($object, $class = 'ImapObject_Share')
++ function &getObject($object, $class = 'ImapObject_Share', $perms = null)
+ {
+ if (empty($object)) {
+ $error = PEAR::raiseError('No object requested.');
+@@ -399,14 +453,17 @@ class Horde_Share_Storage_kolab {
+ $object = $this->getDefaultShare();
+ }
+
+- $share->setFolder($object);
+- $result = $share->accessible();
+- if (is_a($result, 'PEAR_Error')) {
+- return $result;
+- }
+- if (!$result) {
+- return PEAR::raiseError(sprintf(_("Share \"%s\" not accessible."), $object));
+- }
++ $share->setFolder($object, $perms);
++ /* FIXME: Is this call necessary at all? You should try to access a share that
++ * cannot be accessed and see what happens.
++ *$result = $share->accessible();
++ *if (is_a($result, 'PEAR_Error')) {
++ *return $result;
++ *}
++ *if (!$result) {
++ *return PEAR::raiseError(sprintf(_("Share \"%s\" not accessible."), $object));
++ *}
++ */
+ return $share;
+ }
+
+@@ -689,6 +746,19 @@ class Horde_Share_Object_kolab extends H
+ class Horde_Share_Object_kolab extends Horde_Share_Object {
+
+ /**
++ * Returns the properties that need to be serialized.
++ *
++ * @return array List of serializable properties.
++ */
++ function __sleep()
++ {
++ $properties = get_object_vars($this);
++ unset($properties['_shareOb']);
++ $properties = array_keys($properties);
++ return $properties;
++ }
++
++ /**
+ * Checks to see if a user has a given permission.
+ *
+ * @param string $userid The userid of the user.
+@@ -803,6 +873,19 @@ class ImapObject_Share {
+ }
+
+ /**
++ * Returns the properties that need to be serialized.
++ *
++ * @return array List of serializable properties.
++ */
++ function __sleep()
++ {
++ $properties = get_object_vars($this);
++ unset($properties['_storage']);
++ $properties = array_keys($properties);
++ return $properties;
++ }
++
++ /**
+ * Sets the storage driver for this storage object.
+ *
+ * @param Horde_Share_Storage_kolab $storage A {@link Horde_Share_storage_kolab} instance.
+@@ -810,6 +893,10 @@ class ImapObject_Share {
+ function setStorage(&$storage)
+ {
+ $this->_storage = &$storage;
++ if (isset($this->_perm)) {
++ $imap = &$storage->getImap();
++ $this->_perm->setImap($imap);
++ }
+ }
+
+ /**
+@@ -817,25 +904,29 @@ class ImapObject_Share {
+ *
+ * @param string $folder Name of the IMAP folder.
+ * @param boolean $force Enforce setting the folder.
+- */
+- function setFolder($folder, $force = false)
++ * @param array $perms The permissions of the folder if they are known
++ */
++ function setFolder($folder, $force = false, $perms = null)
+ {
+ if ($this->_folder == KOLAB_SHARE_INVALID || $force) {
+ $this->_folder = $folder;
+ if (isset($this->_perm)) {
+ $this->_perm->setFolder($folder);
+ } else {
+- if ($this->exists()) {
+- $perms = null;
+- } else {
+- $perms = array('users' => array(Auth::getAuth() => PERMS_SHOW
+- | PERMS_READ
+- | PERMS_EDIT
+- | PERMS_DELETE));
++ if (empty($perms)) {
++ if ($this->exists()) {
++ // The permissions are unknown but the folder exists -> discover permissions
++ $perms = null;
++ } else {
++ $perms = array('users' => array(Auth::getAuth() => PERMS_SHOW
++ | PERMS_READ
++ | PERMS_EDIT
++ | PERMS_DELETE));
++ }
+ }
+ $perm = &new ImapFolder_Permission($folder,
+ $this->_storage->getImap(),
+- $this, $perms);
++ $this->getOwner(), $perms);
+ $this->setPermission($perm);
+ }
+ }
+@@ -1265,11 +1356,11 @@ class ImapFolder_Permission extends Data
+ var $data;
+
+ /**
+- * The storage driver for this object.
+- *
+- * @var Horde_Share_Storage_kolab
+- */
+- var $_storage;
++ * Owner of the share.
++ *
++ * @var string
++ */
++ var $_owner;
+
+ /**
+ * The ImapFolder_Permission constructor.
+@@ -1280,11 +1371,11 @@ class ImapFolder_Permission extends Data
+ * @param Horde_Storage $storage A reference to the storage class
+ * @param array $perms A set of initial permissions.
+ */
+- function ImapFolder_Permission($folder, &$imap, &$storage, $perms = null)
++ function ImapFolder_Permission($folder, &$imap, $owner, $perms = null)
+ {
+ $this->_folder = $folder;
+ $this->_imap = &$imap;
+- $this->_storage = &$storage;
++ $this->_owner = $owner;
+
+ // Load the permission from the folder now
+ if (empty($perms)) {
+@@ -1296,6 +1387,29 @@ class ImapFolder_Permission extends Data
+ }
+
+ $this->data = $perms;
++ }
++
++ /**
++ * Returns the properties that need to be serialized.
++ *
++ * @return array List of serializable properties.
++ */
++ function __sleep()
++ {
++ $properties = get_object_vars($this);
++ unset($properties['_imap']);
++ $properties = array_keys($properties);
++ return $properties;
++ }
++
++ /**
++ * Sets the imap driver for this permission object.
++ *
++ * @param
++ */
++ function setImap(&$imap)
++ {
++ $this->_imap = &$imap;
+ }
+
+ /**
+@@ -1405,6 +1519,8 @@ class ImapFolder_Permission extends Data
+ */
+ function save()
+ {
++ // FIXME: If somebody else accessed the folder before us, we will overwrite
++ // the change here.
+ $current = $this->getPerm();
+
+ foreach ($this->data as $user => $user_perms) {
+@@ -1482,7 +1598,7 @@ class ImapFolder_Permission extends Data
+ function savePermission($user, $perms)
+ {
+ // Convert the horde permission style to IMAP permissions
+- $result = $user == $this->_storage->getOwner() ? 'a' : '';
++ $result = $user == $this->_owner ? 'a' : '';
+ if ($perms & PERMS_SHOW) {
+ $result .= 'l';
+ }
diff --git a/dev-php/horde-framework-kolab/files/digest-horde-framework-kolab-3.2_alpha b/dev-php/horde-framework-kolab/files/digest-horde-framework-kolab-3.2_alpha
new file mode 100644
index 0000000..85c3e22
--- /dev/null
+++ b/dev-php/horde-framework-kolab/files/digest-horde-framework-kolab-3.2_alpha
@@ -0,0 +1,3 @@
+MD5 b7e04a02e55a3e4eed83a6a15db96a41 horde-framework-3.2_ALPHA.tar.bz2 1039078
+RMD160 604b9081308b60827977ad0406546d232073e07e horde-framework-3.2_ALPHA.tar.bz2 1039078
+SHA256 2c4319e2ed7147519c2eabcbc4bc042e2e08b2f2d24fc10f281a6e1135d1ebeb horde-framework-3.2_ALPHA.tar.bz2 1039078
diff --git a/dev-php/horde-framework-kolab/horde-framework-kolab-3.2_alpha.ebuild b/dev-php/horde-framework-kolab/horde-framework-kolab-3.2_alpha.ebuild
new file mode 100644
index 0000000..4ab3e0e
--- /dev/null
+++ b/dev-php/horde-framework-kolab/horde-framework-kolab-3.2_alpha.ebuild
@@ -0,0 +1,137 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils php-pear-manylibs-r1
+
+MY_PN=${PN/-kolab/}
+MY_PV=${PV/alpha/ALPHA}
+MY_P=${MY_PN}-${MY_PV}
+
+DESCRIPTION="Horde Application Framework"
+HOMEPAGE="http://www.horde.org/"
+SRC_URI="http://build.pardus.de/downloads/${MY_P}.tar.bz2"
+
+LICENSE="LGPL-2"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE=""
+
+S=${WORKDIR}/framework
+
+HORDE_PHP_FEATURES="imap ldap nls session xml"
+
+PEAR_PACKAGES="
+admintools
+Alarm
+Auth
+Block
+Browser
+Cache
+Cipher
+CLI
+Compress
+Crypt
+Data
+DataTree
+Date
+devtools
+DOM
+Editor
+Feed
+File_CSV
+File_PDF
+Form
+Group
+History
+Horde
+Http_Client
+iCalendar
+Image
+IMAP
+Kolab
+LDAP
+Maintenance
+Memcache
+MIME
+Mobile
+Net_IMSP
+Net_SMS
+NLS
+Notification
+Perms
+Prefs
+Rdo
+RPC
+Scheduler
+Secret
+Serialize
+SessionHandler
+SessionObjects
+Share
+SpellChecker
+SQL
+SyncML
+Template
+Template_Compiling
+Text_Diff
+Text_Filter
+Text_Flowed
+Text_reST
+Token
+Tree
+UI
+Util
+VC
+VFS
+VFS_ISOWriter
+View
+Xml_Element
+XML_WBXML
+Yaml
+"
+
+RDEPEND="${RDEPEND}
+!dev-php/horde
+!dev-php/horde-framework-cvs
+dev-php/PEAR-Horde-Channel
+"
+
+
+pkg_setup() {
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ if [[ ${parm} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+}
+
+src_unpack() {
+
+ unpack ${A} && cd "${S}"
+
+ for PATCH in ${FILESDIR}/*-${MY_PV}.patch
+ do
+ epatch ${PATCH}
+ done
+}
+
+pkg_postinst() {
+ einfo "Horde requires PHP to have:"
+ einfo " ==> 'short_open_tag enabled = On'"
+ einfo " ==> 'magic_quotes_runtime set = Off'"
+ einfo " ==> 'file_uploads enabled = On'"
+ einfo "Please edit /etc/php/apache2-php5/php.ini"
+}
diff --git a/dev-php/horde-framework-kolab/metadata.xml b/dev-php/horde-framework-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/dev-php/horde-framework-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/eclass/horde-kolab-r1.eclass b/eclass/horde-kolab-r1.eclass
new file mode 100644
index 0000000..1891b73
--- /dev/null
+++ b/eclass/horde-kolab-r1.eclass
@@ -0,0 +1,119 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit eutils
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+SRC_URI="http://build.pardus.de/downloads/${P}.tar.gz"
+S=${WORKDIR}/${HORDE_PN}
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab-r1_pkg_setup() {
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+}
+
+horde-kolab-r1_src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ [[ -f test.php ]] && chmod 000 test.php
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+
+ for f in *.dist; do cp $f `basename $f .dist`; done
+
+ if [[ -n ${HORDE_KOLAB_CONFIG} ]]; then
+ for FILE in ${HORDE_KOLAB_CONFIG}
+ do
+ cp ${FILESDIR}/${FILE} ${FILE/_${P}.config/}
+ done
+ fi
+
+ cd ..
+}
+
+horde-kolab-r1_src_install() {
+
+ local destdir=/var/www/kolab/htdocs/horde
+ [[ ${HORDE_PN} != "horde" ]] && destdir=/var/www/kolab/htdocs/horde/${HORDE_PN}
+ [[ -n ${HORDE_BASEDIR} ]] && destdir=/var/www/kolab/htdocs/horde${HORDE_BASEDIR}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+ mv docs/CREDITS "${T}"/
+ rm -rf COPYING LICENSE README docs/*
+ mv "${T}"/CREDITS docs/
+
+ dodir ${destdir}
+ cp -r . ${D}/${destdir}/ || die "install files"
+
+ chown -R apache\: ${D}/${destdir}/config
+
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ insinto /etc/kolab/templates
+ doins ${HORDE_KOLAB_TEMPLATES}
+ fi
+
+}
+
+horde-kolab-r1_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ einfo
+ einfo "This package adds configuration templates into /etc/kolab/templates."
+ elog "After installing/updating this package you MUST run kolabconf!"
+ fi
+}
diff --git a/eclass/horde-kolab-r2.eclass b/eclass/horde-kolab-r2.eclass
new file mode 100644
index 0000000..10ad173
--- /dev/null
+++ b/eclass/horde-kolab-r2.eclass
@@ -0,0 +1,125 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit eutils
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+SRC_DATE="${PV:0:4}-${PV:4:2}-${PV:6:2}"
+
+SRC_URI="http://build.pardus.de/downloads/${HORDE_PN}-HEAD-${SRC_DATE}.tar.gz"
+S=${WORKDIR}/${HORDE_PN}
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+SLOT="0"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab-r2_pkg_setup() {
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+}
+
+horde-kolab-r2_src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ [[ -f test.php ]] && chmod 000 test.php
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+
+ for f in *.dist; do cp $f `basename $f .dist`; done
+
+ if [[ -n ${HORDE_KOLAB_CONFIG} ]]; then
+ for FILE in ${HORDE_KOLAB_CONFIG}
+ do
+ cp ${FILESDIR}/${FILE} ${FILE/_${P}.config/}
+ done
+ fi
+
+ cd ..
+}
+
+horde-kolab-r2_src_install() {
+
+ local destdir=/var/www/kolab/htdocs/horde
+ [[ ${HORDE_PN} != "horde" ]] && destdir=/var/www/kolab/htdocs/horde/${HORDE_PN}
+ [[ -n ${HORDE_BASEDIR} ]] && destdir=/var/www/kolab/htdocs/horde${HORDE_BASEDIR}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+ mv docs/CREDITS "${T}"/
+ rm -rf COPYING LICENSE README docs/*
+ mv "${T}"/CREDITS docs/
+
+ dodir ${destdir}
+ cp -r . ${D}/${destdir}/ || die "install files"
+
+ chown -R apache\: ${D}/${destdir}/config
+
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ dodir /etc/kolab/templates
+ for TEMPLATE in ${HORDE_KOLAB_TEMPLATES}
+ do
+ cp ${FILESDIR}/${TEMPLATE} ${D}/etc/kolab/templates/${TEMPLATE/-${PV}/}
+ done
+ fi
+
+}
+
+horde-kolab-r2_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ einfo
+ einfo "This package adds configuration templates into /etc/kolab/templates."
+ elog "After installing/updating this package you MUST run kolabconf!"
+ fi
+}
diff --git a/eclass/horde-kolab-r4.eclass b/eclass/horde-kolab-r4.eclass
new file mode 100644
index 0000000..862505f
--- /dev/null
+++ b/eclass/horde-kolab-r4.eclass
@@ -0,0 +1,221 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit webapp eutils
+[[ ${PN} != ${PN/-cvs} ]] && inherit cvs
+
+IUSE="vhosts"
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+EHORDE_CVS="false"
+EHORDE_SNAP="false"
+if [[ ${PN} != ${PN/-cvs} ]] ; then
+ EHORDE_CVS="true"
+ HORDE_PN=${HORDE_PN/-cvs}
+
+ ECVS_SERVER="anoncvs.horde.org:/repository"
+ ECVS_MODULE="${HORDE_PN}"
+ ECVS_TOP_DIR="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cvs-src/${PN}"
+ ECVS_USER="cvsread"
+ ECVS_PASS="horde"
+
+ SRC_URI=""
+ S=${WORKDIR}/${HORDE_PN}
+
+elif [[ ${PN} != ${PN/-snap} ]] ; then
+ EHORDE_SNAP="true"
+ EHORDE_SNAP_BRANCH=${EHORDE_SNAP_BRANCH:-HEAD}
+ SNAP_PV=${PV:0:4}-${PV:4:2}-${PV:6:2}
+
+ HORDE_PN=${HORDE_PN/-snap}
+
+ SRC_URI="http://ftp.horde.org/pub/snaps/${SNAP_PV}/${HORDE_PN}-${EHORDE_SNAP_BRANCH}-${SNAP_PV}.tar.gz"
+ S=${WORKDIR}/${HORDE_PN}
+
+else
+ SRC_URI="http://ftp.horde.org/pub/${HORDE_PN}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}.tar.gz"
+ S=${WORKDIR}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}
+fi
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab-r4_pkg_setup() {
+ webapp_pkg_setup
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+
+ if use kolab && ! use vhosts ; then
+ ewarn "You are installing Horde for Kolab and disabled the \"vhosts\""
+ ewarn "USE flag. This is not recommended since Horde will end up"
+ ewarn "in /var/www/localhost rather than /var/www/kolab. You should"
+ ewarn "use this combination of USE flags only if you know what"
+ ewarn "you are doing."
+ fi
+}
+
+horde-kolab-r4_src_unpack() {
+ if [[ ${EHORDE_CVS} = "true" ]] ; then
+ cvs_src_unpack
+ else
+ unpack ${A}
+ fi
+ cd "${S}"
+
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+
+ for f in *.dist; do cp $f `basename $f .dist`; done
+
+ if use kolab ; then
+ if [[ -n ${HORDE_KOLAB_CONFIG} ]]; then
+ for FILE in ${HORDE_KOLAB_CONFIG}
+ do
+ cp "${FILESDIR}"/${FILE} ${FILE/_${PV}.config/}
+ done
+ fi
+ fi
+
+ cd ..
+}
+
+horde-kolab-r4_src_install() {
+ webapp_src_preinst
+
+ local destdir=${MY_HTDOCSDIR}
+ local my_d="${D}"/${destdir}/
+
+ # Work-around when dealing with CVS sources
+ [[ ${EHORDE_CVS} = "true" ]] && cd ${HORDE_PN}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+
+ dodir ${destdir}
+
+ if use kolab ; then
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ dodir /etc/kolab/templates
+ for TEMPLATE in ${HORDE_KOLAB_TEMPLATES}
+ do
+ cp "${FILESDIR}"/${TEMPLATE} "${D}"/etc/kolab/templates/${TEMPLATE/-${PV}/}
+ done
+ fi
+ fi
+
+ cp -r . "${my_d}" || die "install files"
+ mv "${my_d}"/docs/CREDITS "${T}"/
+ rm -rf "${my_d}"/COPYING "${my_d}"/LICENSE "${my_d}"/README "${my_d}"/docs/*
+ mv "${T}"/CREDITS "${my_d}"/docs/
+
+ [[ -f "${my_d}"/test.php ]] && rm "${my_d}"/test.php
+
+ webapp_serverowned "${MY_HTDOCSDIR}"/config
+
+ webapp_src_install
+}
+
+horde-kolab-r4_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ if ! use kolab; then
+ einfo "Before this package will work, you have to finalize"
+ einfo "the configuration files. Please review the"
+ einfo "config/ subdirectory of ${HORDE_PN} in the webroot."
+ if [[ ${HORDE_PN} != "horde" ]] ; then
+ ewarn
+ ewarn "Make sure ${HORDE_PN} is accounted for in horde's root"
+ ewarn " config/registry.php"
+ fi
+ fi
+ if [[ ${EHORDE_CVS} = "true" ]] ; then
+ ewarn
+ ewarn "Use these CVS versions at your own risk."
+ ewarn "They tend to break things when working with"
+ ewarn "the non CVS versions of horde."
+ fi
+ if use vhosts ; then
+ echo
+ ewarn "When installing horde into a vhost dir, you will"
+ ewarn "need to use the -d option so that it is installed"
+ ewarn "into the proper location."
+ if use kolab ; then
+ echo
+ ewarn "In order to install Horde for Kolab you are advised"
+ ewarn "to install the Horde packages into the host \"kolab\""
+ ewarn "by using the option \"-h kolab\" when installing the"
+ ewarn "Horde packages with webapp-config."
+ ewarn "Install the base horde package with"
+ ewarn
+ ewarn "webapp-config -I -h kolab -d horde horde-kolab VERSION"
+ ewarn
+ ewarn "followed by"
+ ewarn
+ ewarn "webapp-config -I -h kolab -d horde/APP APP-kolab VERSION"
+ ewarn
+ ewarn "for every other of the APPs possible (imp, turba, kronolith etc.)"
+ ewarn
+ ewarn "If you install into a different host or location you should"
+ ewarn "ensure that your fix you apache configuration accordingly."
+ fi
+ fi
+ if use kolab ; then
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ einfo
+ einfo "This package adds configuration templates into /etc/kolab/templates."
+ ewarn "You MUST ensure that the path to your Horde installation is correctly"
+ ewarn "set as TARGET in the template files!"
+ ewarn "After installing/updating this package you MUST run kolabconf!"
+ fi
+ fi
+ webapp_pkg_postinst
+}
diff --git a/eclass/horde-kolab.eclass b/eclass/horde-kolab.eclass
new file mode 100644
index 0000000..e5acf31
--- /dev/null
+++ b/eclass/horde-kolab.eclass
@@ -0,0 +1,112 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/horde.eclass,v 1.33 2006/03/09 23:35:52 vapier Exp $
+#
+# Help manage the horde project http://www.horde.org/
+#
+# Author: Mike Frysinger <vapier@gentoo.org>
+# CVS additions by Chris Aniszczyk <zx@mea-culpa.net>
+# SNAP additions by Jonathan Polansky <jpolansky@lsit.ucsb.edu>
+#
+# This eclass provides generic functions to make the writing of horde
+# ebuilds fairly trivial since there are many horde applications and
+# they all share the same basic install process.
+
+# EHORDE_SNAP
+# This variable tracks whether the user is using a snapshot version
+#
+# EHORDE_SNAP_BRANCH
+# You set this via the ebuild to whatever branch you wish to grab a
+# snapshot of. Typically this is 'HEAD' or 'RELENG'.
+#
+# EHORDE_CVS
+# This variable tracks whether the user is using a cvs version
+
+inherit eutils
+
+EXPORT_FUNCTIONS pkg_setup src_unpack src_install pkg_postinst
+
+[[ -z ${HORDE_PN} ]] && HORDE_PN="${PN/-kolab}" && HORDE_PN="${HORDE_PN/horde-}"
+[[ -z ${HORDE_MAJ} ]] && HORDE_MAJ=""
+
+SRC_URI="http://ftp.horde.org/pub/${HORDE_PN}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}.tar.gz"
+S=${WORKDIR}/${HORDE_PN}${HORDE_MAJ}-${PV/_/-}
+HOMEPAGE="http://www.horde.org/${HORDE_PN}"
+
+LICENSE="LGPL-2"
+
+# INSTALL_DIR is used by webapp.eclass when USE=-vhosts
+INSTALL_DIR="/horde"
+[[ ${HORDE_PN} != "horde" ]] && INSTALL_DIR="${INSTALL_DIR}/${HORDE_PN}"
+
+horde-kolab_pkg_setup() {
+
+ if [[ ! -z ${HORDE_PHP_FEATURES} ]] ; then
+ local param
+ if [[ ${HORDE_PHP_FEATURES:0:2} = "-o" ]] ; then
+ param="-o"
+ HORDE_PHP_FEATURES=${HORDE_PHP_FEATURES:2}
+ fi
+ if ! built_with_use ${param} dev-lang/php ${HORDE_PHP_FEATURES} ; then
+ echo
+ if [[ ${param} == "-o" ]] ; then
+ eerror "You MUST re-emerge php with at least one of"
+ else
+ eerror "You MUST re-emerge php with all of"
+ fi
+ eerror "the following options in your USE:"
+ eerror " ${HORDE_PHP_FEATURES}"
+ die "current php install cannot support ${HORDE_PN}"
+ fi
+ fi
+}
+
+horde-kolab_src_unpack() {
+ unpack ${A}
+
+ cd "${S}"
+ [[ -f test.php ]] && chmod 000 test.php
+ [[ -n ${EHORDE_PATCHES} ]] && epatch ${EHORDE_PATCHES}
+
+ cd config
+ for f in *.dist; do cp $f `basename $f .dist`; done
+ cd ..
+}
+
+horde-kolab_src_install() {
+
+ local destdir=/var/www/kolab/htdocs/horde
+ [[ ${HORDE_PN} != "horde" ]] && destdir=/var/www/kolab/htdocs/horde/${HORDE_PN}
+ [[ -n ${HORDE_BASEDIR} ]] && destdir=/var/www/kolab/htdocs/horde${HORDE_BASEDIR}
+
+ # Install docs and then delete them (except for CREDITS which
+ # many horde apps include in their help page #121003)
+ dodoc README docs/*
+ mv docs/CREDITS "${T}"/
+ rm -rf COPYING LICENSE README docs/*
+ mv "${T}"/CREDITS docs/
+
+ dodir ${destdir}
+ cp -r . ${D}/${destdir}/ || die "install files"
+
+ chown -R apache\: ${D}/${destdir}/config
+
+ if [[ -n ${HORDE_KOLAB_TEMPLATES} ]]; then
+ insinto /etc/kolab/templates
+ doins ${HORDE_KOLAB_TEMPLATES}
+ fi
+}
+
+horde-kolab_pkg_postinst() {
+ if [[ -e ${ROOT}/usr/share/doc/${PF}/INSTALL.gz ]] ; then
+ einfo "Please read /usr/share/doc/${PF}/INSTALL.gz"
+ fi
+ einfo "Before this package will work, you have to setup"
+ einfo "the configuration files. Please review the"
+ einfo "config/ subdirectory of ${HORDE_PN} in the webroot."
+ if [[ ${HORDE_PN} != "horde" ]] ; then
+ ewarn
+ ewarn "Make sure ${HORDE_PN} is accounted for in horde's root"
+ ewarn " config/registry.php"
+ fi
+}
diff --git a/eclass/php-pear-manylibs-r1.eclass b/eclass/php-pear-manylibs-r1.eclass
new file mode 100644
index 0000000..6b0c49c
--- /dev/null
+++ b/eclass/php-pear-manylibs-r1.eclass
@@ -0,0 +1,82 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-pear-lib-r1.eclass,v 1.9 2006/03/10 10:47:49 sebastian Exp $
+#
+# Author: Luca Longinotti <chtekk@gentoo.org>
+# Maintained by the PHP Herd <php-bugs@gentoo.org>
+#
+# Based on Tal Peer's <coredumb@gentoo.org> work on php-pear.eclass.
+#
+# The php-pear-lib-r1 eclass provides means for an easy installation of PEAR
+# based libraries, such as Creole, Jargon, Phing etc., while retaining
+# the functionality to put the libraries into version-dependant dirs.
+
+inherit depend.php
+
+EXPORT_FUNCTIONS src_install
+
+# We must depend on the base package as we need it to let
+# PEAR work, as well as PEAR itself.
+DEPEND="${DEPEND} dev-lang/php >=dev-php/PEAR-PEAR-1.3.6"
+RDEPEND="${RDEPEND} ${DEPEND}"
+
+# List the packages to install in this variable in your ebuild
+PEAR_PACKAGES=""
+
+php-pear-manylibs-r1_src_install() {
+ has_php
+
+ # SNMP support
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+
+ case "${CATEGORY}" in
+ dev-php)
+ if has_version '=dev-lang/php-5*' ; then
+ PHP_BIN="/usr/lib/php5/bin/php"
+ else
+ PHP_BIN="/usr/lib/php4/bin/php"
+ fi ;;
+ dev-php4) PHP_BIN="/usr/lib/php4/bin/php" ;;
+ dev-php5) PHP_BIN="/usr/lib/php5/bin/php" ;;
+ *) die "I don't know which version of PHP packages in ${CATEGORY} require"
+ esac
+
+ cd "${S}"
+
+ for PKG in ${PEAR_PACKAGES}
+ do
+
+ if has_version '=dev-php/PEAR-PEAR-1.3*' ; then
+ pear -d php_bin="${PHP_BIN}" install --nodeps --installroot="${D}" "${S}/${PKG}/package.xml" > /dev/null || die "Unable to install PEAR package ${PKG}"
+ else
+ if has_version '>=dev-php/PEAR-PEAR-1.4.8' ; then
+ pear -d php_bin="${PHP_BIN}" install --force --loose --nodeps --offline --packagingroot="${D}" "${S}/${PKG}/package.xml" > /dev/null || die "Unable to install PEAR package ${PKG}"
+ else
+ pear -d php_bin="${PHP_BIN}" install --nodeps --packagingroot="${D}" "${S}/${PKG}/package.xml" > /dev/null || die "Unable to install PEAR package ${PKG}"
+ fi
+ fi
+
+ rm -rf "${D}/usr/share/php/.channels" \
+ "${D}/usr/share/php/.depdblock" \
+ "${D}/usr/share/php/.depdb" \
+ "${D}/usr/share/php/.filemap" \
+ "${D}/usr/share/php/.lock" \
+ "${D}/usr/share/php/.registry"
+ done
+
+ # install to the correct phpX folder, if not specified
+ # /usr/share/php will be kept, also sedding to substitute
+ # the path, many files can specify it wrongly
+ if [ -n "${PHP_SHARED_CAT}" ] && [ "${PHP_SHARED_CAT}" != "php" ] ; then
+ mv -f "${D}/usr/share/php" "${D}/usr/share/${PHP_SHARED_CAT}" || die "Unable to move files"
+ find "${D}/" -type f -exec sed -e "s|/usr/share/php|/usr/share/${PHP_SHARED_CAT}|g" -i {} \; || die "Unable to change PHP path"
+ einfo
+ einfo "Installing to /usr/share/${PHP_SHARED_CAT} ..."
+ einfo
+ else
+ einfo
+ einfo "Installing to /usr/share/php ..."
+ einfo
+ fi
+}
diff --git a/net-libs/c-client/Manifest b/net-libs/c-client/Manifest
new file mode 100644
index 0000000..bb33062
--- /dev/null
+++ b/net-libs/c-client/Manifest
@@ -0,0 +1,24 @@
+AUX 2002d-Makefile.patch 2174 RMD160 ab95295b15a9f8cceb73a1b2431453ec1e137c0e SHA1 0e7949763126d7cb094048f187c11e249aaabddf SHA256 ff9102e5e3e1498269084ef803d73c0c21bff136b038f13ba648a4248981ca35
+MD5 c8cf618ac210e06a1641871b30550e8f files/2002d-Makefile.patch 2174
+RMD160 ab95295b15a9f8cceb73a1b2431453ec1e137c0e files/2002d-Makefile.patch 2174
+SHA256 ff9102e5e3e1498269084ef803d73c0c21bff136b038f13ba648a4248981ca35 files/2002d-Makefile.patch 2174
+AUX c-client-2004a-amd64-so-fix.patch 675 RMD160 f13adf21e7043175d2b2dd356b2ba48554e9e99f SHA1 fd6aad7b87d71795cb3e9bdee29b70ca72b289e9 SHA256 8f80dff390a5d87afd71ab07bbff0eed00acb14b3bfa2355f33ba22e833af202
+MD5 cde23dc2375a8c33998202c8f0c9ae0e files/c-client-2004a-amd64-so-fix.patch 675
+RMD160 f13adf21e7043175d2b2dd356b2ba48554e9e99f files/c-client-2004a-amd64-so-fix.patch 675
+SHA256 8f80dff390a5d87afd71ab07bbff0eed00acb14b3bfa2355f33ba22e833af202 files/c-client-2004a-amd64-so-fix.patch 675
+AUX c-client-kolab.patch 14129 RMD160 fd2569433488d879968cbfa372d586b77e0c748d SHA1 c37f2230454b3eff30bb2b9cd0a1905b0815cdca SHA256 25b5de02a2a8b6b87450bef4a5769a9274b889b5bce4b0ea1fd57290d1a434e8
+MD5 f8f185229c677ba1deabf7f00b4eb304 files/c-client-kolab.patch 14129
+RMD160 fd2569433488d879968cbfa372d586b77e0c748d files/c-client-kolab.patch 14129
+SHA256 25b5de02a2a8b6b87450bef4a5769a9274b889b5bce4b0ea1fd57290d1a434e8 files/c-client-kolab.patch 14129
+DIST imap-2004g.tar.Z 2246713 RMD160 a016a06ba073e879d2574a6395ce1074ea74c687 SHA1 791a8bb247ca51ce0a4c32e814a2f736c2bcf066 SHA256 958ab8a6a8b5a1a53167793141fe5bf1fbafc012be1d3f70a21f5f2f493ffa6d
+EBUILD c-client-2004g-r20.ebuild 2576 RMD160 53c1cf910f4ab708fe851da324ae405ed5e5c2eb SHA1 e58d6937d4f71cb2f497368eaaf650d06f50a0ae SHA256 a1990ed6c4c69ac11ecc306574f367c0ac1af36c23454bc76cb5438116e431dd
+MD5 6571b94313e5be4593540c51a1979729 c-client-2004g-r20.ebuild 2576
+RMD160 53c1cf910f4ab708fe851da324ae405ed5e5c2eb c-client-2004g-r20.ebuild 2576
+SHA256 a1990ed6c4c69ac11ecc306574f367c0ac1af36c23454bc76cb5438116e431dd c-client-2004g-r20.ebuild 2576
+MISC metadata.xml 232 RMD160 251750822acfe36f54ec830fa053e985a7278a33 SHA1 fdbcf61b9d99ee20f934ecc104ade9609a229e78 SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1
+MD5 472818759cc5022b4fff0910a12b75d1 metadata.xml 232
+RMD160 251750822acfe36f54ec830fa053e985a7278a33 metadata.xml 232
+SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1 metadata.xml 232
+MD5 0d5d414d07402759de9342401655183d files/digest-c-client-2004g-r20 232
+RMD160 aef5a82d8b7b979859d4e1c7ec1ae3f5f94897d7 files/digest-c-client-2004g-r20 232
+SHA256 6e923a6cf0c59497531bb8ad3ed5e77a50f113a7579b46d90716540d17528fd4 files/digest-c-client-2004g-r20 232
diff --git a/net-libs/c-client/c-client-2004g-r20.ebuild b/net-libs/c-client/c-client-2004g-r20.ebuild
new file mode 100644
index 0000000..44f5786
--- /dev/null
+++ b/net-libs/c-client/c-client-2004g-r20.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/c-client/c-client-2004g.ebuild,v 1.2 2006/01/18 23:01:49 vapier Exp $
+
+inherit flag-o-matic eutils libtool
+
+MY_PN=imap
+MY_P="${MY_PN}-${PV}"
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="UW IMAP c-client library"
+HOMEPAGE="http://www.washington.edu/imap/"
+SRC_URI="ftp://ftp.cac.washington.edu/imap/${MY_P}.tar.Z"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE="kolab ssl pam"
+
+RDEPEND="ssl? ( dev-libs/openssl )
+ !virtual/imap-c-client"
+DEPEND="${RDEPEND}
+ pam? ( >=sys-libs/pam-0.72 )"
+PROVIDE="virtual/imap-c-client"
+
+src_unpack() {
+ unpack ${A}
+
+ # Tarball packed with bad file perms
+ chmod -R ug+w ${S}
+
+ # lots of things need -fPIC, including various platforms, and this library
+ # generally should be built with it anyway.
+ append-flags -fPIC
+
+ cd ${S}
+
+ # Modifications so we can build it optimally and correctly
+ sed \
+ -e "s:BASECFLAGS=\".*\":BASECFLAGS=:g" \
+ -e 's:SSLDIR=/usr/local/ssl:SSLDIR=/usr:g' \
+ -e 's:SSLCERTS=$(SSLDIR)/certs:SSLCERTS=/etc/ssl/certs:g' \
+ -i src/osdep/unix/Makefile || die "Makefile sed fixing failed"
+
+ # Apply a patch to only build the stuff we need for c-client
+ epatch ${FILESDIR}/2002d-Makefile.patch || die "epatch failed"
+
+ # Apply patch to add the compilation of a .so for PHP
+ # This was previously conditional, but is more widely useful.
+ epatch ${FILESDIR}/${PN}-2004a-amd64-so-fix.patch
+
+ # Add kolab support.
+ if use kolab ; then
+ epatch "${FILESDIR}/${PN}-kolab.patch" || die "epatch failed"
+ fi
+
+ # Remove the pesky checks about SSL stuff
+ sed -e '/read.*exit/d' -i Makefile
+ elibtoolize
+}
+
+src_compile() {
+ local ssltype target
+ use ssl && ssltype="unix" || ssltype="none"
+ use pam && target=lnp || target=lnx
+ # no parallel builds supported!
+ make $target SSLTYPE=${ssltype} EXTRACFLAGS="${CFLAGS}" || die "make failed"
+}
+
+src_install() {
+ into /usr
+
+ # Library binary
+ dolib.a c-client/c-client.a
+ dosym /usr/$(get_libdir)/c-client.a /usr/$(get_libdir)/libc-client.a
+
+ # Now the shared library
+ dolib.so c-client/libc-client.so.1.0.0
+ # these are created by ldconfig!
+ #cd ${D}/usr/$(get_libdir)
+ #ln -s libc-client.so.1.0.0 libc-client.so.1
+ #ln -s libc-client.so.1.0.0 libc-client.so
+
+ # Headers
+ insinto /usr/include/imap
+ doins c-client/*.h
+ doins c-client/linkage.c
+ #exclude these dupes (can't do it before now due to symlink hell)
+ rm ${D}/usr/include/imap/os_*.h
+
+ # Docs
+ dodoc README docs/*.txt docs/CONFIG docs/RELNOTES
+
+ docinto rfc
+ dodoc docs/rfc/*.txt
+}
diff --git a/net-libs/c-client/files/2002d-Makefile.patch b/net-libs/c-client/files/2002d-Makefile.patch
new file mode 100644
index 0000000..ce0d0b3
--- /dev/null
+++ b/net-libs/c-client/files/2002d-Makefile.patch
@@ -0,0 +1,65 @@
+--- Makefile~ 2003-04-16 17:32:42.000000000 -0700
++++ Makefile 2003-05-31 19:58:50.000000000 -0700
+@@ -256,7 +256,7 @@
+
+ # Make the IMAP Toolkit
+
+-all: SPECIALS c-client rebuild bundled
++all: SPECIALS c-client rebuild
+
+ c-client:
+ @echo Not processed yet. In a first-time build, you must specify
+@@ -448,16 +448,9 @@
+ $(TOOLS)/$@ "$(LN)" src/ansilib c-client
+ $(TOOLS)/$@ "$(LN)" src/charset c-client
+ $(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client
+- $(TOOLS)/$@ "$(LN)" src/mtest mtest
+- $(TOOLS)/$@ "$(LN)" src/ipopd ipopd
+- $(TOOLS)/$@ "$(LN)" src/imapd imapd
+- $(TOOLS)/$@ "$(LN)" src/mailutil mailutil
+- $(TOOLS)/$@ "$(LN)" src/mlock mlock
+- $(TOOLS)/$@ "$(LN)" src/dmail dmail
+- $(TOOLS)/$@ "$(LN)" src/tmail tmail
+ $(LN) $(TOOLS)/$@ .
+
+-build: OSTYPE rebuild rebuildclean bundled
++build: OSTYPE rebuild rebuildclean
+
+ OSTYPE:
+ @echo Building c-client for $(BUILDTYPE)...
+@@ -472,8 +465,6 @@
+ echo $(BUILDTYPE) > OSTYPE
+ $(TOUCH) rebuild
+
+-rebuild:
+- @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
+ @echo Rebuilding c-client for `$(CAT) OSTYPE`...
+ @$(TOUCH) SPECIALS
+ $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
+@@ -482,26 +473,6 @@
+ rebuildclean:
+ $(SH) -c '$(RM) rebuild || true'
+
+-bundled:
+- @echo Building bundled tools...
+- $(CD) mtest;$(MAKE)
+- $(CD) ipopd;$(MAKE)
+- $(CD) imapd;$(MAKE)
+- $(CD) mailutil;$(MAKE)
+- @$(SH) -c '(test -f /usr/include/sysexits.h ) || make sysexitwarn'
+- $(CD) mlock;$(MAKE) || true
+- $(CD) dmail;$(MAKE) || true
+- $(CD) tmail;$(MAKE) || true
+-
+-
+-sysexitwarn:
+- @echo Hmm...it does not look like /usr/include/sysexits.h exists.
+- @echo Either your system is too ancient to have the sysexits.h
+- @echo include, or your C compiler gets it from some other location
+- @echo than /usr/include. If your system is too old to have the
+- @echo sysexits.h include, you will not be able to build the
+- @echo following programs.
+-
+ clean:
+ @echo Removing old processed sources and binaries...
+ $(SH) -c '$(RM) an ua OSTYPE SPECIALS c-client mtest imapd ipopd mailutil mlock dmail tmail || true'
diff --git a/net-libs/c-client/files/c-client-2004a-amd64-so-fix.patch b/net-libs/c-client/files/c-client-2004a-amd64-so-fix.patch
new file mode 100644
index 0000000..1400fc2
--- /dev/null
+++ b/net-libs/c-client/files/c-client-2004a-amd64-so-fix.patch
@@ -0,0 +1,13 @@
+diff -ruN src/osdep/unix/Makefile src/osdep/unix/Makefile
+--- src/osdep/unix/Makefile 2005-01-29 22:43:25.739341544 +0000
++++ src/osdep/unix/Makefile 2005-01-29 22:43:50.375596264 +0000
+@@ -912,6 +912,9 @@
+ -DRSHPATH=\"$(RSHPATH)\" -DLOCKPGM=\"$(LOCKPGM)\" > OSCFLAGS
+ echo $(BASELDFLAGS) $(EXTRALDFLAGS) > LDFLAGS
+ echo "$(ARRC) $(ARCHIVE) $(BINARIES);$(RANLIB) $(ARCHIVE)" > ARCHIVE
++ echo "`$(CAT) CCTYPE` `$(CAT) CFLAGS` `$(CAT) OSFLAGS` -shared \
++ -Wl,-soname,libc-client.so.1 -o libc-client.so.1.0.0 $(BINARIES)" \
++ >> ARCHIVE
+ echo $(OS) > OSTYPE
+ ./drivers $(EXTRADRIVERS) $(DEFAULTDRIVERS) dummy
+ ./mkauths $(EXTRAAUTHENTICATORS) $(DEFAULTAUTHENTICATORS)
diff --git a/net-libs/c-client/files/c-client-kolab.patch b/net-libs/c-client/files/c-client-kolab.patch
new file mode 100644
index 0000000..5173fc6
--- /dev/null
+++ b/net-libs/c-client/files/c-client-kolab.patch
@@ -0,0 +1,445 @@
+diff -u -r imap-2004d/src/c-client/imap4r1.c imap-2004d.annotation/src/c-client/imap4r1.c
+--- imap-2004d/src/c-client/imap4r1.c 2005-04-09 01:43:31.000000000 +0200
++++ imap-2004d.annotation/src/c-client/imap4r1.c 2005-06-06 11:20:05.490904844 +0200
+@@ -125,7 +125,8 @@
+ #define MULTIAPPEND 13
+ #define SNLIST 14
+ #define MULTIAPPENDREDO 15
+-
++#define QLIST 16
++#define QSTRING 17
+
+ /* Append data */
+
+@@ -195,12 +196,15 @@
+ void imap_gc_body (BODY *body);
+ void imap_capability (MAILSTREAM *stream);
+ long imap_acl_work (MAILSTREAM *stream,char *command,IMAPARG *args[]);
++long imap_annotation_work (MAILSTREAM *stream,char *command,IMAPARG *args[]);
+
+ IMAPPARSEDREPLY *imap_send (MAILSTREAM *stream,char *cmd,IMAPARG *args[]);
+ IMAPPARSEDREPLY *imap_sout (MAILSTREAM *stream,char *tag,char *base,char **s);
+ long imap_soutr (MAILSTREAM *stream,char *string);
+ IMAPPARSEDREPLY *imap_send_astring (MAILSTREAM *stream,char *tag,char **s,
+ SIZEDTEXT *as,long wildok,char *limit);
++IMAPPARSEDREPLY *imap_send_qstring (MAILSTREAM *stream,char *tag,char **s,
++ SIZEDTEXT *as,char *limit);
+ IMAPPARSEDREPLY *imap_send_literal (MAILSTREAM *stream,char *tag,char **s,
+ STRING *st);
+ IMAPPARSEDREPLY *imap_send_spgm (MAILSTREAM *stream,char *tag,char *base,
+@@ -2677,6 +2681,84 @@
+ args[0] = &ambx; args[1] = NIL;
+ return imap_acl_work (stream,"GETACL",args);
+ }
++
++/* IMAP set annotation
++ * Accepts: mail stream
++ * annotation struct
++ * Returns: T on success, NIL on failure
++ */
++
++long imap_setannotation (MAILSTREAM *stream,ANNOTATION *annotation)
++{
++ IMAPARG *args[4],ambx,apth,aval;
++ long ret;
++
++ ambx.type = ASTRING;
++ ambx.text = (void *) annotation->mbox;
++ args[0] = &ambx;
++
++ apth.type = QSTRING;
++ apth.text = (void *) annotation->entry;
++ args[1] = &apth;
++
++ STRINGLIST *st,*l;
++ ANNOTATION_VALUES *v;
++
++ l = st = mail_newstringlist();
++ v = annotation->values;
++ while(v){
++ l->text.size = strlen((char *) (l->text.data = (unsigned char*)cpystr(v->attr)));
++ l->next = mail_newstringlist();
++ l = l->next;
++ l->text.size = strlen((char *) (l->text.data = (unsigned char*)cpystr(v->value)));
++ if(v->next){
++ l->next = mail_newstringlist();
++ l = l->next;
++ }
++ v = v->next;
++ }
++
++ aval.type = QLIST;
++ aval.text = (void *)st;
++ args[2] = &aval;
++ args[3] = NIL;
++
++ ret = imap_annotation_work(stream, "SETANNOTATION",args);
++ mail_free_stringlist(&st);
++ return ret;
++}
++
++
++
++/* IMAP get annotation
++ * Accepts: mail stream
++ * mailbox name
++ * annotation entry list
++ * annotation attribute list
++ * Returns: T on success with data returned via callback, NIL on failure
++ */
++
++long imap_getannotation (MAILSTREAM *stream,char *mailbox,STRINGLIST *entries, STRINGLIST *attributes)
++{
++ IMAPARG *args[4],ambx,apth,aattr;
++ long ret;
++ ambx.type = ASTRING;
++ ambx.text = (void*) mailbox;
++ args[0] = &ambx;
++
++
++ apth.type = QLIST;
++ apth.text = (void*) entries;
++ args[1] = &apth;
++
++ aattr.type = QLIST;
++ aattr.text = (void*) attributes;
++ args[2] = &aattr;
++
++ args[3] = NIL;
++ ret = imap_annotation_work(stream, "GETANNOTATION",args);
++ return ret;
++}
+
+ /* IMAP list rights
+ * Accepts: mail stream
+@@ -2729,6 +2811,16 @@
+ else mm_log ("ACL not available on this IMAP server",ERROR);
+ return ret;
+ }
++ long imap_annotation_work(MAILSTREAM *stream, char *command,IMAPARG *args[])
++{
++ long ret = NIL;
++ IMAPPARSEDREPLY *reply;
++ if (imap_OK (stream,reply = imap_send (stream,command,args)))
++ ret = LONGT;
++ else mm_log (reply->text,ERROR);
++ return ret;
++}
++
+
+ /* IMAP set quota
+ * Accepts: mail stream
+@@ -2861,6 +2953,11 @@
+ if (reply = imap_send_astring (stream,tag,&s,&st,NIL,CMDBASE+MAXCOMMAND))
+ return reply;
+ break;
++ case QSTRING: /* atom or string, must be literal? */
++ st.size = strlen ((char *) (st.data = (unsigned char *) arg->text));
++ if (reply = imap_send_qstring (stream,tag,&s,&st,CMDBASE+MAXCOMMAND))
++ return reply;
++ break;
+ case LITERAL: /* literal, as a stringstruct */
+ if (reply = imap_send_literal (stream,tag,&s,arg->text)) return reply;
+ break;
+@@ -2877,6 +2974,18 @@
+ while (list = list->next);
+ *s++ = ')'; /* close list */
+ break;
++ case QLIST: /* list of strings */
++ list = (STRINGLIST *) arg->text;
++ c = '('; /* open paren */
++ do { /* for each list item */
++ *s++ = c; /* write prefix character */
++ if (reply = imap_send_qstring (stream,tag,&s,&list->text,
++ CMDBASE+MAXCOMMAND)) return reply;
++ c = ' '; /* prefix character for subsequent strings */
++ }
++ while (list = list->next);
++ *s++ = ')'; /* close list */
++ break;
+ case SEARCHPROGRAM: /* search program */
+ if (reply = imap_send_spgm (stream,tag,CMDBASE,&s,arg->text,
+ CMDBASE+MAXCOMMAND))
+@@ -3044,6 +3153,32 @@
+ mail_unlock (stream); /* unlock stream */
+ return reply;
+ }
++
++/* IMAP send quoted-string
++ * Accepts: MAIL stream
++ * reply tag
++ * pointer to current position pointer of output bigbuf
++ * atom-string to output
++ * maximum to write as atom or qstring
++ * Returns: error reply or NIL if success
++ */
++
++IMAPPARSEDREPLY *imap_send_qstring (MAILSTREAM *stream,char *tag,char **s,
++ SIZEDTEXT *as,char *limit)
++{
++ unsigned long j;
++ char c;
++ STRING st;
++ /* in case needed */
++ INIT (&st,mail_string,(void *) as->data,as->size);
++ /* always write literal if no space */
++ if ((*s + as->size) > limit) return imap_send_literal (stream,tag,s,&st);
++
++ *(*s)++ = '"'; /* write open quote */
++ for (j = 0; j < as->size; j++) *(*s)++ = as->data[j];
++ *(*s)++ = '"'; /* write close quote */
++ return NIL;
++}
+
+ /* IMAP send atom-string
+ * Accepts: MAIL stream
+@@ -3949,6 +4084,50 @@
+ }
+ }
+
++ else if (!strcmp (reply->key,"ANNOTATION") && (s = reply->text)){
++ char * mbox;
++ /* response looks like ANNOTATION "mailbox" "entry" ("attr" "value" ["attr" "value"]) ["entry" ("attr "value" ["attr" "value"] )]*/
++ getannotation_t an = (getannotation_t) mail_parameters (NIL,GET_ANNOTATION,NIL);
++
++ mbox = imap_parse_astring (stream, &s, reply,NIL);
++
++ while(*s){
++ ANNOTATION * al = mail_newannotation();
++ al->mbox = cpystr(mbox);
++ t = imap_parse_astring (stream, &s, reply,NIL);
++ al->entry = t;
++ STRINGLIST *strlist;
++ if (s){while (*s == ' ')s++;}
++
++ strlist = imap_parse_stringlist(stream, &s,reply);
++
++ ANNOTATION_VALUES *vlIter, *vlBegin;
++ vlIter = vlBegin = NIL;
++ if (strlist) {
++ while(strlist){
++ if(vlIter){
++ vlIter->next = mail_newannotationvalue();
++ vlIter = vlIter->next;
++ }else{
++ vlIter = mail_newannotationvalue();
++ vlBegin = vlIter;
++ }
++ if ( strlist->text.size )
++ vlIter->attr = cpystr (strlist->text.data);
++ strlist = strlist->next;
++ if(!strlist) continue;
++ if ( strlist->text.size )
++ vlIter->value = cpystr (strlist->text.data);
++ strlist = strlist->next;
++ }
++ }
++ al->values = vlBegin;
++ if (an)
++ (*an) (stream,al);
++ mail_free_annotation(&al);
++ }
++ fs_give ((void **)&mbox);
++ }
+ else if (!strcmp (reply->key,"ACL") && (s = reply->text) &&
+ (t = imap_parse_astring (stream,&s,reply,NIL))) {
+ getacl_t ar = (getacl_t) mail_parameters (NIL,GET_ACL,NIL);
+diff -u -r imap-2004d/src/c-client/imap4r1.h imap-2004d.annotation/src/c-client/imap4r1.h
+--- imap-2004d/src/c-client/imap4r1.h 2005-04-07 20:36:52.000000000 +0200
++++ imap-2004d.annotation/src/c-client/imap4r1.h 2005-06-06 11:20:05.491904694 +0200
+@@ -232,3 +232,5 @@
+ long imap_setquota (MAILSTREAM *stream,char *qroot,STRINGLIST *limits);
+ long imap_getquota (MAILSTREAM *stream,char *qroot);
+ long imap_getquotaroot (MAILSTREAM *stream,char *mailbox);
++long imap_getannotation (MAILSTREAM *stream,char *mailbox,STRINGLIST *entries,STRINGLIST *attributes);
++long imap_setannotation (MAILSTREAM *stream,ANNOTATION *annotation);
+diff -u -r imap-2004d/src/c-client/mail.c imap-2004d.annotation/src/c-client/mail.c
+--- imap-2004d/src/c-client/mail.c 2005-03-17 01:10:18.000000000 +0100
++++ imap-2004d.annotation/src/c-client/mail.c 2005-06-06 11:20:05.497903794 +0200
+@@ -60,6 +60,7 @@
+ static newsrcquery_t mailnewsrcquery = NIL;
+ /* ACL results callback */
+ static getacl_t mailaclresults = NIL;
++static getannotation_t mailannotationresults = NIL;
+ /* list rights results callback */
+ static listrights_t maillistrightsresults = NIL;
+ /* my rights results callback */
+@@ -516,6 +517,11 @@
+ ret = (void *) (debugsensitive ? VOIDT : NIL);
+ break;
+
++ case SET_ANNOTATION:
++ mailannotationresults = (getannotation_t) value;
++ case GET_ANNOTATION:
++ ret = (void *) mailannotationresults;
++ break;
+ case SET_ACL:
+ mailaclresults = (getacl_t) value;
+ case GET_ACL:
+@@ -5487,7 +5493,15 @@
+ return (ACLLIST *) memset (fs_get (sizeof (ACLLIST)),0,sizeof (ACLLIST));
+ }
+
++ANNOTATION *mail_newannotation (void)
++{
++ return (ANNOTATION *) memset (fs_get (sizeof (ANNOTATION)),0,sizeof(ANNOTATION));
++}
+
++ANNOTATION_VALUES *mail_newannotationvalue (void)
++{
++ return (ANNOTATION_VALUES *) memset (fs_get (sizeof (ANNOTATION_VALUES)),0,sizeof(ANNOTATION_VALUES));
++}
+ /* Mail instantiate new quotalist
+ * Returns: new quotalist
+ */
+@@ -5810,6 +5824,25 @@
+ }
+ }
+
++static void mail_free_annotation_values(ANNOTATION_VALUES **val)
++{
++ if (*val) {
++ if ((*val)->attr) fs_give ((void**) &(*val)->attr);
++ if ((*val)->value) fs_give ((void**) &(*val)->value);
++ mail_free_annotation_values (&(*val)->next);
++ fs_give ((void **) val);
++ }
++}
++void mail_free_annotation(ANNOTATION **al)
++{
++ if (*al) {
++ if((*al)->mbox) fs_give ((void**) &(*al)->mbox);
++ if((*al)->entry) fs_give ((void**) &(*al)->entry);
++ if((*al)->values)
++ mail_free_annotation_values(&(*al)->values);
++ fs_give ((void **) al);
++ }
++}
+
+ /* Mail garbage collect quotalist
+ * Accepts: pointer to quotalist pointer
+diff -u -r imap-2004d/src/c-client/mail.h imap-2004d.annotation/src/c-client/mail.h
+--- imap-2004d/src/c-client/mail.h 2005-01-22 00:56:21.000000000 +0100
++++ imap-2004d.annotation/src/c-client/mail.h 2005-06-06 11:20:05.500903345 +0200
+@@ -311,6 +311,8 @@
+ #define SET_SNARFPRESERVE (long) 567
+ #define GET_INBOXPATH (long) 568
+ #define SET_INBOXPATH (long) 569
++#define GET_ANNOTATION (long) 570
++#define SET_ANNOTATION (long) 571
+
+ /* Driver flags */
+
+@@ -978,6 +980,24 @@
+ ACLLIST *next;
+ };
+
++/* ANNOTATION Response */
++
++#define ANNOTATION_VALUES struct annotation_value_list
++
++ANNOTATION_VALUES {
++ char *attr;
++ char *value;
++ ANNOTATION_VALUES *next;
++};
++
++#define ANNOTATION struct annotation
++
++ANNOTATION {
++ char *mbox;
++ char *entry;
++ ANNOTATION_VALUES * values;
++};
++
+ /* Quota resource list */
+
+ #define QUOTALIST struct quota_list
+@@ -1262,6 +1282,7 @@
+ typedef long (*sslcertificatequery_t) (char *reason,char *host,char *cert);
+ typedef void (*sslfailure_t) (char *host,char *reason,unsigned long flags);
+ typedef void (*logouthook_t) (void *data);
++typedef void (*getannotation_t) (MAILSTREAM *stream,ANNOTATION* annot);
+
+ /* Globals */
+
+@@ -1671,7 +1692,10 @@
+ SORTPGM *mail_newsortpgm (void);
+ THREADNODE *mail_newthreadnode (SORTCACHE *sc);
+ ACLLIST *mail_newacllist (void);
++ANNOTATION* mail_newannotation(void);
++ANNOTATION_VALUES* mail_newannotationvalue(void);
+ QUOTALIST *mail_newquotalist (void);
++void mail_free_annotation(ANNOTATION **a);
+ void mail_free_body (BODY **body);
+ void mail_free_body_data (BODY *body);
+ void mail_free_body_parameter (PARAMETER **parameter);
+diff -u -r imap-2004d/src/mtest/mtest.c imap-2004d.annotation/src/mtest/mtest.c
+--- imap-2004d/src/mtest/mtest.c 2005-04-07 20:37:44.000000000 +0200
++++ imap-2004d.annotation/src/mtest/mtest.c 2005-06-06 11:20:05.502903045 +0200
+@@ -137,6 +137,8 @@
+ #endif
+ return NIL;
+ }
++
++void mm_annotation (MAILSTREAM *stream, ANNOTATION *a);
+
+ /* MM command loop
+ * Accepts: MAIL stream
+@@ -187,6 +189,28 @@
+ mail_setflag (stream,arg,"\\DELETED");
+ else puts ("?Bad message number");
+ break;
++ case 'A':
++ {
++ char parms[MAILTMPLEN];
++ prompt("Annotation: ",parms);
++ if (parms) {
++ mail_parameters(stream,SET_ANNOTATION,mm_annotation);
++ STRINGLIST *entries = mail_newstringlist();
++ STRINGLIST *cur = entries;
++ cur->text.size = strlen((char *) (cur->text.data = (unsigned char*)cpystr (parms)));
++ cur->next = NIL;
++
++ STRINGLIST *attributes = mail_newstringlist();
++ cur = attributes;
++ cur->text.size = strlen((char *) (cur->text.data = (unsigned char*)cpystr ("*")));
++ cur->next = NIL;
++
++ imap_getannotation(stream,"INBOX",entries,attributes);
++ mail_free_stringlist(&entries);
++ mail_free_stringlist(&attributes);
++ }
++ }
++ break;
+ case 'E': /* Expunge command */
+ mail_expunge (stream);
+ last = 0;
+@@ -339,7 +363,7 @@
+ case '?': /* ? command */
+ puts ("Body, Check, Delete, Expunge, Find, GC, Headers, Literal,");
+ puts (" MailboxStatus, New Mailbox, Overview, Ping, Quit, Send, Type,");
+- puts ("Undelete, Xit, +, -, or <RETURN> for next message");
++ puts ("Undelete, Xit,Annotation, +, -, or <RETURN> for next message");
+ break;
+ default: /* bogus command */
+ printf ("?Unrecognized command: %s\n",cmd);
+@@ -587,6 +611,18 @@
+
+ /* Interfaces to C-client */
+
++void mm_annotation (MAILSTREAM *stream, ANNOTATION *a)
++{
++ if(a){
++ fprintf(stderr,"mailbox: %s\nentry: %s\n",a->mbox,a->entry);
++ ANNOTATION_VALUES * v = a->values;
++ while(v){
++ fprintf(stderr,"attr: %s, value: %s\n",v->attr,v->value);
++ v = v->next;
++ }
++ }
++}
++
+
+ void mm_searched (MAILSTREAM *stream,unsigned long number)
+ {
diff --git a/net-libs/c-client/files/digest-c-client-2004g-r20 b/net-libs/c-client/files/digest-c-client-2004g-r20
new file mode 100644
index 0000000..a058c31
--- /dev/null
+++ b/net-libs/c-client/files/digest-c-client-2004g-r20
@@ -0,0 +1,3 @@
+MD5 9a80f58d8d6a0979c13714ae69050020 imap-2004g.tar.Z 2246713
+RMD160 a016a06ba073e879d2574a6395ce1074ea74c687 imap-2004g.tar.Z 2246713
+SHA256 958ab8a6a8b5a1a53167793141fe5bf1fbafc012be1d3f70a21f5f2f493ffa6d imap-2004g.tar.Z 2246713
diff --git a/net-libs/c-client/metadata.xml b/net-libs/c-client/metadata.xml
new file mode 100644
index 0000000..393e9ef
--- /dev/null
+++ b/net-libs/c-client/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>wrobel@gentoo.org</email>
+ <name>Gunnar Wrobel</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-mail/cyrus-imap-admin/ChangeLog b/net-mail/cyrus-imap-admin/ChangeLog
new file mode 100644
index 0000000..5145ca7
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/ChangeLog
@@ -0,0 +1,14 @@
+# ChangeLog for net-mail/cyrus-imap-admin
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 11 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/KOLAB_cyrus-cyradm_Annotations.patch,
+ +cyrus-imap-admin-2.3.9-r20.ebuild:
+ Updated to imap-admin 2.3.9
+
+ 11 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/KOLAB_cyrus-cyradm_Annotations.patch,
+ +cyrus-imap-admin-2.3.9-r20.ebuild:
+ -m Started changelog again.
+
diff --git a/net-mail/cyrus-imap-admin/Manifest b/net-mail/cyrus-imap-admin/Manifest
new file mode 100644
index 0000000..e59d455
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/Manifest
@@ -0,0 +1,40 @@
+AUX KOLAB_cyrus-cyradm_Annotations.patch 3006 RMD160 623de6d1d30ba25c22a31ff084422330c6a4e579 SHA1 90229656d941d0c6722f40272464f1a36fb67705 SHA256 2a5753416ab8d0327c3ebdfe6b633eb255968d701dc27d7f20fc566d4e185f56
+MD5 f5130dab8646fd981496cffdfed22a5f files/KOLAB_cyrus-cyradm_Annotations.patch 3006
+RMD160 623de6d1d30ba25c22a31ff084422330c6a4e579 files/KOLAB_cyrus-cyradm_Annotations.patch 3006
+SHA256 2a5753416ab8d0327c3ebdfe6b633eb255968d701dc27d7f20fc566d4e185f56 files/KOLAB_cyrus-cyradm_Annotations.patch 3006
+AUX cyrus-imap-admin-2.2-db45.patch 1283 RMD160 e3925988a6c628eb5567aa482351bb6a8ab01113 SHA1 b074166f6092ee58db685038c45382f77479bdb1 SHA256 4d814546280b83cf420855faf067ac95d36818be8b2a9ad9973805f261c1d90e
+MD5 94e33770741d5309d51ba7f4edbe1fc5 files/cyrus-imap-admin-2.2-db45.patch 1283
+RMD160 e3925988a6c628eb5567aa482351bb6a8ab01113 files/cyrus-imap-admin-2.2-db45.patch 1283
+SHA256 4d814546280b83cf420855faf067ac95d36818be8b2a9ad9973805f261c1d90e files/cyrus-imap-admin-2.2-db45.patch 1283
+AUX cyrus-imap-admin-2.2-fPIC.patch 584 RMD160 b66b94eacafb2f4bd59584701aa3e4a1f028984f SHA1 b43dc5f38abfc98220ce7ea5b2167376c8b7ed4b SHA256 958fa87050cd5eea811dc33343ef052b0a58d42597cdc3936b58d0a9b6e705dc
+MD5 dd34152fac580be8cccb1d1b69bb1ebc files/cyrus-imap-admin-2.2-fPIC.patch 584
+RMD160 b66b94eacafb2f4bd59584701aa3e4a1f028984f files/cyrus-imap-admin-2.2-fPIC.patch 584
+SHA256 958fa87050cd5eea811dc33343ef052b0a58d42597cdc3936b58d0a9b6e705dc files/cyrus-imap-admin-2.2-fPIC.patch 584
+AUX cyrus-imap-admin-2.3.8-cyradm.patch 3366 RMD160 33f1f5b4e1ee9ed3d56eaba9c73fc4c5af6976c4 SHA1 80363f0829471b38b04087e71e08734c7007f66c SHA256 05000287710acff77733c30eaab4af0e0187c4bb4e2f7d1585278bef6e42c510
+MD5 e1b18422bd5acb706fd7fe95ea553698 files/cyrus-imap-admin-2.3.8-cyradm.patch 3366
+RMD160 33f1f5b4e1ee9ed3d56eaba9c73fc4c5af6976c4 files/cyrus-imap-admin-2.3.8-cyradm.patch 3366
+SHA256 05000287710acff77733c30eaab4af0e0187c4bb4e2f7d1585278bef6e42c510 files/cyrus-imap-admin-2.3.8-cyradm.patch 3366
+DIST cyrus-imapd-2.3.8.tar.gz 2207366 RMD160 e89054f75f106c26f497bc37f7d514b0bf80bfe0 SHA1 c671f631753a138b9fa9b5bed7efa46adc8b4e3e SHA256 0f5c04a7de2da737e5ca0b4f8df8647175188b22972000192bbc7cd87ffda7fe
+DIST cyrus-imapd-2.3.9.tar.gz 2272004 RMD160 c9aae3476108c0face06dfe304a136015370b166 SHA1 b95e1de87ff2c7a42d4bec87c839fe439452a79c SHA256 27e6476789788b7c72f09711103f7c4bd0136dbd33ceadd0ae2dc776a17ab437
+EBUILD cyrus-imap-admin-2.3.8-r20.ebuild 1989 RMD160 dd5470846f033f9e6711f02307f7bfce8a7e68ec SHA1 0b185155b457b2e9cdc2441cc2c2cc140d116b72 SHA256 8efeccc2c92a200e95fe0ef9048b8aee840bc89bddd598cda9e9097d5f311754
+MD5 2e1f80c4be8b04f131d092c0e1fb8c07 cyrus-imap-admin-2.3.8-r20.ebuild 1989
+RMD160 dd5470846f033f9e6711f02307f7bfce8a7e68ec cyrus-imap-admin-2.3.8-r20.ebuild 1989
+SHA256 8efeccc2c92a200e95fe0ef9048b8aee840bc89bddd598cda9e9097d5f311754 cyrus-imap-admin-2.3.8-r20.ebuild 1989
+EBUILD cyrus-imap-admin-2.3.9-r20.ebuild 1947 RMD160 c9ee334ea2a780abb9c5fd51e508f9cad2fe87ba SHA1 5289081cd16756aced1cc6d1973698ee9f8e8312 SHA256 231ec028939af5b1a03f2a19854bc1bc25379ca6f9668c96c4ba53f8426fe2cb
+MD5 a061cd1e204baa51d0555f0053df8289 cyrus-imap-admin-2.3.9-r20.ebuild 1947
+RMD160 c9ee334ea2a780abb9c5fd51e508f9cad2fe87ba cyrus-imap-admin-2.3.9-r20.ebuild 1947
+SHA256 231ec028939af5b1a03f2a19854bc1bc25379ca6f9668c96c4ba53f8426fe2cb cyrus-imap-admin-2.3.9-r20.ebuild 1947
+MISC ChangeLog 456 RMD160 42a055f466bfb2327d2cd0eb62f33fcc0649fa20 SHA1 9a1778013a227c9a7f72d40f37e35f6de18cfcbc SHA256 e561ad4206e1e8a4ee3c4d81908a1b138c1751ba5155c697a332d3245811a413
+MD5 3b63d15cbd245c2b9700c4f429d22465 ChangeLog 456
+RMD160 42a055f466bfb2327d2cd0eb62f33fcc0649fa20 ChangeLog 456
+SHA256 e561ad4206e1e8a4ee3c4d81908a1b138c1751ba5155c697a332d3245811a413 ChangeLog 456
+MISC metadata.xml 232 RMD160 251750822acfe36f54ec830fa053e985a7278a33 SHA1 fdbcf61b9d99ee20f934ecc104ade9609a229e78 SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1
+MD5 472818759cc5022b4fff0910a12b75d1 metadata.xml 232
+RMD160 251750822acfe36f54ec830fa053e985a7278a33 metadata.xml 232
+SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1 metadata.xml 232
+MD5 6923625b64a1b08f72791096840ede27 files/digest-cyrus-imap-admin-2.3.8-r20 256
+RMD160 0fec86c03123f9b310b992fff447e25a2a327bd4 files/digest-cyrus-imap-admin-2.3.8-r20 256
+SHA256 fede8ba0827136a991e74f68ef1e3412dde9f5e672b15788b980a7cefcd05455 files/digest-cyrus-imap-admin-2.3.8-r20 256
+MD5 ce8a6932994d83555f467857bbb5c8ed files/digest-cyrus-imap-admin-2.3.9-r20 256
+RMD160 06eb2b84052666cdcb4ee0bf2b223234197ff20b files/digest-cyrus-imap-admin-2.3.9-r20 256
+SHA256 aa94208b1a095eae225c35413bfe3f8f4115fc63942e96435b7d298ce9d95cb9 files/digest-cyrus-imap-admin-2.3.9-r20 256
diff --git a/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.8-r20.ebuild b/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.8-r20.ebuild
new file mode 100644
index 0000000..c1a1ad5
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.8-r20.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.8.ebuild,v 1.2 2007/07/28 15:39:48 dertobi123 Exp $
+
+inherit autotools perl-app eutils
+
+PIC_PATCH_VER="2.2"
+DESCRIPTION="Utilities and Perl modules to administer a Cyrus IMAP server."
+HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/"
+SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-${PV}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE="ssl kerberos kolab"
+
+RDEPEND=">=sys-libs/db-3.2
+ >=dev-lang/perl-5.6.1
+ >=dev-libs/cyrus-sasl-2.1.13
+ dev-perl/Term-ReadLine-Perl
+ dev-perl/TermReadKey
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ kerberos? ( virtual/krb5 )"
+
+DEPEND="$RDEPEND
+ sys-devel/libtool
+ >=sys-devel/autoconf-2.58
+ sys-devel/automake
+ >=sys-apps/sed-4"
+
+S="${WORKDIR}/cyrus-imapd-${PV}"
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ # DB4 detection and versioned symbols.
+ epatch "${FILESDIR}/${PN}-2.2-db45.patch"
+ epatch "${FILESDIR}/${PN}-${PIC_PATCH_VER}-fPIC.patch"
+
+ # Recreate configure.
+ WANT_AUTOCONF="2.5"
+ eautoreconf
+
+ # When linking with rpm, you need to link with more libraries.
+ sed -e "s:lrpm:lrpm -lrpmio -lrpmdb:" -i configure || die "sed failed"
+
+ # Add kolab support.
+ if use kolab ; then
+ epatch "${FILESDIR}/${P}-cyradm.patch" || die "epatch failed"
+ fi
+}
+
+src_compile() {
+
+ local myconf
+ myconf="${myconf} `use_with ssl openssl`"
+ myconf="${myconf} `use_with kerberos gssapi`"
+
+ econf \
+ --disable-server \
+ --enable-murder \
+ --enable-listext \
+ --enable-netscapehack \
+ --with-cyrus-group=mail \
+ --with-com_err=yes \
+ --with-auth=unix \
+ --with-perl=/usr/bin/perl \
+ --enable-cyradm \
+ ${myconf} || die "econf failed"
+
+ emake -C "${S}/lib" all || die "compile problem"
+ emake -C "${S}/perl" all || die "compile problem"
+}
+
+src_install () {
+ make -C "${S}/perl" DESTDIR="${D}" install || die "install problem"
+ fixlocalpod # bug #98122
+}
diff --git a/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.9-r20.ebuild b/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.9-r20.ebuild
new file mode 100644
index 0000000..a02bbdf
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.9-r20.ebuild
@@ -0,0 +1,77 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imap-admin/cyrus-imap-admin-2.3.9.ebuild,v 1.1 2007/09/04 18:06:04 dertobi123 Exp $
+
+inherit autotools perl-app eutils
+
+PIC_PATCH_VER="2.2"
+DESCRIPTION="Utilities and Perl modules to administer a Cyrus IMAP server."
+HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/"
+SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-imapd-${PV}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE="ssl kerberos kolab"
+
+RDEPEND=">=sys-libs/db-3.2
+ >=dev-lang/perl-5.6.1
+ >=dev-libs/cyrus-sasl-2.1.13
+ dev-perl/Term-ReadLine-Perl
+ dev-perl/TermReadKey
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ kerberos? ( virtual/krb5 )"
+
+DEPEND="$RDEPEND
+ sys-devel/libtool
+ >=sys-devel/autoconf-2.58
+ sys-devel/automake
+ >=sys-apps/sed-4"
+
+S="${WORKDIR}/cyrus-imapd-${PV}"
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ # Versioned symbols.
+ epatch "${FILESDIR}/${PN}-${PIC_PATCH_VER}-fPIC.patch"
+
+ # Recreate configure.
+ WANT_AUTOCONF="2.5"
+ eautoreconf
+
+ # When linking with rpm, you need to link with more libraries.
+ sed -e "s:lrpm:lrpm -lrpmio -lrpmdb:" -i configure || die "sed failed"
+
+ # Add kolab support.
+ if use kolab ; then
+ epatch "${FILESDIR}/KOLAB_cyrus-cyradm_Annotations.patch" || die "epatch failed"
+ fi
+}
+
+src_compile() {
+
+ local myconf
+ myconf="${myconf} `use_with ssl openssl`"
+ myconf="${myconf} `use_with kerberos gssapi`"
+
+ econf \
+ --disable-server \
+ --enable-murder \
+ --enable-listext \
+ --enable-netscapehack \
+ --with-cyrus-group=mail \
+ --with-com_err=yes \
+ --with-auth=unix \
+ --with-perl=/usr/bin/perl \
+ --enable-cyradm \
+ ${myconf} || die "econf failed"
+
+ emake -C "${S}/lib" all || die "compile problem"
+ emake -C "${S}/perl" all || die "compile problem"
+}
+
+src_install () {
+ make -C "${S}/perl" DESTDIR="${D}" install || die "install problem"
+ fixlocalpod # bug #98122
+}
diff --git a/net-mail/cyrus-imap-admin/files/KOLAB_cyrus-cyradm_Annotations.patch b/net-mail/cyrus-imap-admin/files/KOLAB_cyrus-cyradm_Annotations.patch
new file mode 100644
index 0000000..c0e4729
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/files/KOLAB_cyrus-cyradm_Annotations.patch
@@ -0,0 +1,83 @@
+Allows to use arbitrary annotations with the cyradm tool.
+
+diff -r 124e8301a15d doc/man/cyradm.1.html
+--- a/doc/man/cyradm.1.html Mon Oct 01 11:18:56 2007 +0200
++++ b/doc/man/cyradm.1.html Thu Oct 11 08:14:56 2007 +0200
+@@ -255,6 +255,13 @@ mailboxes).</p>
+ <dd>
+ <p>Sets an email address to which messages injected into the server via NNTP
+ will be sent.</p>
++</dd>
++</li>
++<dt><strong><a NAME="item__2fexplicit_2fannotation"><code>/explicit/annotation</code></a></strong>
++
++<dd>
++<p>Sets the annotation <em>/explicit/annotation</em>
++on <em>mailbox</em> to <em>value</em>.</p>
+ </dd>
+ </li>
+ </dl>
+diff -r 124e8301a15d perl/imap/IMAP/Admin.pm
+--- a/perl/imap/IMAP/Admin.pm Mon Oct 01 11:18:56 2007 +0200
++++ b/perl/imap/IMAP/Admin.pm Thu Oct 11 08:14:56 2007 +0200
+@@ -795,11 +795,11 @@ sub mboxconfig {
+ return undef;
+ }
+
+- if(!exists($values{$entry})) {
+- $self->{error} = "Unknown parameter $entry";
+- }
+-
+- $entry = $values{$entry};
++ if(exists($values{$entry})) {
++ $entry = $values{$entry};
++ } else {
++ $self->{error} = "Unknown parameter $entry" unless substr($entry,0,1) eq "/";
++ }
+
+ my ($rc, $msg);
+
+diff -r 124e8301a15d perl/imap/IMAP/Shell.pm
+--- a/perl/imap/IMAP/Shell.pm Mon Oct 01 11:18:56 2007 +0200
++++ b/perl/imap/IMAP/Shell.pm Thu Oct 11 08:14:56 2007 +0200
+@@ -126,7 +126,7 @@ my %builtins = (exit =>
+ [\&_sc_info, '[mailbox]',
+ 'display mailbox/server metadata'],
+ mboxcfg =>
+- [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat] value',
++ [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value',
+ 'configure mailbox'],
+ mboxconfig => 'mboxcfg',
+ reconstruct =>
+@@ -1424,7 +1424,7 @@ sub _sc_mboxcfg {
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+- die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
++ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value\n";
+ }
+ else {
+ push(@nargv, $opt);
+@@ -1433,7 +1433,7 @@ sub _sc_mboxcfg {
+ }
+ push(@nargv, @argv);
+ if (@nargv < 2) {
+- die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
++ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "mboxconfig: no connection to server\n";
+diff -r 124e8301a15d perl/imap/cyradm.sh
+--- a/perl/imap/cyradm.sh Mon Oct 01 11:18:56 2007 +0200
++++ b/perl/imap/cyradm.sh Thu Oct 11 08:14:56 2007 +0200
+@@ -235,6 +235,10 @@ Sets an email address to which messages
+ Sets an email address to which messages injected into the server via NNTP
+ will be sent.
+
++=item C</explicit/annotation>
++
++Sets the annotation I</explicit/annotation> on I<mailbox> to I<value>.
++
+ =back
+
+ =item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname>
diff --git a/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-db45.patch b/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-db45.patch
new file mode 100644
index 0000000..c92f957
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-db45.patch
@@ -0,0 +1,29 @@
+--- lib.old/cyrusdb_berkeley.c 2007-04-05 01:23:42.518845824 +0200
++++ lib/cyrusdb_berkeley.c 2007-04-05 01:22:20.000000000 +0200
+@@ -159,7 +159,15 @@
+ syslog(LOG_WARNING,
+ "DBERROR: invalid berkeley_locks_max value, using internal default");
+ } else {
++#if DB_VERSION_MAJOR >= 4
++ r = dbenv->set_lk_max_locks(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_lockers(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_objects(dbenv, opt);
++#else
+ r = dbenv->set_lk_max(dbenv, opt);
++#endif
+ if (r) {
+ dbenv->err(dbenv, r, "set_lk_max");
+ syslog(LOG_ERR, "DBERROR: set_lk_max(): %s", db_strerror(r));
+--- cmulocal/berkdb.m4.orig 2007-05-01 18:05:00.000000000 +0200
++++ cmulocal/berkdb.m4 2007-05-01 18:05:17.000000000 +0200
+@@ -212,7 +212,7 @@
+ fi
+
+ saved_LIBS=$LIBS
+- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
++ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ AC_TRY_LINK([#include <db.h>],
diff --git a/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-fPIC.patch b/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-fPIC.patch
new file mode 100644
index 0000000..58a2355
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.2-fPIC.patch
@@ -0,0 +1,22 @@
+--- lib/Makefile.in 2004-03-30 13:11:28.544776470 +0000
++++ lib/Makefile.in 2004-03-30 13:11:39.242146165 +0000
+@@ -118,7 +118,7 @@
+ done
+
+ .c.o:
+- $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
++ $(CC) -fPIC -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \
+ $<
+
+ libcyrus.a: $(LIBCYR_OBJS)
+--- perl/sieve/lib/Makefile.in 2004-03-30 13:14:38.087172803 +0000
++++ perl/sieve/lib/Makefile.in 2004-03-30 13:14:47.295908694 +0000
+@@ -74,7 +74,7 @@
+ install:
+
+ .c.o:
+- $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
++ $(CC) -fPIC -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
+
+ libisieve.a: $(OBJS)
+ rm -f libisieve.a
diff --git a/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.3.8-cyradm.patch b/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.3.8-cyradm.patch
new file mode 100644
index 0000000..a1ce09e
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/files/cyrus-imap-admin-2.3.8-cyradm.patch
@@ -0,0 +1,81 @@
+diff -Naur cyrus-imapd-2.3.7.orig/doc/man/cyradm.1.html cyrus-imapd-2.3.7/doc/man/cyradm.1.html
+--- cyrus-imapd-2.3.7.orig/doc/man/cyradm.1.html 2006-10-03 17:46:02.000000000 +0200
++++ cyrus-imapd-2.3.7/doc/man/cyradm.1.html 2006-10-03 17:52:36.000000000 +0200
+@@ -257,6 +257,13 @@
+ will be sent.</p>
+ </dd>
+ </li>
++<dt><strong><a NAME="item__2fexplicit_2fannotation"><code>/explicit/annotation</code></a></strong>
++
++<dd>
++<p>Sets the annotation <em>/explicit/annotation</em>
++on <em>mailbox</em> to <em>value</em>.</p>
++</dd>
++</li>
+ </dl>
+ <dt><strong><a name="item_renamemailbox__5b_2d_2dpartition_partition_5d_oldn"><code>renamemailbox</code> [<code>--partition</code> <em>partition</em>] <em>oldname</em> <em>newname</em></a></strong>
+
+diff -Naur cyrus-imapd-2.3.7.orig/perl/imap/cyradm.sh cyrus-imapd-2.3.7/perl/imap/cyradm.sh
+--- cyrus-imapd-2.3.7.orig/perl/imap/cyradm.sh 2006-10-03 17:46:04.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/imap/cyradm.sh 2006-10-03 17:46:31.000000000 +0200
+@@ -235,6 +235,10 @@
+ Sets an email address to which messages injected into the server via NNTP
+ will be sent.
+
++=item C</explicit/annotation>
++
++Sets the annotation I</explicit/annotation> on I<mailbox> to I<value>.
++
+ =back
+
+ =item C<renamemailbox> [C<--partition> I<partition>] I<oldname> I<newname>
+diff -Naur cyrus-imapd-2.3.7.orig/perl/imap/IMAP/Admin.pm cyrus-imapd-2.3.7/perl/imap/IMAP/Admin.pm
+--- cyrus-imapd-2.3.7.orig/perl/imap/IMAP/Admin.pm 2006-10-03 17:46:04.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/imap/IMAP/Admin.pm 2006-10-03 17:46:31.000000000 +0200
+@@ -795,12 +795,12 @@
+ return undef;
+ }
+
+- if(!exists($values{$entry})) {
+- $self->{error} = "Unknown parameter $entry";
++ if(exists($values{$entry})) {
++ $entry = $values{$entry};
++ } else {
++ $self->{error} = "Unknown parameter $entry" unless substr($entry,0,1) eq "/";
+ }
+
+- $entry = $values{$entry};
+-
+ my ($rc, $msg);
+
+ $value = undef if($value eq "none");
+diff -Naur cyrus-imapd-2.3.7.orig/perl/imap/IMAP/Shell.pm cyrus-imapd-2.3.7/perl/imap/IMAP/Shell.pm
+--- cyrus-imapd-2.3.7.orig/perl/imap/IMAP/Shell.pm 2006-10-03 17:46:04.000000000 +0200
++++ cyrus-imapd-2.3.7/perl/imap/IMAP/Shell.pm 2006-10-03 17:53:26.000000000 +0200
+@@ -126,7 +126,7 @@
+ [\&_sc_info, '[mailbox]',
+ 'display mailbox/server metadata'],
+ mboxcfg =>
+- [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat] value',
++ [\&_sc_mboxcfg, 'mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value',
+ 'configure mailbox'],
+ mboxconfig => 'mboxcfg',
+ reconstruct =>
+@@ -1424,7 +1424,7 @@
+ while (defined ($opt = shift(@argv))) {
+ last if $opt eq '--';
+ if ($opt =~ /^-/) {
+- die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
++ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value\n";
+ }
+ else {
+ push(@nargv, $opt);
+@@ -1433,7 +1433,7 @@
+ }
+ push(@nargv, @argv);
+ if (@nargv < 2) {
+- die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat] value\n";
++ die "usage: mboxconfig mailbox [comment|condstore|news2mail|expire|sieve|squat|/<explicit annotation>] value\n";
+ }
+ if (!$cyrref || !$$cyrref) {
+ die "mboxconfig: no connection to server\n";
diff --git a/net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.8-r20 b/net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.8-r20
new file mode 100644
index 0000000..a210877
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.8-r20
@@ -0,0 +1,3 @@
+MD5 ac03b02c1ae08d52f807b58c488b204f cyrus-imapd-2.3.8.tar.gz 2207366
+RMD160 e89054f75f106c26f497bc37f7d514b0bf80bfe0 cyrus-imapd-2.3.8.tar.gz 2207366
+SHA256 0f5c04a7de2da737e5ca0b4f8df8647175188b22972000192bbc7cd87ffda7fe cyrus-imapd-2.3.8.tar.gz 2207366
diff --git a/net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.9-r20 b/net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.9-r20
new file mode 100644
index 0000000..fe6fdcc
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/files/digest-cyrus-imap-admin-2.3.9-r20
@@ -0,0 +1,3 @@
+MD5 113433c1fdc777e3b0466b5ce643b8bc cyrus-imapd-2.3.9.tar.gz 2272004
+RMD160 c9aae3476108c0face06dfe304a136015370b166 cyrus-imapd-2.3.9.tar.gz 2272004
+SHA256 27e6476789788b7c72f09711103f7c4bd0136dbd33ceadd0ae2dc776a17ab437 cyrus-imapd-2.3.9.tar.gz 2272004
diff --git a/net-mail/cyrus-imap-admin/metadata.xml b/net-mail/cyrus-imap-admin/metadata.xml
new file mode 100644
index 0000000..393e9ef
--- /dev/null
+++ b/net-mail/cyrus-imap-admin/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>wrobel@gentoo.org</email>
+ <name>Gunnar Wrobel</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-mail/cyrus-imapd/ChangeLog b/net-mail/cyrus-imapd/ChangeLog
new file mode 100644
index 0000000..e5951b4
--- /dev/null
+++ b/net-mail/cyrus-imapd/ChangeLog
@@ -0,0 +1,8 @@
+# ChangeLog for net-mail/cyrus-imapd
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 15 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ files/cyrus-imapd-2.3.9-KOLAB_UID.patch, cyrus-imapd-2.3.9-r20.ebuild:
+ Fixed the UID patch and an associated build problem.
+
diff --git a/net-mail/cyrus-imapd/Manifest b/net-mail/cyrus-imapd/Manifest
new file mode 100644
index 0000000..e71396d
--- /dev/null
+++ b/net-mail/cyrus-imapd/Manifest
@@ -0,0 +1,126 @@
+AUX cyrus-imapd-2.2-db45.patch 1283 RMD160 e3925988a6c628eb5567aa482351bb6a8ab01113 SHA1 b074166f6092ee58db685038c45382f77479bdb1 SHA256 4d814546280b83cf420855faf067ac95d36818be8b2a9ad9973805f261c1d90e
+MD5 94e33770741d5309d51ba7f4edbe1fc5 files/cyrus-imapd-2.2-db45.patch 1283
+RMD160 e3925988a6c628eb5567aa482351bb6a8ab01113 files/cyrus-imapd-2.2-db45.patch 1283
+SHA256 4d814546280b83cf420855faf067ac95d36818be8b2a9ad9973805f261c1d90e files/cyrus-imapd-2.2-db45.patch 1283
+AUX cyrus-imapd-2.2-libwrap.patch 390 RMD160 4ed2b14f549ccfab487cff66e5f2cb8ebdd39427 SHA1 0075421585a73f2673e3daff9a4c140d9cc5046e SHA256 2bddad2045130090ea23f5ad65d797cfa1f6083446bd00411cb1540cb56d4e0e
+MD5 88f50354abbcae1950a2d11c74db5fe5 files/cyrus-imapd-2.2-libwrap.patch 390
+RMD160 4ed2b14f549ccfab487cff66e5f2cb8ebdd39427 files/cyrus-imapd-2.2-libwrap.patch 390
+SHA256 2bddad2045130090ea23f5ad65d797cfa1f6083446bd00411cb1540cb56d4e0e files/cyrus-imapd-2.2-libwrap.patch 390
+AUX cyrus-imapd-2.3.8-annotate.patch 3670 RMD160 bbbad32a7f0719abbc1c0fbc2077e560454d4760 SHA1 fabbd42e5a37cadbd71be38892fb09ec3786922e SHA256 15427284daf6e0f249a9b667c8da315947127b1b5b7519cafd7d4f902084efa5
+MD5 740ca9d2e5e6f36c979386ede5dcd426 files/cyrus-imapd-2.3.8-annotate.patch 3670
+RMD160 bbbad32a7f0719abbc1c0fbc2077e560454d4760 files/cyrus-imapd-2.3.8-annotate.patch 3670
+SHA256 15427284daf6e0f249a9b667c8da315947127b1b5b7519cafd7d4f902084efa5 files/cyrus-imapd-2.3.8-annotate.patch 3670
+AUX cyrus-imapd-2.3.8-drac_with_autocreate.patch 2378 RMD160 a545ffbf21e7d14897d177b2866bc5df9df3130f SHA1 16e29ddddd924877d9d7dd572a6bcafe25c67725 SHA256 f55235912bcec09c91270dfeb9f2846300f70c22eef945781e77473ea7013aa6
+MD5 687f311749b0a998d7cf832aa451fbf5 files/cyrus-imapd-2.3.8-drac_with_autocreate.patch 2378
+RMD160 a545ffbf21e7d14897d177b2866bc5df9df3130f files/cyrus-imapd-2.3.8-drac_with_autocreate.patch 2378
+SHA256 f55235912bcec09c91270dfeb9f2846300f70c22eef945781e77473ea7013aa6 files/cyrus-imapd-2.3.8-drac_with_autocreate.patch 2378
+AUX cyrus-imapd-2.3.8-goodchars.patch 673 RMD160 bf9744dba26de16347bc2adbeecc2482d5dadb5f SHA1 e80ac22c75bc7f47d725b0bed097f55be133a57e SHA256 3c15e05790ee4eda90c64323fc57b5b7440f0eb91b8e9f3d4bd188d4b170c40a
+MD5 33fb4b5ee3e24f2d862b64ad6313f01c files/cyrus-imapd-2.3.8-goodchars.patch 673
+RMD160 bf9744dba26de16347bc2adbeecc2482d5dadb5f files/cyrus-imapd-2.3.8-goodchars.patch 673
+SHA256 3c15e05790ee4eda90c64323fc57b5b7440f0eb91b8e9f3d4bd188d4b170c40a files/cyrus-imapd-2.3.8-goodchars.patch 673
+AUX cyrus-imapd-2.3.8-group.patch 6383 RMD160 b0cb0b374bd6bf665a511e6a42aab126ec156664 SHA1 15eef7d7bd7297b5e3137c1087239c6cf6652652 SHA256 a3ceadf826653398957c2f6c3aadfd5596a383d72d34aa306ac13345df2ebd17
+MD5 c8b28d7a37c764486476ff465c8fb5b9 files/cyrus-imapd-2.3.8-group.patch 6383
+RMD160 b0cb0b374bd6bf665a511e6a42aab126ec156664 files/cyrus-imapd-2.3.8-group.patch 6383
+SHA256 a3ceadf826653398957c2f6c3aadfd5596a383d72d34aa306ac13345df2ebd17 files/cyrus-imapd-2.3.8-group.patch 6383
+AUX cyrus-imapd-2.3.8-group2.patch 862 RMD160 dc9ba78f39e3ecbd21aa7976b6d1c685725c29ab SHA1 99d48ffb7790bb5191442399923ae0b277932661 SHA256 971be6543ad1ed3a4ab9630d3da18f8b788b6a87fe2e05d021ce1707b6da7cda
+MD5 8ce4209247da2ae7125faf03949ff124 files/cyrus-imapd-2.3.8-group2.patch 862
+RMD160 dc9ba78f39e3ecbd21aa7976b6d1c685725c29ab files/cyrus-imapd-2.3.8-group2.patch 862
+SHA256 971be6543ad1ed3a4ab9630d3da18f8b788b6a87fe2e05d021ce1707b6da7cda files/cyrus-imapd-2.3.8-group2.patch 862
+AUX cyrus-imapd-2.3.8-kolab.patch 5970 RMD160 69482fac097e7670006ae5ce0a7b70f658b490d3 SHA1 64132014a3cde1c892547a4e24dd8dc5b603c389 SHA256 90d86c28520be906775ca9683f04d271ec168b557a14c72c22e11ab7115e7865
+MD5 15017e38e4c07d6884a5bccf17bef561 files/cyrus-imapd-2.3.8-kolab.patch 5970
+RMD160 69482fac097e7670006ae5ce0a7b70f658b490d3 files/cyrus-imapd-2.3.8-kolab.patch 5970
+SHA256 90d86c28520be906775ca9683f04d271ec168b557a14c72c22e11ab7115e7865 files/cyrus-imapd-2.3.8-kolab.patch 5970
+AUX cyrus-imapd-2.3.8-morelogging.patch 1531 RMD160 a725eda77b7a6cde2d3901647bdf12946b94d179 SHA1 d338100113fbf33fc79b03a5034e0ae9c071858f SHA256 43e595f1a5fa2255f632fbb563652950ad9130d4d259ef4a3a0a2db1c9884329
+MD5 b988a7d8ca09c93bb5189c41ddc943d0 files/cyrus-imapd-2.3.8-morelogging.patch 1531
+RMD160 a725eda77b7a6cde2d3901647bdf12946b94d179 files/cyrus-imapd-2.3.8-morelogging.patch 1531
+SHA256 43e595f1a5fa2255f632fbb563652950ad9130d4d259ef4a3a0a2db1c9884329 files/cyrus-imapd-2.3.8-morelogging.patch 1531
+AUX cyrus-imapd-2.3.8-openpkg.patch 3116 RMD160 bb2e793d670955cd44aaf73a2f507fb9c2cd7668 SHA1 60a9e2583e5f1deb0fc07a480589c37347599cb8 SHA256 95b6d310ac975497880f359379caafe925b82e764079a109d2701d8c223d7716
+MD5 a430a5980fe89e08210b1e3082d8fbe0 files/cyrus-imapd-2.3.8-openpkg.patch 3116
+RMD160 bb2e793d670955cd44aaf73a2f507fb9c2cd7668 files/cyrus-imapd-2.3.8-openpkg.patch 3116
+SHA256 95b6d310ac975497880f359379caafe925b82e764079a109d2701d8c223d7716 files/cyrus-imapd-2.3.8-openpkg.patch 3116
+AUX cyrus-imapd-2.3.8-pts.patch 632 RMD160 1efbbdb925fae4c6d330022cd4e3530be054c4b2 SHA1 4e99d9c68138bee4f25a8fbda29835a09e32f9d5 SHA256 6c95ec45eba762a3240cc7836c563bca98d2b9a6bdfc6b0912516c58d9e5c20f
+MD5 31bd5ec70884c610a5385ec1407f858e files/cyrus-imapd-2.3.8-pts.patch 632
+RMD160 1efbbdb925fae4c6d330022cd4e3530be054c4b2 files/cyrus-imapd-2.3.8-pts.patch 632
+SHA256 6c95ec45eba762a3240cc7836c563bca98d2b9a6bdfc6b0912516c58d9e5c20f files/cyrus-imapd-2.3.8-pts.patch 632
+AUX cyrus-imapd-2.3.9-KOLAB_Annotations2.patch 11103 RMD160 f40bcb3ff72a2eb00066c37fdd5bc972f4bcda5d SHA1 4cb8ac4912aaaa0bc2f11c562a1f571f0ac1fde8 SHA256 7f7f219634e29ae7085eecc1551b95c61b036a8d0a4e8a964c9f3d8099a60ee0
+MD5 4deca7499430a74eefb7cb0283a4d76a files/cyrus-imapd-2.3.9-KOLAB_Annotations2.patch 11103
+RMD160 f40bcb3ff72a2eb00066c37fdd5bc972f4bcda5d files/cyrus-imapd-2.3.9-KOLAB_Annotations2.patch 11103
+SHA256 7f7f219634e29ae7085eecc1551b95c61b036a8d0a4e8a964c9f3d8099a60ee0 files/cyrus-imapd-2.3.9-KOLAB_Annotations2.patch 11103
+AUX cyrus-imapd-2.3.9-KOLAB_Folder-names.patch 705 RMD160 bc22ad486915c11346c97c289372d0e6f6f4ee35 SHA1 448b3cb0b41af4f5e8a7caf4e28ac86eca17edd9 SHA256 efa0ae8d88540706547721f316d474d7db9989e8ac42549bc60a4b404ef5b215
+MD5 de551f54425d00ae545ee21bc1a041cf files/cyrus-imapd-2.3.9-KOLAB_Folder-names.patch 705
+RMD160 bc22ad486915c11346c97c289372d0e6f6f4ee35 files/cyrus-imapd-2.3.9-KOLAB_Folder-names.patch 705
+SHA256 efa0ae8d88540706547721f316d474d7db9989e8ac42549bc60a4b404ef5b215 files/cyrus-imapd-2.3.9-KOLAB_Folder-names.patch 705
+AUX cyrus-imapd-2.3.9-KOLAB_Groups.patch 6522 RMD160 0eb3f333a59e0686721e2cff5859e48c635e4d3c SHA1 c22a48acb6217d30245066938d2c6ef66f71fd75 SHA256 e7bafa307f2c9334c68e8f71a3281670fea4249392f3c167b8ededc7db7520ea
+MD5 c8e2f06f63ae8e2dd94bd5af5abb251e files/cyrus-imapd-2.3.9-KOLAB_Groups.patch 6522
+RMD160 0eb3f333a59e0686721e2cff5859e48c635e4d3c files/cyrus-imapd-2.3.9-KOLAB_Groups.patch 6522
+SHA256 e7bafa307f2c9334c68e8f71a3281670fea4249392f3c167b8ededc7db7520ea files/cyrus-imapd-2.3.9-KOLAB_Groups.patch 6522
+AUX cyrus-imapd-2.3.9-KOLAB_Logging.patch 1880 RMD160 bb68a301ce4bad6307097072eac1e4a7dffaf02c SHA1 9f6e19aa16f24080a9ec5ecf889fd891b72af007 SHA256 0a28057958b184fd2570de1b447422c6cb117edc78fdbb2820bd7ff31a7e8126
+MD5 a212358ff88eb3e923d3f4d85fa53e1c files/cyrus-imapd-2.3.9-KOLAB_Logging.patch 1880
+RMD160 bb68a301ce4bad6307097072eac1e4a7dffaf02c files/cyrus-imapd-2.3.9-KOLAB_Logging.patch 1880
+SHA256 0a28057958b184fd2570de1b447422c6cb117edc78fdbb2820bd7ff31a7e8126 files/cyrus-imapd-2.3.9-KOLAB_Logging.patch 1880
+AUX cyrus-imapd-2.3.9-KOLAB_UID.patch 4255 RMD160 37aa72288ef11bdfc0bcfb7255f0afcafb2f28fc SHA1 af1b33071b84bc083bd5abab16aa32d9731c3ec4 SHA256 07c49c145be08b5b5b785bb03a2e5bf6aa4b6f2cd24937480d0c8d04d85b19c9
+MD5 935f5ad7e85db69aebde12dd961aeae8 files/cyrus-imapd-2.3.9-KOLAB_UID.patch 4255
+RMD160 37aa72288ef11bdfc0bcfb7255f0afcafb2f28fc files/cyrus-imapd-2.3.9-KOLAB_UID.patch 4255
+SHA256 07c49c145be08b5b5b785bb03a2e5bf6aa4b6f2cd24937480d0c8d04d85b19c9 files/cyrus-imapd-2.3.9-KOLAB_UID.patch 4255
+AUX cyrus-imapd-parallel.patch 256 RMD160 fa7c53c847c4af9a7c218943be46b136b69f911c SHA1 8f4a7cbf91652354681e81e5c31f53728273a1c9 SHA256 adc6d031f2e9f547b192b36685d7873fdb5c5cb690e951b173fdcd55163cc68c
+MD5 9e059d45972ef25f2c05753867aa54c5 files/cyrus-imapd-parallel.patch 256
+RMD160 fa7c53c847c4af9a7c218943be46b136b69f911c files/cyrus-imapd-parallel.patch 256
+SHA256 adc6d031f2e9f547b192b36685d7873fdb5c5cb690e951b173fdcd55163cc68c files/cyrus-imapd-parallel.patch 256
+AUX cyrus-imapd-strip.patch 527 RMD160 83dda22c91798715c7790c3964705b60edeab904 SHA1 624635c7a3dd17e0d3ed84c2c7b07fe042d54cc0 SHA256 4edf438766a291c18847efbcf0596e5c7fc848a1c04b851b20074a195c1b2f18
+MD5 39e967597f06873c10a001c7316743de files/cyrus-imapd-strip.patch 527
+RMD160 83dda22c91798715c7790c3964705b60edeab904 files/cyrus-imapd-strip.patch 527
+SHA256 4edf438766a291c18847efbcf0596e5c7fc848a1c04b851b20074a195c1b2f18 files/cyrus-imapd-strip.patch 527
+AUX cyrus-imapd-unsupported-8bit.patch 3342 RMD160 b175b6799723c54110880ad93a4ee2795b40f69e SHA1 87303ffa37dd3e48e1a8133ffda87c6e7db6ea6e SHA256 e44ad27b5acf20a9bce95815d5fa25f040eb06870feb87cddf59204f1d8a2867
+MD5 e76f31d728a283bf2dd2fb5b5a853af8 files/cyrus-imapd-unsupported-8bit.patch 3342
+RMD160 b175b6799723c54110880ad93a4ee2795b40f69e files/cyrus-imapd-unsupported-8bit.patch 3342
+SHA256 e44ad27b5acf20a9bce95815d5fa25f040eb06870feb87cddf59204f1d8a2867 files/cyrus-imapd-unsupported-8bit.patch 3342
+AUX cyrus.conf 1354 RMD160 b2d6f470b7097036a5c64bc59f147f78fdbc16d5 SHA1 efc4d14807391be53018a81c4f4277cd8d6ce5f8 SHA256 23189674bb5c2f021f35027cfe22cfe56e022ce5e03da67f5c4913473bec1292
+MD5 d91b5eaa87ced6cb7efc8c716fc7476a files/cyrus.conf 1354
+RMD160 b2d6f470b7097036a5c64bc59f147f78fdbc16d5 files/cyrus.conf 1354
+SHA256 23189674bb5c2f021f35027cfe22cfe56e022ce5e03da67f5c4913473bec1292 files/cyrus.conf 1354
+AUX cyrus.confd 279 RMD160 da79ff4128869a045b432abc9cea6667b65ee69a SHA1 6d2d3417b678c77336a4b89db3507314302fe4eb SHA256 3e786c28ffc44a222214b22d8849728360edc37f4b3f7d7c1473a23ab58c28a9
+MD5 08017debe8d02c695ec456e1165d920d files/cyrus.confd 279
+RMD160 da79ff4128869a045b432abc9cea6667b65ee69a files/cyrus.confd 279
+SHA256 3e786c28ffc44a222214b22d8849728360edc37f4b3f7d7c1473a23ab58c28a9 files/cyrus.confd 279
+AUX cyrus.pam-include 109 RMD160 24f82d0496f0ff94f9c1ee4cef14124909d361e5 SHA1 1a13c82008b6d59bb9236a8162c75f8d24d6c4ba SHA256 d4ef9ed9c7c9add97df75f0e19a833bee872d3863a2b3cb1d0674fefba54e3d8
+MD5 b8da82b13f99b84321a976a8f41d2a49 files/cyrus.pam-include 109
+RMD160 24f82d0496f0ff94f9c1ee4cef14124909d361e5 files/cyrus.pam-include 109
+SHA256 d4ef9ed9c7c9add97df75f0e19a833bee872d3863a2b3cb1d0674fefba54e3d8 files/cyrus.pam-include 109
+AUX cyrus.rc6 573 RMD160 1ca59773442962d47cf1c9899730410e168b563f SHA1 26d52c17d76948589bed7b8d82c1f8570d141672 SHA256 c5534ef121f1c509f0005846b10df12f32e11c282656bf48699c2b457a40e187
+MD5 756c504a8b0b90aaa0630c089ae42f50 files/cyrus.rc6 573
+RMD160 1ca59773442962d47cf1c9899730410e168b563f files/cyrus.rc6 573
+SHA256 c5534ef121f1c509f0005846b10df12f32e11c282656bf48699c2b457a40e187 files/cyrus.rc6 573
+AUX imap.pam 195 RMD160 18585b20cc2568a000ecb381f3299dedcc737d27 SHA1 0e64fbb8fb8da0cdae6fb0820ee3048f1e30bbf6 SHA256 e8068af6f4141fe2b7d7afbaf241be779ad6edb7e03d4dfdcf7ca8e991a8a5e0
+MD5 ef68faa77664a88f939cee2f12019507 files/imap.pam 195
+RMD160 18585b20cc2568a000ecb381f3299dedcc737d27 files/imap.pam 195
+SHA256 e8068af6f4141fe2b7d7afbaf241be779ad6edb7e03d4dfdcf7ca8e991a8a5e0 files/imap.pam 195
+AUX imapd.conf 1587 RMD160 74e02af5daa7648ce7e366478c1b89b112750e6b SHA1 e4f189cb59fe499a42adffe3ffe382dcb9d7c546 SHA256 69eacd9fffad55f20990fcf3b117fe4e2ac55233515ed70698c65a6deb42503f
+MD5 66137eb399ec7760afc24491a10d8bd7 files/imapd.conf 1587
+RMD160 74e02af5daa7648ce7e366478c1b89b112750e6b files/imapd.conf 1587
+SHA256 69eacd9fffad55f20990fcf3b117fe4e2ac55233515ed70698c65a6deb42503f files/imapd.conf 1587
+DIST cyrus-imapd-2.3.8-uoa.tbz2 17894 RMD160 c824671df6b36aadf9c6d76131bd467a407a5e5e SHA1 311769f5ffd81a7eb24bbaa531997c7c4c4a0bc1 SHA256 dfe6d498991335c2c9f06bf2dd2c716ce865c043f857f5633650c029e17c3549
+DIST cyrus-imapd-2.3.8.tar.gz 2207366 RMD160 e89054f75f106c26f497bc37f7d514b0bf80bfe0 SHA1 c671f631753a138b9fa9b5bed7efa46adc8b4e3e SHA256 0f5c04a7de2da737e5ca0b4f8df8647175188b22972000192bbc7cd87ffda7fe
+DIST cyrus-imapd-2.3.9-uoa.tbz2 17935 RMD160 1e46f17972552ed94496d1dfee8671332844775b SHA1 1fc400239cf2410f531570c37d19ad964c606a14 SHA256 3ca66f3ec992416276daca9e43dd159797d2838ff9efd118139495a86e070f5d
+DIST cyrus-imapd-2.3.9.tar.gz 2272004 RMD160 c9aae3476108c0face06dfe304a136015370b166 SHA1 b95e1de87ff2c7a42d4bec87c839fe439452a79c SHA256 27e6476789788b7c72f09711103f7c4bd0136dbd33ceadd0ae2dc776a17ab437
+EBUILD cyrus-imapd-2.3.8-r20.ebuild 9328 RMD160 79786402ae2b5fd4324cbadd4628ad9353c04482 SHA1 0c5191073f7072112650685cb6f61260e72315c3 SHA256 7722959566fec0d7e9c301f7bd0f490164b3f2e5e170b738665069ac6120de5c
+MD5 fea20465d51f72246d38844223bd0d22 cyrus-imapd-2.3.8-r20.ebuild 9328
+RMD160 79786402ae2b5fd4324cbadd4628ad9353c04482 cyrus-imapd-2.3.8-r20.ebuild 9328
+SHA256 7722959566fec0d7e9c301f7bd0f490164b3f2e5e170b738665069ac6120de5c cyrus-imapd-2.3.8-r20.ebuild 9328
+EBUILD cyrus-imapd-2.3.9-r20.ebuild 8698 RMD160 57caa2adab40e79a76f11bfc364774ffa5ee1718 SHA1 6f3fca8025e75a3633663ce7b56f9b78eeb04cf9 SHA256 15d24b101e03ec74ec1e90b59794c4068f24b4e8a5d480fa8d67e5cdf0483fdb
+MD5 2aeb23fd351847bbd4c458d75124d02c cyrus-imapd-2.3.9-r20.ebuild 8698
+RMD160 57caa2adab40e79a76f11bfc364774ffa5ee1718 cyrus-imapd-2.3.9-r20.ebuild 8698
+SHA256 15d24b101e03ec74ec1e90b59794c4068f24b4e8a5d480fa8d67e5cdf0483fdb cyrus-imapd-2.3.9-r20.ebuild 8698
+MISC ChangeLog 299 RMD160 81a24b9728858b8313cf7affd931a9a988c21672 SHA1 7b6ab6f8090bc4ea6aa154e4852451ffe2453935 SHA256 3903080d9edb4af7318e89d8652de757843599b68b25762c113fc36df5f3bb4d
+MD5 7645967b94341faa888a39f093eba72c ChangeLog 299
+RMD160 81a24b9728858b8313cf7affd931a9a988c21672 ChangeLog 299
+SHA256 3903080d9edb4af7318e89d8652de757843599b68b25762c113fc36df5f3bb4d ChangeLog 299
+MISC metadata.xml 232 RMD160 251750822acfe36f54ec830fa053e985a7278a33 SHA1 fdbcf61b9d99ee20f934ecc104ade9609a229e78 SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1
+MD5 472818759cc5022b4fff0910a12b75d1 metadata.xml 232
+RMD160 251750822acfe36f54ec830fa053e985a7278a33 metadata.xml 232
+SHA256 d07db54ad168ceedf68191db986ce724abd9add00eb9716d1ea55f5808b2eec1 metadata.xml 232
+MD5 5a8232f4b9e3f3058e42486de0ad47a7 files/digest-cyrus-imapd-2.3.8-r20 512
+RMD160 2d7ca633bdae5bd71d0c4b70187b3ba2fbd6b8d4 files/digest-cyrus-imapd-2.3.8-r20 512
+SHA256 97b76dc1900afad7cb2521a8dcf231b1f64daf53fa8c8b0049e67dfae68b4224 files/digest-cyrus-imapd-2.3.8-r20 512
+MD5 c55df6df734f859e5f0ef9d3b9a9b969 files/digest-cyrus-imapd-2.3.9-r20 512
+RMD160 617c63af48df4adba02101a30db0f4e70b73508f files/digest-cyrus-imapd-2.3.9-r20 512
+SHA256 e03dc15ac8b730f5c4ca419fa764cc374d8821e67ceb147d4f0358ad6673913b files/digest-cyrus-imapd-2.3.9-r20 512
diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.3.8-r20.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.3.8-r20.ebuild
new file mode 100644
index 0000000..8ee17f7
--- /dev/null
+++ b/net-mail/cyrus-imapd/cyrus-imapd-2.3.8-r20.ebuild
@@ -0,0 +1,291 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.8.ebuild,v 1.2 2007/07/28 15:42:30 dertobi123 Exp $
+
+inherit autotools eutils ssl-cert fixheadtails pam
+
+DESCRIPTION="The Cyrus IMAP Server."
+HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/"
+SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz
+ mirror://gentoo/${P}-uoa.tbz2"
+LIBWRAP_PATCH_VER="2.2"
+DRAC_PATCH_VER="2.3.8"
+AUTOCREATE_PATCH_VER="0.10-0"
+AUTOSIEVE_PATCH_VER="0.6.0"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE="afs autocreate autosieve drac idled kerberos kolab nntp pam snmp ssl tcpd"
+
+PROVIDE="virtual/imapd"
+RDEPEND=">=sys-libs/db-3.2
+ >=dev-libs/cyrus-sasl-2.1.13
+ afs? ( >=net-fs/openafs-1.2.2 )
+ pam? (
+ virtual/pam
+ >=net-mail/mailbase-1
+ )
+ kerberos? ( virtual/krb5 )
+ snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ drac? ( >=mail-client/drac-1.12-r1 )"
+
+DEPEND="$RDEPEND
+ sys-devel/libtool
+ >=sys-devel/autoconf-2.58
+ sys-devel/automake"
+
+new_net-snmp_check() {
+ # tcpd USE flag check. Bug #68254.
+ if use tcpd ; then
+ if has_version net-analyzer/net-snmp && ! built_with_use net-analyzer/net-snmp tcpd ; then
+ eerror "You are emerging this package with USE=\"tcpd\""
+ eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"-tcpd\""
+ fail_msg
+ fi
+ else
+ if has_version net-analyzer/net-snmp && built_with_use net-analyzer/net-snmp tcpd ; then
+ eerror "You are emerging this package with USE=\"-tcpd\""
+ eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"tcpd\""
+ fail_msg
+ fi
+ fi
+ # DynaLoader check. Bug #67411
+
+ if [ -x "$(type -p net-snmp-config)" ]; then
+ einfo "$(type -p net-snmp-config) is found and executable."
+ NSC_AGENTLIBS="$(net-snmp-config --agent-libs)"
+ einfo "NSC_AGENTLIBS=\""${NSC_AGENTLIBS}"\""
+ if [ -z "$NSC_AGENTLIBS" ]; then
+ eerror "NSC_AGENTLIBS is null"
+ einfo "please report this to bugs.gentoo.org"
+ fi
+ for i in ${NSC_AGENTLIBS}; do
+ # check for the DynaLoader path.
+ if [ "$(expr "$i" : '.*\(DynaLoader\)')" == "DynaLoader" ] ; then
+ DYNALOADER_PATH="$i"
+ einfo "DYNALOADER_PATH=\""${DYNALOADER_PATH}"\""
+ if [[ ! -f "${DYNALOADER_PATH}" ]]; then
+ eerror "\""${DYNALOADER_PATH}"\" is not found."
+ einfo "Have you upgraded \"perl\" after"
+ einfo "you emerged \"net-snmp\". Please re-emerge"
+ einfo "\"net-snmp\" then try again. Bug #67411."
+ die "\""${DYNALOADER_PATH}"\" is not found."
+ fi
+ fi
+ done
+ else
+ eerror "\"net-snmp-config\" not found or not executable!"
+ die "You have \"net-snmp\" installed but \"net-snmp-config\" is not found or not executable. Please re-emerge \"net-snmp\" and try again!"
+ fi
+}
+
+fail_msg() {
+ eerror "enable "snmp" USE flag for this package requires"
+ eerror "that net-analyzer/net-snmp and this package both build with"
+ eerror "\"tcpd\" or \"-tcpd\". Bug #68254"
+ die "sanity check failed."
+}
+
+pkg_setup() {
+ use snmp && new_net-snmp_check
+ enewuser cyrus -1 -1 /usr/cyrus mail
+}
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ ht_fix_file ${S}/imap/xversion.sh
+
+ # db-4.5 fix
+ epatch "${FILESDIR}/${PN}-2.2-db45.patch"
+
+ # Unsupported UoA patch. Bug #112912 .
+ # http://email.uoa.gr/projects/cyrus/autocreate/
+ if use autocreate ; then
+ epatch "${WORKDIR}/${P}-autocreate-${AUTOCREATE_PATCH_VER}.diff"
+ use drac \
+ && epatch "${FILESDIR}/${PN}-${DRAC_PATCH_VER}-drac_with_autocreate.patch" \
+ && epatch "${S}/contrib/drac_auth.patch"
+ else
+ use drac && epatch "${S}/contrib/drac_auth.patch"
+ fi
+
+ # Unsupported UoA patch. Bug #133187 .
+ # http://email.uoa.gr/projects/cyrus/autosievefolder/
+ use autosieve && epatch "${WORKDIR}/${P}-autosieve-${AUTOSIEVE_PATCH_VER}.diff"
+
+ # fix undefine symbols.
+ use afs && epatch "${FILESDIR}/cyrus-imapd-2.3.6-afs.patch" \
+ && epatch "${FILESDIR}/${P}-pts.patch"
+
+ # Add libwrap defines as we don't have a dynamicly linked library.
+ use tcpd && epatch "${FILESDIR}/${PN}-${LIBWRAP_PATCH_VER}-libwrap.patch"
+
+ # Add kolab support.
+ if use kolab ; then
+
+ # Question is if this is really needed at all
+ epatch "${FILESDIR}/${P}-openpkg.patch" || die "epatch failed"
+
+ # Bad patch which solves the problem but would never get integrated.
+ # This would need a more general solution to be provided upstream.
+ epatch "${FILESDIR}/${P}-kolab.patch" || die "epatch failed"
+
+ # Looks like this has been applied in 2.3.7 -> Only partially! FIX!!
+ # Not in bug db either (though a similar request at https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2633)
+ #epatch "${FILESDIR}/${P}-goodchars.patch" || die "epatch failed"
+
+ # Not in the bug DB
+ epatch "${FILESDIR}/${P}-morelogging.patch" || die "epatch failed"
+
+ # These patches linger in the bug db since ages
+ # https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2632
+ epatch "${FILESDIR}/${P}-group.patch" || die "epatch failed"
+ epatch "${FILESDIR}/${P}-group2.patch" || die "epatch failed"
+
+ # Suggested patch is available here
+ # http://vman.de/cyrus/
+ # Has also been added to the bug db at
+ # https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=2458
+ epatch "${FILESDIR}/${P}-annotate.patch" || die "epatch failed"
+
+ fi
+
+ # Fix master(8)->cyrusmaster(8) manpage.
+ for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
+ sed -i -e 's:master\.8:cyrusmaster.8:g' \
+ -e 's:master(8):cyrusmaster(8):g' \
+ "${i}" || die "sed failed" || die "sed failed"
+ done
+ mv man/master.8 man/cyrusmaster.8 || die "mv failed"
+ sed -i -e "s:MASTER:CYRUSMASTER:g" \
+ -e "s:Master:Cyrusmaster:g" \
+ -e "s:master:cyrusmaster:g" \
+ man/cyrusmaster.8 || die "sed failed"
+
+ # Recreate configure.
+ WANT_AUTOCONF="2.5"
+ eautoreconf
+
+ # When linking with rpm, you need to link with more libraries.
+ sed -i -e "s:lrpm:lrpm -lrpmio -lrpmdb:" configure || die "sed failed"
+ if use kolab ; then
+ sed -i -e "s/{LIB_SASL}/{LIB_SASL} -lldap -llber /" configure || die "sed failed"
+ fi
+}
+
+src_compile() {
+ local myconf
+ use afs && myconf="${myconf} -with-afs=/usr"
+ myconf="${myconf} $(use_with drac)"
+ myconf="${myconf} $(use_with ssl openssl)"
+ myconf="${myconf} $(use_with snmp ucdsnmp)"
+ myconf="${myconf} $(use_with tcpd libwrap)"
+ myconf="${myconf} $(use_enable kerberos gssapi) $(use_enable kerberos krb5afspts)"
+ myconf="${myconf} $(use_enable idled)"
+ myconf="${myconf} $(use_enable nntp nntp)"
+
+ if use kerberos; then
+ myconf="${myconf} --with-auth=krb5"
+ else
+ myconf="${myconf} --with-auth=unix"
+ fi
+
+ econf \
+ --enable-murder \
+ --enable-listext \
+ --enable-netscapehack \
+ --with-extraident=Gentoo \
+ --with-service-path=/usr/lib/cyrus \
+ --with-cyrus-user=cyrus \
+ --with-cyrus-group=mail \
+ --with-com_err=yes \
+ --without-perl \
+ --disable-cyradm \
+ ${myconf} || die "econf failed"
+
+ # needed for parallel make. Bug #72352.
+ cd ${S}/imap
+ emake xversion.h || die "emake xversion.h failed"
+
+ cd ${S}
+ emake || die "compile problem"
+}
+
+src_install() {
+ dodir /usr/bin /usr/lib
+ for subdir in master imap imtest timsieved notifyd sieve; do
+ make -C "${subdir}" DESTDIR="${D}" install || die "make install failed"
+ done
+
+ # Link master to cyrusmaster (postfix has a master too)
+ dosym /usr/lib/cyrus/master /usr/lib/cyrus/cyrusmaster
+
+ doman man/*.[0-8]
+ dodoc COPYRIGHT README*
+ dohtml doc/*.html doc/murder.png
+ cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html"
+ cp -r contrib tools "${D}/usr/share/doc/${PF}"
+ find "${D}/usr/share/doc" -name CVS -print0 | xargs -0 rm -rf
+
+ insinto /etc
+ doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf"
+
+ newinitd "${FILESDIR}/cyrus.rc6" cyrus
+ newconfd "${FILESDIR}/cyrus.confd" cyrus
+ newpamd "${FILESDIR}/cyrus.pam-include" sieve
+
+ # do not install server.{key,pem) if they are exist.
+ if use ssl && [[ ! -f /etc/ssl/cyrus/server.key && ! -f /etc/ssl/cyrus/server.pem ]] ; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Cyrus IMAP Server}"
+ insinto /etc/ssl/cyrus
+ docert server
+ fowners cyrus:mail /etc/ssl/cyrus/server.{key,pem}
+ fi
+
+ for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
+ keepdir "/var/${subdir}"
+ fowners cyrus:mail "/var/${subdir}"
+ fperms 0750 "/var/${subdir}"
+ done
+ for subdir in imap/{user,quota,sieve} spool/imap ; do
+ for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do
+ keepdir "/var/${subdir}/${i}"
+ fowners cyrus:mail "/var/${subdir}/${i}"
+ fperms 0750 "/var/${subdir}/${i}"
+ done
+ done
+}
+
+pkg_postinst() {
+
+ enewuser cyrus -1 -1 /usr/cyrus mail
+
+ if df -T /var/imap | grep -q ' ext[23] ' ; then
+ ebegin "Making /var/imap/user/* and /var/imap/quota/* synchronous."
+ chattr +S /var/imap/{user,quota}{,/*}
+ eend $?
+ fi
+
+ if df -T /var/spool/imap | grep -q ' ext[23] ' ; then
+ ebegin "Making /var/spool/imap/* synchronous."
+ chattr +S /var/spool/imap{,/*}
+ eend $?
+ fi
+
+ ewarn "If the queue directory of the mail daemon resides on an ext2"
+ ewarn "or ext3 filesystem you need to set it manually to update"
+ ewarn "synchronously. E.g. 'chattr +S /var/spool/mqueue'."
+ echo
+
+ elog "For correct logging add the following to /etc/syslog.conf:"
+ elog " local6.* /var/log/imapd.log"
+ elog " auth.debug /var/log/auth.log"
+ echo
+
+ elog "You have to add user cyrus to the sasldb2. Do this with:"
+ elog " saslpasswd2 cyrus"
+}
diff --git a/net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r20.ebuild b/net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r20.ebuild
new file mode 100644
index 0000000..495fe08
--- /dev/null
+++ b/net-mail/cyrus-imapd/cyrus-imapd-2.3.9-r20.ebuild
@@ -0,0 +1,271 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/cyrus-imapd-2.3.9.ebuild,v 1.2 2007/09/07 19:53:24 dertobi123 Exp $
+
+inherit autotools eutils ssl-cert fixheadtails pam
+
+DESCRIPTION="The Cyrus IMAP Server."
+HOMEPAGE="http://asg.web.cmu.edu/cyrus/imapd/"
+SRC_URI="ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/${P}.tar.gz
+ mirror://gentoo/${P}-uoa.tbz2"
+LIBWRAP_PATCH_VER="2.2"
+DRAC_PATCH_VER="2.3.8"
+AUTOCREATE_PATCH_VER="0.10-0"
+AUTOSIEVE_PATCH_VER="0.6.0"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE="autocreate autosieve drac idled kerberos kolab nntp pam replication snmp ssl tcpd"
+
+PROVIDE="virtual/imapd"
+RDEPEND=">=sys-libs/db-3.2
+ >=dev-libs/cyrus-sasl-2.1.13
+ pam? (
+ virtual/pam
+ >=net-mail/mailbase-1
+ )
+ kerberos? ( virtual/krb5 )
+ snmp? ( >=net-analyzer/net-snmp-5.2.2-r1 )
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
+ drac? ( >=mail-client/drac-1.12-r1 )"
+
+DEPEND="$RDEPEND
+ sys-devel/libtool
+ >=sys-devel/autoconf-2.58
+ sys-devel/automake"
+
+new_net-snmp_check() {
+ # tcpd USE flag check. Bug #68254.
+ if use tcpd ; then
+ if has_version net-analyzer/net-snmp && ! built_with_use net-analyzer/net-snmp tcpd ; then
+ eerror "You are emerging this package with USE=\"tcpd\""
+ eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"-tcpd\""
+ fail_msg
+ fi
+ else
+ if has_version net-analyzer/net-snmp && built_with_use net-analyzer/net-snmp tcpd ; then
+ eerror "You are emerging this package with USE=\"-tcpd\""
+ eerror "but \"net-analyzer/net-snmp\" has been emerged with USE=\"tcpd\""
+ fail_msg
+ fi
+ fi
+ # DynaLoader check. Bug #67411
+
+ if [ -x "$(type -p net-snmp-config)" ]; then
+ einfo "$(type -p net-snmp-config) is found and executable."
+ NSC_AGENTLIBS="$(net-snmp-config --agent-libs)"
+ einfo "NSC_AGENTLIBS=\""${NSC_AGENTLIBS}"\""
+ if [ -z "$NSC_AGENTLIBS" ]; then
+ eerror "NSC_AGENTLIBS is null"
+ einfo "please report this to bugs.gentoo.org"
+ fi
+ for i in ${NSC_AGENTLIBS}; do
+ # check for the DynaLoader path.
+ if [ "$(expr "$i" : '.*\(DynaLoader\)')" == "DynaLoader" ] ; then
+ DYNALOADER_PATH="$i"
+ einfo "DYNALOADER_PATH=\""${DYNALOADER_PATH}"\""
+ if [[ ! -f "${DYNALOADER_PATH}" ]]; then
+ eerror "\""${DYNALOADER_PATH}"\" is not found."
+ einfo "Have you upgraded \"perl\" after"
+ einfo "you emerged \"net-snmp\". Please re-emerge"
+ einfo "\"net-snmp\" then try again. Bug #67411."
+ die "\""${DYNALOADER_PATH}"\" is not found."
+ fi
+ fi
+ done
+ else
+ eerror "\"net-snmp-config\" not found or not executable!"
+ die "You have \"net-snmp\" installed but \"net-snmp-config\" is not found or not executable. Please re-emerge \"net-snmp\" and try again!"
+ fi
+}
+
+fail_msg() {
+ eerror "enable "snmp" USE flag for this package requires"
+ eerror "that net-analyzer/net-snmp and this package both build with"
+ eerror "\"tcpd\" or \"-tcpd\". Bug #68254"
+ die "sanity check failed."
+}
+
+pkg_setup() {
+ use snmp && new_net-snmp_check
+ enewuser cyrus -1 -1 /usr/cyrus mail
+}
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ ht_fix_file ${S}/imap/xversion.sh
+
+ # Fix prestripped binaries
+ epatch "${FILESDIR}/${PN}-strip.patch"
+
+ # Unsupported UoA patch. Bug #112912 .
+ # http://email.uoa.gr/projects/cyrus/autocreate/
+ if use autocreate ; then
+ epatch "${WORKDIR}/${P}-autocreate-${AUTOCREATE_PATCH_VER}.diff"
+ use drac \
+ && epatch "${FILESDIR}/${PN}-${DRAC_PATCH_VER}-drac_with_autocreate.patch" \
+ && epatch "${S}/contrib/drac_auth.patch"
+ else
+ use drac && epatch "${S}/contrib/drac_auth.patch"
+ fi
+
+ # Unsupported UoA patch. Bug #133187 .
+ # http://email.uoa.gr/projects/cyrus/autosievefolder/
+ use autosieve && epatch "${WORKDIR}/${P}-autosieve-${AUTOSIEVE_PATCH_VER}.diff"
+
+ # Add libwrap defines as we don't have a dynamicly linked library.
+ use tcpd && epatch "${FILESDIR}/${PN}-${LIBWRAP_PATCH_VER}-libwrap.patch"
+
+ # Add kolab support.
+ if use kolab ; then
+ # For information on these patches see patch headers and
+ # http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/patches/cyrus-imapd/
+ epatch "${FILESDIR}/${P}-KOLAB_Groups.patch" || die "epatch failed"
+ epatch "${FILESDIR}/${P}-KOLAB_Annotations2.patch" || die "epatch failed"
+ epatch "${FILESDIR}/${P}-KOLAB_Logging.patch" || die "epatch failed"
+ epatch "${FILESDIR}/${P}-KOLAB_Folder-names.patch" || die "epatch failed"
+ epatch "${FILESDIR}/${P}-KOLAB_UID.patch" || die "epatch failed"
+ # These files are being created automatically and need to be updated
+ # after the patches used above
+ rm -f lib/imapopts.h lib/imapopts.c
+ fi
+
+ # Fix master(8)->cyrusmaster(8) manpage.
+ for i in `grep -rl -e 'master\.8' -e 'master(8)' "${S}"` ; do
+ sed -i -e 's:master\.8:cyrusmaster.8:g' \
+ -e 's:master(8):cyrusmaster(8):g' \
+ "${i}" || die "sed failed" || die "sed failed"
+ done
+ mv man/master.8 man/cyrusmaster.8 || die "mv failed"
+ sed -i -e "s:MASTER:CYRUSMASTER:g" \
+ -e "s:Master:Cyrusmaster:g" \
+ -e "s:master:cyrusmaster:g" \
+ man/cyrusmaster.8 || die "sed failed"
+
+ # Recreate configure.
+ WANT_AUTOCONF="2.5"
+ eautoreconf
+
+ # When linking with rpm, you need to link with more libraries.
+ sed -i -e "s:lrpm:lrpm -lrpmio -lrpmdb:" configure || die "sed failed"
+
+ if use kolab ; then
+ sed -i -e "s/{LIB_SASL}/{LIB_SASL} -lldap -llber /" configure || die "sed failed"
+ fi
+}
+
+src_compile() {
+ local myconf
+ myconf="${myconf} $(use_with drac)"
+ myconf="${myconf} $(use_with ssl openssl)"
+ myconf="${myconf} $(use_with snmp ucdsnmp)"
+ myconf="${myconf} $(use_with tcpd libwrap)"
+ myconf="${myconf} $(use_enable kerberos gssapi) $(use_enable kerberos krb5afspts)"
+ myconf="${myconf} $(use_enable idled)"
+ myconf="${myconf} $(use_enable nntp nntp)"
+ myconf="${myconf} $(use_enable replication)"
+
+ if use kerberos; then
+ myconf="${myconf} --with-auth=krb5"
+ else
+ myconf="${myconf} --with-auth=unix"
+ fi
+
+ econf \
+ --enable-murder \
+ --enable-listext \
+ --enable-netscapehack \
+ --with-extraident=Gentoo \
+ --with-service-path=/usr/lib/cyrus \
+ --with-cyrus-user=cyrus \
+ --with-cyrus-group=mail \
+ --with-com_err=yes \
+ --without-perl \
+ --disable-cyradm \
+ ${myconf} || die "econf failed"
+
+ # needed for parallel make. Bug #72352.
+ cd ${S}/imap
+ emake xversion.h || die "emake xversion.h failed"
+
+ cd ${S}
+ emake || die "compile problem"
+}
+
+src_install() {
+ dodir /usr/bin /usr/lib
+ for subdir in master imap imtest timsieved notifyd sieve; do
+ make -C "${subdir}" DESTDIR="${D}" install || die "make install failed"
+ done
+
+ # Link master to cyrusmaster (postfix has a master too)
+ dosym /usr/lib/cyrus/master /usr/lib/cyrus/cyrusmaster
+
+ doman man/*.[0-8]
+ dodoc COPYRIGHT README*
+ dohtml doc/*.html doc/murder.png
+ cp doc/cyrusv2.mc "${D}/usr/share/doc/${PF}/html"
+ cp -r contrib tools "${D}/usr/share/doc/${PF}"
+ find "${D}/usr/share/doc" -name CVS -print0 | xargs -0 rm -rf
+
+ insinto /etc
+ doins "${FILESDIR}/cyrus.conf" "${FILESDIR}/imapd.conf"
+
+ newinitd "${FILESDIR}/cyrus.rc6" cyrus
+ newconfd "${FILESDIR}/cyrus.confd" cyrus
+ newpamd "${FILESDIR}/cyrus.pam-include" sieve
+
+ # do not install server.{key,pem) if they are exist.
+ if use ssl && [[ ! -f /etc/ssl/cyrus/server.key && ! -f /etc/ssl/cyrus/server.pem ]] ; then
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Cyrus IMAP Server}"
+ insinto /etc/ssl/cyrus
+ docert server
+ fowners cyrus:mail /etc/ssl/cyrus/server.{key,pem}
+ fi
+
+ for subdir in imap/{,db,log,msg,proc,socket,sieve} spool/imap/{,stage.} ; do
+ keepdir "/var/${subdir}"
+ fowners cyrus:mail "/var/${subdir}"
+ fperms 0750 "/var/${subdir}"
+ done
+ for subdir in imap/{user,quota,sieve} spool/imap ; do
+ for i in a b c d e f g h i j k l m n o p q r s t v u w x y z ; do
+ keepdir "/var/${subdir}/${i}"
+ fowners cyrus:mail "/var/${subdir}/${i}"
+ fperms 0750 "/var/${subdir}/${i}"
+ done
+ done
+}
+
+pkg_postinst() {
+
+ enewuser cyrus -1 -1 /usr/cyrus mail
+
+ if df -T /var/imap | grep -q ' ext[23] ' ; then
+ ebegin "Making /var/imap/user/* and /var/imap/quota/* synchronous."
+ chattr +S /var/imap/{user,quota}{,/*}
+ eend $?
+ fi
+
+ if df -T /var/spool/imap | grep -q ' ext[23] ' ; then
+ ebegin "Making /var/spool/imap/* synchronous."
+ chattr +S /var/spool/imap{,/*}
+ eend $?
+ fi
+
+ ewarn "If the queue directory of the mail daemon resides on an ext2"
+ ewarn "or ext3 filesystem you need to set it manually to update"
+ ewarn "synchronously. E.g. 'chattr +S /var/spool/mqueue'."
+ echo
+
+ elog "For correct logging add the following to /etc/syslog.conf:"
+ elog " local6.* /var/log/imapd.log"
+ elog " auth.debug /var/log/auth.log"
+ echo
+
+ elog "You have to add user cyrus to the sasldb2. Do this with:"
+ elog " saslpasswd2 cyrus"
+}
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.2-db45.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.2-db45.patch
new file mode 100644
index 0000000..c92f957
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.2-db45.patch
@@ -0,0 +1,29 @@
+--- lib.old/cyrusdb_berkeley.c 2007-04-05 01:23:42.518845824 +0200
++++ lib/cyrusdb_berkeley.c 2007-04-05 01:22:20.000000000 +0200
+@@ -159,7 +159,15 @@
+ syslog(LOG_WARNING,
+ "DBERROR: invalid berkeley_locks_max value, using internal default");
+ } else {
++#if DB_VERSION_MAJOR >= 4
++ r = dbenv->set_lk_max_locks(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_lockers(dbenv, opt);
++ if (!r)
++ r = dbenv->set_lk_max_objects(dbenv, opt);
++#else
+ r = dbenv->set_lk_max(dbenv, opt);
++#endif
+ if (r) {
+ dbenv->err(dbenv, r, "set_lk_max");
+ syslog(LOG_ERR, "DBERROR: set_lk_max(): %s", db_strerror(r));
+--- cmulocal/berkdb.m4.orig 2007-05-01 18:05:00.000000000 +0200
++++ cmulocal/berkdb.m4 2007-05-01 18:05:17.000000000 +0200
+@@ -212,7 +212,7 @@
+ fi
+
+ saved_LIBS=$LIBS
+- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
++ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ do
+ LIBS="$saved_LIBS -l$dbname"
+ AC_TRY_LINK([#include <db.h>],
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.2-libwrap.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.2-libwrap.patch
new file mode 100644
index 0000000..6157c87
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.2-libwrap.patch
@@ -0,0 +1,11 @@
+--- master/Makefile.in.orig 2004-10-17 19:48:01.923901016 -0700
++++ master/Makefile.in 2004-10-17 19:48:33.639079576 -0700
+@@ -59,7 +59,7 @@
+
+ CFLAGS = @CFLAGS@
+ LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@
+-LIBS = ../lib/libcyrus_min.a @LIB_UCDSNMP@ @LIBS@ @COM_ERR_LIBS@
++LIBS = ../lib/libcyrus_min.a @LIB_UCDSNMP@ @LIBS@ @COM_ERR_LIBS@ @LIB_WRAP@
+
+ SHELL = /bin/sh
+ MAKEDEPEND = @MAKEDEPEND@
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-annotate.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-annotate.patch
new file mode 100644
index 0000000..f01d7d9
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-annotate.patch
@@ -0,0 +1,113 @@
+diff -Naur cyrus-imapd-2.3.7.orig/imap/annotate.c cyrus-imapd-2.3.7/imap/annotate.c
+--- cyrus-imapd-2.3.7.orig/imap/annotate.c 2006-10-03 17:46:04.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/annotate.c 2006-10-04 09:27:37.000000000 +0200
+@@ -1793,6 +1793,11 @@
+ { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
+ };
+
++const struct annotate_st_entry vendor_entry =
++ { NULL, ATTRIB_TYPE_STRING, BACKEND_ONLY,
++ ATTRIB_VALUE_SHARED | ATTRIB_VALUE_PRIV,
++ ACL_ADMIN, annotation_set_todb, NULL };
++
+ int annotatemore_store(char *mailbox,
+ struct entryattlist *l,
+ struct namespace *namespace,
+@@ -1805,6 +1810,7 @@
+ struct attvaluelist *av;
+ struct storedata sdata;
+ const struct annotate_st_entry *entries;
++ struct annotate_st_entry * working_entry;
+ time_t now = time(0);
+
+ memset(&sdata, 0, sizeof(struct storedata));
+@@ -1826,34 +1832,52 @@
+ while (e) {
+ int entrycount, attribs;
+ struct annotate_st_entry_list *nentry = NULL;
++ struct annotate_st_entry *ientry = NULL;
+
+ /* See if we support this entry */
++ working_entry = NULL;
+ for (entrycount = 0;
+ entries[entrycount].name;
+ entrycount++) {
+ if (!strcmp(e->entry, entries[entrycount].name)) {
++ working_entry = &(entries[entrycount]);
+ break;
+ }
+ }
+- if (!entries[entrycount].name) {
+- /* unknown annotation */
+- return IMAP_PERMISSION_DENIED;
++ if (working_entry==NULL) {
++ /* test for generic vendor annotation */
++ if ((strncmp("/vendor/", e->entry, strlen("/vendor/"))==0) &&
++ (strlen(e->entry)>strlen("/vendor/"))) {
++ working_entry = &(vendor_entry);
++ }
++ else {
++ /* unknown annotation */
++ return IMAP_PERMISSION_DENIED;
++ }
+ }
+
+ /* Add this entry to our list only if it
+ applies to our particular server type */
+- if ((entries[entrycount].proxytype != PROXY_ONLY)
++ if ((working_entry->proxytype != PROXY_ONLY)
+ || proxy_store_func) {
++ ientry = xzmalloc(sizeof(struct annotate_st_entry));
++ ientry->name = e->entry;
++ ientry->type = working_entry->type;
++ ientry->proxytype = working_entry->proxytype;
++ ientry->attribs = working_entry->attribs;
++ ientry->acl = working_entry->acl;
++ ientry->set = working_entry->set;
++ ientry->rock = working_entry->rock;
+ nentry = xzmalloc(sizeof(struct annotate_st_entry_list));
+ nentry->next = sdata.entry_list;
+- nentry->entry = &(entries[entrycount]);
++ nentry->entry = ientry;
+ nentry->shared.modifiedsince = now;
+ nentry->priv.modifiedsince = now;
+ sdata.entry_list = nentry;
+ }
+
+ /* See if we are allowed to set the given attributes. */
+- attribs = entries[entrycount].attribs;
++ attribs = working_entry->attribs;
+ av = e->attvalues;
+ while (av) {
+ const char *value;
+@@ -1863,7 +1887,7 @@
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+- entries[entrycount].type);
++ working_entry->type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+@@ -1889,7 +1913,7 @@
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+- entries[entrycount].type);
++ working_entry->type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+@@ -1993,6 +2017,12 @@
+ /* Free the entry list */
+ while (sdata.entry_list) {
+ struct annotate_st_entry_list *freeme = sdata.entry_list;
++ if (freeme != NULL){
++ struct annotate_st_entry *freeme2 = freeme->entry;
++ if (freeme2 != NULL) {
++ free( freeme2 );
++ }
++ }
+ sdata.entry_list = sdata.entry_list->next;
+ free(freeme);
+ }
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-drac_with_autocreate.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-drac_with_autocreate.patch
new file mode 100644
index 0000000..3b57e95
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-drac_with_autocreate.patch
@@ -0,0 +1,46 @@
+--- contrib/drac_auth.patch.orig 2007-07-28 12:10:05.253222371 +0200
++++ contrib/drac_auth.patch 2007-07-28 12:12:51.105920502 +0200
+@@ -107,23 +107,23 @@
+ DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@
+
+ @@ -202,17 +203,17 @@
+- imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
++ imapd: xversion $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o imapd \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o \
+-- libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+-+ libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
++- libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+++ libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+- imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
++ imapd.pure: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
+ $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imapd.pure \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+-- $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+-+ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
++- $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+++ $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+- imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(DEPLIBS) $(SERVICE)
++ imapd.quant: $(IMAPDOBJS) mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(SERVICE)
+ $(QUANTIFY) $(QUANTOPT) $(CC) $(LDFLAGS) -o imapd.quant \
+ $(SERVICE) $(IMAPDOBJS) mutex_fake.o libimap.a \
+-- $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+-+ $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) $(DRAC_LIBS)
++- $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+++ $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS) $(DRAC_LIBS)
+
+ mupdate: mupdate.o mupdate-slave.o mupdate-client.o mutex_pthread.o tls.o \
+ libimap.a $(DEPLIBS)
+@@ -131,8 +131,8 @@
+ pop3d: pop3d.o proxy.o backend.o tls.o mutex_fake.o libimap.a \
+ $(DEPLIBS) $(SERVICE)
+ $(CC) $(LDFLAGS) -o pop3d pop3d.o proxy.o backend.o tls.o $(SERVICE) \
+-- mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+-+ mutex_fake.o libimap.a $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
++- mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP)
+++ mutex_fake.o libimap.a $(SIEVE_LIBS) $(DEPLIBS) $(LIBS) $(LIB_WRAP) $(DRAC_LIBS)
+
+ nntpd: nntpd.o proxy.o backend.o index.o smtpclient.o spool.o tls.o \
+ mutex_fake.o nntp_err.o libimap.a $(DEPLIBS) $(SERVICE)
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-goodchars.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-goodchars.patch
new file mode 100644
index 0000000..0148add
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-goodchars.patch
@@ -0,0 +1,18 @@
+diff -upr ../cyrus-imapd-2.2.12.orig/imap/mboxname.c ./imap/mboxname.c
+--- ../cyrus-imapd-2.2.12.orig/imap/mboxname.c 2005-02-14 07:39:57.000000000 +0100
++++ ./imap/mboxname.c 2005-04-21 00:59:50.879253320 +0200
+@@ -649,8 +649,13 @@ int mboxname_netnewscheck(char *name)
+ /*
+ * Apply site policy restrictions on mailbox names.
+ * Restrictions are hardwired for now.
+- */
++
++ * original definition
+ #define GOODCHARS " +,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
++ */
++
++#define GOODCHARS " #$%'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
++
+ int mboxname_policycheck(char *name)
+ {
+ unsigned i;
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group.patch
new file mode 100644
index 0000000..fce3426
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group.patch
@@ -0,0 +1,219 @@
+diff -Naur cyrus-imapd-2.3.7.orig/lib/auth_unix.c cyrus-imapd-2.3.7/lib/auth_unix.c
+--- cyrus-imapd-2.3.7.orig/lib/auth_unix.c 2006-10-03 17:46:02.000000000 +0200
++++ cyrus-imapd-2.3.7/lib/auth_unix.c 2006-10-04 10:18:31.000000000 +0200
+@@ -48,6 +48,7 @@
+ #include <stdlib.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
+
+@@ -55,6 +56,126 @@
+ #include "libcyr_cfg.h"
+ #include "xmalloc.h"
+
++#ifdef __FreeBSD__
++/*
++ * __getgrent.c - This file is part of the libc-8086/grp package for ELKS,
++ * Copyright (C) 1995, 1996 Nat Friedman <ndf@linux.mit.edu>.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the Free
++ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#include <unistd.h>
++#include <string.h>
++#include <errno.h>
++
++static struct group *__getgrent(int grp_fd, char *line_buff, char **members)
++{
++ short line_index;
++ short buff_size;
++ static struct group group;
++ register char *ptr;
++ char *field_begin;
++ short member_num;
++ char *endptr;
++ int line_len;
++
++ /* We use the restart label to handle malformatted lines */
++ restart:
++ line_index = 0;
++ buff_size = 256;
++
++ line_buff = realloc(line_buff, buff_size);
++ while (1) {
++ if ((line_len = read(grp_fd, line_buff + line_index,
++ buff_size - line_index)) <= 0) {
++ return NULL;
++ }
++ field_begin = strchr(line_buff, '\n');
++ if (field_begin != NULL) {
++ lseek(grp_fd,
++ (long) (1 + field_begin -
++ (line_len + line_index + line_buff)), SEEK_CUR);
++ *field_begin = '\0';
++ if (*line_buff == '#' || *line_buff == ' '
++ || *line_buff == '\n' || *line_buff == '\t')
++ goto restart;
++ break;
++ } else {
++ /* Allocate some more space */
++ line_index = buff_size;
++ buff_size += 256;
++ line_buff = realloc(line_buff, buff_size);
++ }
++ }
++
++ /* Now parse the line */
++ group.gr_name = line_buff;
++ ptr = strchr(line_buff, ':');
++ if (ptr == NULL)
++ goto restart;
++ *ptr++ = '\0';
++
++ group.gr_passwd = ptr;
++ ptr = strchr(ptr, ':');
++ if (ptr == NULL)
++ goto restart;
++ *ptr++ = '\0';
++
++ field_begin = ptr;
++ ptr = strchr(ptr, ':');
++ if (ptr == NULL)
++ goto restart;
++ *ptr++ = '\0';
++
++ group.gr_gid = (gid_t) strtoul(field_begin, &endptr, 10);
++ if (*endptr != '\0')
++ goto restart;
++
++ member_num = 0;
++ field_begin = ptr;
++
++ if (members != NULL)
++ free(members);
++ members = (char **) malloc((member_num + 1) * sizeof(char *));
++ for ( ; field_begin && *field_begin != '\0'; field_begin = ptr) {
++ if ((ptr = strchr(field_begin, ',')) != NULL)
++ *ptr++ = '\0';
++ members[member_num++] = field_begin;
++ members = (char **) realloc(members,
++ (member_num + 1) * sizeof(char *));
++ }
++ members[member_num] = NULL;
++
++ group.gr_mem = members;
++ return &group;
++}
++
++static char *line_buff = NULL;
++static char **members = NULL;
++
++struct group *fgetgrent(FILE *file)
++{
++ if (file == NULL) {
++ errno = EINTR;
++ return NULL;
++ }
++ return __getgrent(fileno(file), line_buff, members);
++}
++#endif /* __FreeBSD__ */
++
+ struct auth_state {
+ char userid[81];
+ char **group;
+@@ -142,6 +263,25 @@
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
++static struct group* fgetgrnam(const char* name)
++{
++ struct group *grp;
++ FILE *groupfile;
++
++ groupfile = fopen("/etc/imapd.group", "r");
++ if (!groupfile) groupfile = fopen("/etc/group", "r");
++ if (groupfile) {
++ while ((grp = fgetgrent(groupfile))) {
++ if (strcmp(grp->gr_name, name) == 0) {
++ fclose(groupfile);
++ return grp;
++ }
++ }
++ }
++ if (groupfile) fclose(groupfile);
++ return NULL;
++}
++
+ /*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+@@ -177,7 +317,7 @@
+ */
+
+ if (!strncmp(retbuf, "group:", 6)) {
+- grp = getgrnam(retbuf+6);
++ grp = fgetgrnam(retbuf+6);
+ if (!grp) return 0;
+ strcpy(retbuf+6, grp->gr_name);
+ return retbuf;
+@@ -224,6 +364,7 @@
+ struct passwd *pwd;
+ struct group *grp;
+ char **mem;
++ FILE *groupfile;
+
+ identifier = mycanonifyid(identifier, 0);
+ if (!identifier) return 0;
+@@ -240,20 +381,23 @@
+
+ pwd = getpwnam(identifier);
+
+- setgrent();
+- while ((grp = getgrent())) {
+- for (mem = grp->gr_mem; *mem; mem++) {
+- if (!strcmp(*mem, identifier)) break;
+- }
+-
+- if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
+- newstate->ngroups++;
+- newstate->group = (char **)xrealloc((char *)newstate->group,
+- newstate->ngroups * sizeof(char *));
+- newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
+- }
+- }
+- endgrent();
++ groupfile = fopen("/etc/imapd.group", "r");
++ if (!groupfile) groupfile = fopen("/etc/group", "r");
++ if (groupfile) {
++ while ((grp = fgetgrent(groupfile))) {
++ for (mem = grp->gr_mem; *mem; mem++) {
++ if (!strcmp(*mem, identifier)) break;
++ }
++
++ if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
++ newstate->ngroups++;
++ newstate->group = (char **)xrealloc((char *)newstate->group,
++ newstate->ngroups * sizeof(char *));
++ newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
++ }
++ }
++ fclose(groupfile);
++ }
+ return newstate;
+ }
+
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group2.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group2.patch
new file mode 100644
index 0000000..088ae36
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-group2.patch
@@ -0,0 +1,20 @@
+--- ../cyrus-imapd-2.2.6.kolab-orig/lib/auth_unix.c 2004-10-09 00:07:45.000000000 +0200
++++ lib/auth_unix.c 2004-10-09 00:29:58.000000000 +0200
+@@ -274,7 +274,7 @@ static struct group* fgetgrnam(const cha
+ if (!groupfile) groupfile = fopen("/etc/group", "r");
+ if (groupfile) {
+ while ((grp = fgetgrent(groupfile))) {
+- if (strcmp(grp->gr_name, name) == 0) {
++ if (strcasecmp(grp->gr_name, name) == 0) {
+ fclose(groupfile);
+ return grp;
+ }
+@@ -386,7 +386,7 @@ struct auth_state *auth_newstate(const c
+ if (groupfile) {
+ while ((grp = fgetgrent(groupfile))) {
+ for (mem = grp->gr_mem; *mem; mem++) {
+- if (!strcmp(*mem, identifier)) break;
++ if (!strcasecmp(*mem, identifier)) break;
+ }
+
+ if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-kolab.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-kolab.patch
new file mode 100644
index 0000000..afa2096
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-kolab.patch
@@ -0,0 +1,136 @@
+diff -Naur cyrus-imapd-2.3.7.orig/configure cyrus-imapd-2.3.7/configure
+--- cyrus-imapd-2.3.7.orig/configure 2006-10-03 17:46:05.000000000 +0200
++++ cyrus-imapd-2.3.7/configure 2006-10-04 10:31:58.000000000 +0200
+@@ -18092,7 +18092,7 @@
+ done
+
+ IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
+-IMAP_LIBS="${LIB_SASL} ${LIBS}"
++IMAP_LIBS="${LIB_SASL} -lldap -llber ${LIBS}"
+
+
+
+diff -Naur cyrus-imapd-2.3.7.orig/imap/global.c cyrus-imapd-2.3.7/imap/global.c
+--- cyrus-imapd-2.3.7.orig/imap/global.c 2006-10-03 17:46:03.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/global.c 2006-10-04 10:31:58.000000000 +0200
+@@ -52,6 +52,9 @@
+ #include <netinet/in.h>
+ #include <sys/stat.h>
+
++#include <ldap.h>
++#include <lber.h>
++
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+@@ -355,6 +358,18 @@
+ char *domain = NULL;
+ int len = strlen(user);
+ char buf[81];
++ const char *uri;
++ const char *base;
++ const char *binddn;
++ const char *bindpw;
++ struct timeval timeout;
++ char filter[255];
++ LDAP *handle;
++ LDAPMessage *res;
++ LDAPMessage *entry;
++ char ** vals;
++
++ int rc;
+
+ /* check for domain */
+ if (config_virtdomains &&
+@@ -373,6 +388,47 @@
+ }
+
+ if (config_virtdomains) {
++ if (config_virtdomains == IMAP_ENUM_VIRTDOMAINS_LDAP) {
++ uri = config_getstring(IMAPOPT_LDAP_URI);
++ base = config_getstring(IMAPOPT_LDAP_BASE);
++ binddn = config_getstring(IMAPOPT_LDAP_BIND_DN);
++ bindpw = config_getstring(IMAPOPT_LDAP_PASSWORD);
++ timeout.tv_sec = config_getint(IMAPOPT_LDAP_TIME_LIMIT);
++ timeout.tv_usec = 0;
++ sprintf(filter, "(uid=%s)", user);
++ rc = ldap_initialize(&handle, uri);
++ if (rc != LDAP_SUCCESS) {
++ syslog(LOG_ERR, "ldap_initialize failed (%s)", uri);
++ } else {
++ rc = ldap_simple_bind_s(handle, binddn, bindpw);
++ if (rc != LDAP_SUCCESS) {
++ syslog(LOG_ERR, "ldap_simple_bind() failed %d (%s)", rc, ldap_err2string(rc));
++ } else {
++ rc = ldap_search_st(handle, base, LDAP_SCOPE_SUBTREE, filter, NULL, 0, &timeout, &res);
++ if (rc != LDAP_SUCCESS) {
++ syslog(LOG_ERR, "ldap_search_st failed %d (%s)", rc, ldap_err2string(rc));
++ } else {
++ if ( (entry = ldap_first_entry(handle, res)) != NULL ) {
++ // read mail attribute from entry
++ if ( (vals = ldap_get_values(handle, entry, "mail")) ) {
++ if (strchr(vals[0], '@')) {
++ static char buf[81]; /* same size as in auth_canonifyid */
++ strncpy( buf, vals[0], sizeof(buf) );
++ buf[80] = '\0'; /* make sure it's null-terminated */
++ ldap_value_free( vals );
++ ldap_msgfree( res );
++ ldap_unbind_s(handle); /* also frees handle */
++ return auth_canonifyid( buf, 0) ;
++ }
++ ldap_value_free( vals );
++ }
++ }
++ ldap_msgfree( res );
++ }
++ }
++ ldap_unbind_s(handle); /* also frees handle */
++ }
++ }
+ if (domain) {
+ if (config_defdomain && !strcasecmp(config_defdomain, domain+1)) {
+ *domain = '\0'; /* trim the default domain */
+@@ -385,7 +441,7 @@
+ user = buf;
+ }
+ }
+- else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID) {
++ else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID && config_virtdomains != IMAP_ENUM_VIRTDOMAINS_LDAP) {
+ socklen_t salen;
+ int error;
+ struct sockaddr_storage localaddr;
+diff -Naur cyrus-imapd-2.3.7.orig/lib/imapoptions cyrus-imapd-2.3.7/lib/imapoptions
+--- cyrus-imapd-2.3.7.orig/lib/imapoptions 2006-10-03 17:46:02.000000000 +0200
++++ cyrus-imapd-2.3.7/lib/imapoptions 2006-10-04 10:31:58.000000000 +0200
+@@ -998,7 +998,7 @@
+ mailbox hierarchy. The default is to use the netnews separator
+ character '.'. */
+
+-{ "virtdomains", "off", ENUM("off", "userid", "on") }
++{ "virtdomains", "off", ENUM("off", "userid", "ldap", "on") }
+ /* Enable virtual domain support. If enabled, the user's domain will
+ be determined by splitting a fully qualified userid at the last '@'
+ or '%' symbol. If the userid is unqualified, and the virtdomains
+diff -Naur cyrus-imapd-2.3.7.orig/lib/imapopts.c cyrus-imapd-2.3.7/lib/imapopts.c
+--- cyrus-imapd-2.3.7.orig/lib/imapopts.c 2006-10-03 17:46:02.000000000 +0200
++++ cyrus-imapd-2.3.7/lib/imapopts.c 2006-10-04 10:31:58.000000000 +0200
+@@ -213,7 +213,7 @@
+ { IMAPOPT_USERPREFIX, "userprefix", 0, {(void *)("Other Users")}, OPT_STRING, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_UNIX_GROUP_ENABLE, "unix_group_enable", 0, {(void*)1}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+ { IMAPOPT_UNIXHIERARCHYSEP, "unixhierarchysep", 0, {(void*)0}, OPT_SWITCH, { { NULL, IMAP_ENUM_ZERO } } },
+- { IMAPOPT_VIRTDOMAINS, "virtdomains", 0, {(void *)(IMAP_ENUM_VIRTDOMAINS_OFF)}, OPT_ENUM, { { "off" , IMAP_ENUM_VIRTDOMAINS_OFF }, { "userid" , IMAP_ENUM_VIRTDOMAINS_USERID }, { "on" , IMAP_ENUM_VIRTDOMAINS_ON }, { NULL, IMAP_ENUM_ZERO } } },
++ { IMAPOPT_VIRTDOMAINS, "virtdomains", 0, {(void *)(IMAP_ENUM_VIRTDOMAINS_OFF)}, OPT_ENUM, { { "off" , IMAP_ENUM_VIRTDOMAINS_OFF }, { "userid" , IMAP_ENUM_VIRTDOMAINS_USERID }, { "ldap" , IMAP_ENUM_VIRTDOMAINS_LDAP }, { "on" , IMAP_ENUM_VIRTDOMAINS_ON }, { NULL, IMAP_ENUM_ZERO } } },
+
+ { IMAPOPT_LAST, NULL, 0, { NULL }, OPT_NOTOPT, { { NULL, IMAP_ENUM_ZERO } } }
+
+diff -Naur cyrus-imapd-2.3.7.orig/lib/imapopts.h cyrus-imapd-2.3.7/lib/imapopts.h
+--- cyrus-imapd-2.3.7.orig/lib/imapopts.h 2006-10-03 17:46:02.000000000 +0200
++++ cyrus-imapd-2.3.7/lib/imapopts.h 2006-10-04 10:33:45.000000000 +0200
+@@ -214,6 +214,7 @@
+
+ IMAP_ENUM_VIRTDOMAINS_ON,
+ IMAP_ENUM_VIRTDOMAINS_USERID,
++ IMAP_ENUM_VIRTDOMAINS_LDAP,
+ IMAP_ENUM_VIRTDOMAINS_OFF = 0,
+ IMAP_ENUM_SIEVE_EXTENSIONS_COPY = (1<<11),
+ IMAP_ENUM_SIEVE_EXTENSIONS_SUBADDRESS = (1<<10),
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-morelogging.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-morelogging.patch
new file mode 100644
index 0000000..aad54b6
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-morelogging.patch
@@ -0,0 +1,37 @@
+diff -Naur cyrus-imapd-2.3.7.orig/imap/append.c cyrus-imapd-2.3.7/imap/append.c
+--- cyrus-imapd-2.3.7.orig/imap/append.c 2006-10-03 17:46:03.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/append.c 2006-10-04 10:53:13.000000000 +0200
+@@ -652,6 +652,9 @@
+ /* ok, we've successfully added a message */
+ as->quota_used += message_index.size;
+
++ syslog(LOG_DEBUG, "append_fromstage: message %d added to %s",
++ message_index.uid, mailbox->name );
++
+ return 0;
+ }
+
+diff -Naur cyrus-imapd-2.3.7.orig/imap/imapd.c cyrus-imapd-2.3.7/imap/imapd.c
+--- cyrus-imapd-2.3.7.orig/imap/imapd.c 2006-10-03 17:46:04.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/imapd.c 2006-10-04 10:53:13.000000000 +0200
+@@ -3494,6 +3494,8 @@
+ else {
+ prot_printf(imapd_out, "%s OK %s\r\n", tag,
+ error_message(IMAP_OK_COMPLETED));
++ syslog(LOG_DEBUG, "cmd_expunge: user %s, mailbox %s, sequence %s",
++ imapd_userid, imapd_mailbox->name, "''");
+ }
+ }
+
+diff -Naur cyrus-imapd-2.3.7.orig/imap/mailbox.c cyrus-imapd-2.3.7/imap/mailbox.c
+--- cyrus-imapd-2.3.7.orig/imap/mailbox.c 2006-10-03 17:46:04.000000000 +0200
++++ cyrus-imapd-2.3.7/imap/mailbox.c 2006-10-04 10:53:27.000000000 +0200
+@@ -2455,6 +2455,8 @@
+ *(fname->tail)++ = '/';
+ fname->len++;
+ for (msgno = 0; msgno < numdeleted; msgno++) {
++ syslog(LOG_DEBUG, "mailbox_expunge: removing mail %s:%d",
++ mailbox->name, deleted[msgno]);
+ mailbox_message_get_fname(mailbox, deleted[msgno],
+ fname->tail,
+ sizeof(fname->buf) - fname->len);
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-openpkg.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-openpkg.patch
new file mode 100644
index 0000000..98c1eb8
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-openpkg.patch
@@ -0,0 +1,94 @@
+Index: et/com_err.c
+--- et/com_err.c.orig 2003-06-04 05:27:50.000000000 +0200
++++ et/com_err.c 2004-02-02 19:56:00.000000000 +0100
+@@ -50,7 +50,7 @@
+ #include <string.h>
+ #include "mit-sipb-copyright.h"
+
+-#if defined(HAVE_STDARG_H) || defined(_WINDOWS)
++#if defined(HAVE_STDARG_H) || defined(__STDC__) || defined(_WINDOWS)
+ #include <stdarg.h>
+ #else
+ #include <varargs.h>
+Index: lib/cyrusdb_skiplist.c
+--- lib/cyrusdb_skiplist.c.orig 2003-12-15 17:04:35.000000000 +0100
++++ lib/cyrusdb_skiplist.c 2004-02-02 19:56:00.000000000 +0100
+@@ -71,6 +71,11 @@
+
+ #define PROB (0.5)
+
++#ifdef __FreeBSD__
++/* #define fdatasync(fd) fsync(fd) */
++#define O_DSYNC 0
++#endif
++
+ /*
+ *
+ * disk format; all numbers in network byte order
+Index: lib/prot.h
+--- lib/prot.h.orig 2003-10-22 20:50:12.000000000 +0200
++++ lib/prot.h 2004-02-02 19:58:47.000000000 +0100
+@@ -49,6 +49,7 @@
+ #include <time.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <sys/time.h>
+
+ #include <sasl/sasl.h>
+
+Index: perl/sieve/lib/isieve.c
+--- perl/sieve/lib/isieve.c.orig 2003-10-22 20:50:25.000000000 +0200
++++ perl/sieve/lib/isieve.c 2004-02-02 20:01:21.000000000 +0100
+@@ -41,9 +41,7 @@
+
+ /* $Id: imapd.patch,v 1.12 2004/11/13 14:53:34 rse Exp $ */
+
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
++#include "../../../config.h"
+
+ #ifdef HAVE_UNISTD_H
+ #include <unistd.h>
+Index: perl/Makefile.in
+--- perl/Makefile.in.orig 2003-10-22 20:50:17.000000000 +0200
++++ perl/Makefile.in 2004-02-02 21:23:32.000000000 +0100
+@@ -82,7 +82,8 @@
+ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \
+ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \
+ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \
+- $(PERL) Makefile.PL PREFIX=$(prefix); \
++ $(PERL) Makefile.PL PREFIX=$(prefix) \
++ INSTALLDIRS="vendor" INSTALLMAN3DIR="none" INSTALLSITEMAN3DIR="none" INSTALLVENDORMAN3DIR="none"; \
+ fi; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
+ done
+Index: perl/sieve/Makefile.in
+--- perl/sieve/Makefile.in.orig 2003-10-22 20:50:24.000000000 +0200
++++ perl/sieve/Makefile.in 2004-02-02 21:41:22.000000000 +0100
+@@ -84,7 +84,8 @@
+ BDB_LIB="$(BDB_LIB)" BDB_INC="$(BDB_INC)" \
+ OPENSSL_LIB="$(OPENSSL_LIB)" OPENSSL_INC="$(OPENSSL_INC)" \
+ SASL_LIB="$(SASL_LIB)" SASL_INC="$(SASL_INC)" CC="$(CC)" \
+- $(PERL) Makefile.PL PREFIX=$(prefix); \
++ $(PERL) Makefile.PL PREFIX=$(prefix) \
++ INSTALLDIRS="vendor" INSTALLMAN3DIR="none" INSTALLSITEMAN3DIR="none" INSTALLVENDORMAN3DIR="none"; \
+ fi; \
+ $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) all) || exit 1; \
+ done
+Index: imap/mboxname.c
+--- imap/mboxname.c.orig 2004-03-17 10:03:40.000000000 +0200
++++ imap/mboxname.c 2004-03-17 10:03:40.000000000 +0200
+@@ -129,7 +129,11 @@
+ domainlen = strlen(result);
+ }
+ }
++#ifdef ATVDOM /* allow '@' being a regular character in mboxname even when using virtual domains */
++ else if ((cp = strrchr(name, '@'))) {
++#else
+ if ((cp = strrchr(name, '@'))) {
++#endif /* ATVDOM */
+ /* mailbox specified as mbox@domain */
+ namelen = cp - name;
+
+
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-pts.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-pts.patch
new file mode 100644
index 0000000..a7bd428
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.8-pts.patch
@@ -0,0 +1,21 @@
+--- configure.in.old 2007-07-28 13:02:41.505734616 +0200
++++ configure.in 2007-07-28 13:04:37.431049483 +0200
+@@ -563,12 +563,12 @@
+ LDFLAGS=$save_LDFLAGS
+ fi
+
+-if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
+- EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
+- EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
+-
+- AC_DEFINE(WITH_PTS,[],[Build in PTS support?])
+-fi
++#if test "x$with_afs" != "xno" -o "x$with_ldap" != "xno"; then
++# EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
++# EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile"
++#
++# AC_DEFINE(WITH_PTS,[],[Build in PTS support?])
++#fi
+
+
+
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Annotations2.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Annotations2.patch
new file mode 100644
index 0000000..fd55996
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Annotations2.patch
@@ -0,0 +1,359 @@
+Provides a new version of annotation support for the cyrus imapd server [Version: 2.3.9]
+
+diff -r 43265f589d80 imap/annotate.c
+--- a/imap/annotate.c Sat Sep 29 13:49:34 2007 +0200
++++ b/imap/annotate.c Sat Sep 29 13:56:24 2007 +0200
+@@ -40,6 +40,13 @@
+ *
+ */
+ /*
++ * This file contains code Copyright (c) 2006 by Thomas Viehmann.
++ * You may distribute source code or binaries under the conditions
++ * conditions given in the CMU license, provided this note stays intact
++ * in the distributed source. If you want to distribute my code without
++ * this notice, do contact me at <tv@beamnet.de>.
++ */
++/*
+ * $Id: annotate.c,v 1.36 2007/08/15 17:20:55 murch Exp $
+ */
+
+@@ -92,6 +99,8 @@ int (*proxy_store_func)(const char *serv
+ int (*proxy_store_func)(const char *server, const char *mbox_pat,
+ struct entryattlist *entryatts) = NULL;
+
++void init_annotation_definitions();
++
+ /* String List Management */
+ /*
+ * Append 's' to the strlist 'l'. Possibly include metadata.
+@@ -238,6 +247,8 @@ void annotatemore_init(int myflags,
+ if (store_func) {
+ proxy_store_func = store_func;
+ }
++
++ init_annotation_definitions();
+ }
+
+ void annotatemore_open(char *fname)
+@@ -1797,6 +1808,224 @@ const struct annotate_st_entry mailbox_r
+ { NULL, 0, ANNOTATION_PROXY_T_INVALID, 0, 0, NULL, NULL }
+ };
+
++struct annotate_st_entry_list *server_entries_list = NULL;
++struct annotate_st_entry_list *mailbox_rw_entries_list = NULL;
++
++enum {
++ ANNOTATION_SCOPE_SERVER = 1,
++ ANNOTATION_SCOPE_MAILBOX = 2
++};
++
++const struct annotate_attrib annotation_scope_names[] =
++{
++ { "server", ANNOTATION_SCOPE_SERVER },
++ { "mailbox", ANNOTATION_SCOPE_MAILBOX },
++ { NULL, 0 }
++};
++
++const struct annotate_attrib annotation_proxy_type_names[] =
++{
++ { "proxy", PROXY_ONLY },
++ { "backend", BACKEND_ONLY },
++ { "proxy_and_backend", PROXY_AND_BACKEND },
++ { NULL, 0 }
++};
++
++const struct annotate_attrib attribute_type_names[] =
++{
++ { "content-type", ATTRIB_TYPE_CONTENTTYPE },
++ { "string", ATTRIB_TYPE_STRING },
++ { "boolean", ATTRIB_TYPE_BOOLEAN },
++ { "uint", ATTRIB_TYPE_UINT },
++ { "int", ATTRIB_TYPE_INT },
++ { NULL, 0 }
++};
++
++#define ANNOT_DEF_MAXLINELEN 1024
++
++int table_lookup(const struct annotate_attrib *table,
++ char* name,
++ size_t namelen,
++ char* errmsg)
++/* search in table for the value given by name and namelen (name is null-terminated,
++ but possibly more than just the key). errmsg is used to hint the user where we failed */
++{
++ char errbuf[ANNOT_DEF_MAXLINELEN*2];
++ int entry;
++
++ for (entry = 0; table[entry].name &&
++ (strncasecmp(table[entry].name, name, namelen)
++ || table[entry].name[namelen] != '\0'); entry++);
++
++ if (! table[entry].name) {
++ sprintf(errbuf, "invalid %s at '%s'", errmsg, name);
++ fatal(errbuf, EC_CONFIG);
++ }
++ return table[entry].entry;
++}
++
++char *consume_comma(char* p)
++ /* advance beyond the next ',', skipping whitespace, fail if next non-space is no comma */
++{
++ char errbuf[ANNOT_DEF_MAXLINELEN*2];
++
++ for (; *p && isspace(*p); p++);
++ if (*p != ',') {
++ sprintf(errbuf, "',' expected, '%s' found parsing annotation definition",
++ p);
++ fatal(errbuf, EC_CONFIG);
++ }
++ p++;
++ for (; *p && isspace(*p); p++);
++
++ return p;
++}
++
++int parse_table_lookup_bitmask(const struct annotate_attrib *table,
++ char** s,
++ char* errmsg)
++ /* parses strings of the form value1 [ value2 [ ... ]]
++ value1 is mapped via table to ints and the result ored
++ whitespace is allowed between value names and punctuation
++ the field must end in '\0' or ','
++ s is advanced to '\0' or ','
++ on error errmsg is used to identify item to be parsed
++ */
++{
++ char errbuf[ANNOT_DEF_MAXLINELEN*2];
++ int result = 0;
++ char *p, *p2;
++
++ p = *s;
++ do {
++ p2 = p;
++ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
++ result |= table_lookup(table, p2, p-p2, errmsg);
++ for (; *p && isspace(*p); p++);
++ } while (*p && *p != ',');
++
++ *s = p;
++ return result;
++}
++
++void init_annotation_definitions()
++{
++ char *p, *p2, *tmp;
++ const char *filename;
++ char aline[ANNOT_DEF_MAXLINELEN];
++ char errbuf[ANNOT_DEF_MAXLINELEN*2];
++ struct annotate_st_entry_list *se, *me;
++ struct annotate_st_entry *ae;
++ int i;
++ FILE* f;
++
++ /* NOTE: we assume # static entries > 0 */
++ server_entries_list = xmalloc(sizeof(struct annotate_st_entry_list));
++ mailbox_rw_entries_list = xmalloc(sizeof(struct annotate_st_entry_list));
++ se = server_entries_list;
++ me = mailbox_rw_entries_list;
++ /* copy static entries into list */
++ for (i = 0; server_entries[i].name;i++) {
++ se->entry = &server_entries[i];
++ if (server_entries[i+1].name) {
++ se->next = xmalloc(sizeof(struct annotate_st_entry_list));
++ se = se->next;
++ }
++ }
++ /* copy static entries into list */
++ for (i = 0; mailbox_rw_entries[i].name;i++) {
++ me->entry = &mailbox_rw_entries[i];
++ if (mailbox_rw_entries[i+1].name) {
++ me->next = xmalloc(sizeof(struct annotate_st_entry_list));
++ me = me->next;
++ }
++ }
++
++ /* parse config file */
++ filename = config_getstring(IMAPOPT_ANNOTATION_DEFINITIONS);
++
++ if (! filename) {
++ se->next = NULL;
++ me->next = NULL;
++ return;
++ }
++
++ f = fopen(filename,"r");
++ if (! f) {
++ sprintf(errbuf, "could not open annotation definiton %s", filename);
++ fatal(errbuf, EC_CONFIG);
++ }
++
++ while (fgets(aline, sizeof(aline), f)) {
++ // remove leading space, skip blank lines and comments
++ for (p = aline; *p && isspace(*p); p++);
++ if (!*p || *p == '#') continue;
++
++ // note, we only do the most basic validity checking and may
++ // be more restrictive than neccessary
++
++ ae = xmalloc(sizeof(struct annotate_st_entry));
++
++ p2 = p;
++ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
++ // TV-TODO: should test for empty
++ ae->name = xstrndup(p2, p-p2);
++
++ p = consume_comma(p);
++
++ p2 = p;
++ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
++
++ if (table_lookup(annotation_scope_names, p2, p-p2,
++ "annotation scope")==ANNOTATION_SCOPE_SERVER) {
++ se->next = xmalloc(sizeof(struct annotate_st_entry_list));
++ se = se->next;
++ se->entry = ae;
++ }
++ else {
++ me->next = xmalloc(sizeof(struct annotate_st_entry_list));
++ me = me->next;
++ me->entry = ae;
++ }
++
++ p = consume_comma(p);
++ p2 = p;
++ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
++ ae->type = table_lookup(attribute_type_names, p2, p-p2,
++ "attribute type");
++
++ p = consume_comma(p);
++ ae->proxytype = parse_table_lookup_bitmask(annotation_proxy_type_names,
++ &p,
++ "annotation proxy type");
++
++ p = consume_comma(p);
++ ae->attribs = parse_table_lookup_bitmask(annotation_attributes,
++ &p,
++ "annotation attributes");
++
++ p = consume_comma(p);
++ p2 = p;
++ for (; *p && (isalnum(*p) || *p=='.' || *p=='-' || *p=='_' || *p=='/');p++);
++ tmp = xstrndup(p2, p-p2);
++ ae->acl = cyrus_acl_strtomask(tmp);
++ free(tmp);
++
++ for (; *p && isspace(*p); p++);
++ if (*p) {
++ sprintf(errbuf, "junk at end of line: '%s'", p);
++ fatal(errbuf, EC_CONFIG);
++ }
++
++ ae->set = annotation_set_todb;
++ ae->rock = NULL;
++ }
++
++ fclose(f);
++ se->next = NULL;
++ me->next = NULL;
++}
++
+ int annotatemore_store(char *mailbox,
+ struct entryattlist *l,
+ struct namespace *namespace,
+@@ -1808,7 +2037,7 @@ int annotatemore_store(char *mailbox,
+ struct entryattlist *e = l;
+ struct attvaluelist *av;
+ struct storedata sdata;
+- const struct annotate_st_entry *entries;
++ const struct annotate_st_entry_list *entries, *currententry;
+ time_t now = time(0);
+
+ memset(&sdata, 0, sizeof(struct storedata));
+@@ -1819,45 +2048,45 @@ int annotatemore_store(char *mailbox,
+
+ if (!mailbox[0]) {
+ /* server annotations */
+- entries = server_entries;
++ entries = server_entries_list;
+ }
+ else {
+ /* mailbox annotation(s) */
+- entries = mailbox_rw_entries;
++ entries = mailbox_rw_entries_list;
+ }
+
+ /* Build a list of callbacks for storing the annotations */
+ while (e) {
+- int entrycount, attribs;
++ int attribs;
+ struct annotate_st_entry_list *nentry = NULL;
+
+ /* See if we support this entry */
+- for (entrycount = 0;
+- entries[entrycount].name;
+- entrycount++) {
+- if (!strcmp(e->entry, entries[entrycount].name)) {
++ for (currententry = entries;
++ currententry;
++ currententry = currententry->next) {
++ if (!strcmp(e->entry, currententry->entry->name)) {
+ break;
+ }
+ }
+- if (!entries[entrycount].name) {
++ if (!currententry) {
+ /* unknown annotation */
+ return IMAP_PERMISSION_DENIED;
+ }
+
+ /* Add this entry to our list only if it
+ applies to our particular server type */
+- if ((entries[entrycount].proxytype != PROXY_ONLY)
++ if ((currententry->entry->proxytype != PROXY_ONLY)
+ || proxy_store_func) {
+ nentry = xzmalloc(sizeof(struct annotate_st_entry_list));
+ nentry->next = sdata.entry_list;
+- nentry->entry = &(entries[entrycount]);
++ nentry->entry = currententry->entry;
+ nentry->shared.modifiedsince = now;
+ nentry->priv.modifiedsince = now;
+ sdata.entry_list = nentry;
+ }
+
+ /* See if we are allowed to set the given attributes. */
+- attribs = entries[entrycount].attribs;
++ attribs = currententry->entry->attribs;
+ av = e->attvalues;
+ while (av) {
+ const char *value;
+@@ -1867,7 +2096,7 @@ int annotatemore_store(char *mailbox,
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+- entries[entrycount].type);
++ currententry->entry->type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+@@ -1893,7 +2122,7 @@ int annotatemore_store(char *mailbox,
+ goto cleanup;
+ }
+ value = annotate_canon_value(av->value,
+- entries[entrycount].type);
++ currententry->entry->type);
+ if (!value) {
+ r = IMAP_ANNOTATION_BADVALUE;
+ goto cleanup;
+diff -r 43265f589d80 lib/imapoptions
+--- a/lib/imapoptions Sat Sep 29 13:49:34 2007 +0200
++++ b/lib/imapoptions Sat Sep 29 13:56:24 2007 +0200
+@@ -152,6 +152,9 @@ are listed with ``<none>''.
+ user on their mailboxes? In a large organization this can cause
+ support problems, but it's enabled by default. */
+
++{ "annotation_definitions", NULL, STRING }
++/* File containing annotation definitions. */
++
+ { "auth_mech", "unix", STRINGLIST("unix", "pts", "krb", "krb5")}
+ /* The authorization mechanism to use. */
+
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Folder-names.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Folder-names.patch
new file mode 100644
index 0000000..1086fda
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Folder-names.patch
@@ -0,0 +1,20 @@
+Modifies the set of accepted characters in folder names for the cyrus imapd server [Version: 2.3.9]
+
+diff -r 575b237ded7b imap/mboxname.c
+--- a/imap/mboxname.c Sat Sep 29 13:40:37 2007 +0200
++++ b/imap/mboxname.c Sat Sep 29 13:41:01 2007 +0200
+@@ -649,8 +649,13 @@ int mboxname_netnewscheck(char *name)
+ /*
+ * Apply site policy restrictions on mailbox names.
+ * Restrictions are hardwired for now.
+- */
++
++ * original definition
+ #define GOODCHARS " +,-.0123456789:=@ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~"
++ */
++
++#define GOODCHARS " #$%'()*+,-.0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
++
+ int mboxname_policycheck(char *name)
+ {
+ unsigned i;
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Groups.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Groups.patch
new file mode 100644
index 0000000..f880947
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Groups.patch
@@ -0,0 +1,220 @@
+Allows to use a file other than /etc/groups for group definitions within the cyrus imapd server [Version: 2.3.9]
+
+diff -r 719114a03da4 lib/auth_unix.c
+--- a/lib/auth_unix.c Sat Sep 29 13:38:16 2007 +0200
++++ b/lib/auth_unix.c Sat Sep 29 13:39:58 2007 +0200
+@@ -48,12 +48,133 @@
+ #include <stdlib.h>
+ #include <pwd.h>
+ #include <grp.h>
++#include <stdio.h>
+ #include <ctype.h>
+ #include <string.h>
+
+ #include "auth.h"
+ #include "libcyr_cfg.h"
+ #include "xmalloc.h"
++
++#ifdef __FreeBSD__
++/*
++ * __getgrent.c - This file is part of the libc-8086/grp package for ELKS,
++ * Copyright (C) 1995, 1996 Nat Friedman <ndf@linux.mit.edu>.
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Library General Public
++ * License as published by the Free Software Foundation; either
++ * version 2 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Library General Public License for more details.
++ *
++ * You should have received a copy of the GNU Library General Public
++ * License along with this library; if not, write to the Free
++ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
++ *
++ */
++
++#include <unistd.h>
++#include <string.h>
++#include <errno.h>
++
++static struct group *__getgrent(int grp_fd, char *line_buff, char **members)
++{
++ short line_index;
++ short buff_size;
++ static struct group group;
++ register char *ptr;
++ char *field_begin;
++ short member_num;
++ char *endptr;
++ int line_len;
++
++ /* We use the restart label to handle malformatted lines */
++ restart:
++ line_index = 0;
++ buff_size = 256;
++
++ line_buff = realloc(line_buff, buff_size);
++ while (1) {
++ if ((line_len = read(grp_fd, line_buff + line_index,
++ buff_size - line_index)) <= 0) {
++ return NULL;
++ }
++ field_begin = strchr(line_buff, '\n');
++ if (field_begin != NULL) {
++ lseek(grp_fd,
++ (long) (1 + field_begin -
++ (line_len + line_index + line_buff)), SEEK_CUR);
++ *field_begin = '\0';
++ if (*line_buff == '#' || *line_buff == ' '
++ || *line_buff == '\n' || *line_buff == '\t')
++ goto restart;
++ break;
++ } else {
++ /* Allocate some more space */
++ line_index = buff_size;
++ buff_size += 256;
++ line_buff = realloc(line_buff, buff_size);
++ }
++ }
++
++ /* Now parse the line */
++ group.gr_name = line_buff;
++ ptr = strchr(line_buff, ':');
++ if (ptr == NULL)
++ goto restart;
++ *ptr++ = '\0';
++
++ group.gr_passwd = ptr;
++ ptr = strchr(ptr, ':');
++ if (ptr == NULL)
++ goto restart;
++ *ptr++ = '\0';
++
++ field_begin = ptr;
++ ptr = strchr(ptr, ':');
++ if (ptr == NULL)
++ goto restart;
++ *ptr++ = '\0';
++
++ group.gr_gid = (gid_t) strtoul(field_begin, &endptr, 10);
++ if (*endptr != '\0')
++ goto restart;
++
++ member_num = 0;
++ field_begin = ptr;
++
++ if (members != NULL)
++ free(members);
++ members = (char **) malloc((member_num + 1) * sizeof(char *));
++ for ( ; field_begin && *field_begin != '\0'; field_begin = ptr) {
++ if ((ptr = strchr(field_begin, ',')) != NULL)
++ *ptr++ = '\0';
++ members[member_num++] = field_begin;
++ members = (char **) realloc(members,
++ (member_num + 1) * sizeof(char *));
++ }
++ members[member_num] = NULL;
++
++ group.gr_mem = members;
++ return &group;
++}
++
++static char *line_buff = NULL;
++static char **members = NULL;
++
++struct group *fgetgrent(FILE *file)
++{
++ if (file == NULL) {
++ errno = EINTR;
++ return NULL;
++ }
++ return __getgrent(fileno(file), line_buff, members);
++}
++#endif /* __FreeBSD__ */
+
+ struct auth_state {
+ char userid[81];
+@@ -142,6 +263,25 @@ static char allowedchars[256] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
++static struct group* fgetgrnam(const char* name)
++{
++ struct group *grp;
++ FILE *groupfile;
++
++ groupfile = fopen("/etc/imapd.group", "r");
++ if (!groupfile) groupfile = fopen("/etc/group", "r");
++ if (groupfile) {
++ while ((grp = fgetgrent(groupfile))) {
++ if (strcasecmp(grp->gr_name, name) == 0) {
++ fclose(groupfile);
++ return grp;
++ }
++ }
++ }
++ if (groupfile) fclose(groupfile);
++ return NULL;
++}
++
+ /*
+ * Convert 'identifier' into canonical form.
+ * Returns a pointer to a static buffer containing the canonical form
+@@ -177,7 +317,7 @@ size_t len;
+ */
+
+ if (!strncmp(retbuf, "group:", 6)) {
+- grp = getgrnam(retbuf+6);
++ grp = fgetgrnam(retbuf+6);
+ if (!grp) return 0;
+ strcpy(retbuf+6, grp->gr_name);
+ return retbuf;
+@@ -224,6 +364,7 @@ static struct auth_state *mynewstate(con
+ struct passwd *pwd;
+ struct group *grp;
+ char **mem;
++ FILE *groupfile;
+
+ identifier = mycanonifyid(identifier, 0);
+ if (!identifier) return 0;
+@@ -240,20 +381,23 @@ static struct auth_state *mynewstate(con
+
+ pwd = getpwnam(identifier);
+
+- setgrent();
+- while ((grp = getgrent())) {
+- for (mem = grp->gr_mem; *mem; mem++) {
+- if (!strcmp(*mem, identifier)) break;
+- }
+-
+- if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
+- newstate->ngroups++;
+- newstate->group = (char **)xrealloc((char *)newstate->group,
+- newstate->ngroups * sizeof(char *));
+- newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
+- }
+- }
+- endgrent();
++ groupfile = fopen("/etc/imapd.group", "r");
++ if (!groupfile) groupfile = fopen("/etc/group", "r");
++ if (groupfile) {
++ while ((grp = fgetgrent(groupfile))) {
++ for (mem = grp->gr_mem; *mem; mem++) {
++ if (!strcasecmp(*mem, identifier)) break;
++ }
++
++ if (*mem || (pwd && pwd->pw_gid == grp->gr_gid)) {
++ newstate->ngroups++;
++ newstate->group = (char **)xrealloc((char *)newstate->group,
++ newstate->ngroups * sizeof(char *));
++ newstate->group[newstate->ngroups-1] = xstrdup(grp->gr_name);
++ }
++ }
++ fclose(groupfile);
++ }
+ return newstate;
+ }
+
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Logging.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Logging.patch
new file mode 100644
index 0000000..391820a
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_Logging.patch
@@ -0,0 +1,58 @@
+Provides improved logging for the cyrus imapd server [Version: 2.3.9]
+
+diff -r 5e673d53c57c imap/append.c
+--- a/imap/append.c Sat Sep 29 13:56:24 2007 +0200
++++ b/imap/append.c Mon Oct 01 11:17:30 2007 +0200
+@@ -653,6 +653,9 @@ int append_fromstage(struct appendstate
+
+ /* ok, we've successfully added a message */
+ as->quota_used += message_index.size;
++
++ syslog(LOG_DEBUG, "append_fromstage: message %d added to %s",
++ message_index.uid, mailbox->name );
+
+ return 0;
+ }
+diff -r 5e673d53c57c imap/imapd.c
+--- a/imap/imapd.c Sat Sep 29 13:56:24 2007 +0200
++++ b/imap/imapd.c Mon Oct 01 11:17:30 2007 +0200
+@@ -3504,17 +3504,19 @@ void cmd_close(char *tag)
+ if (!r) sync_log_mailbox(imapd_mailbox->name);
+ }
+
++ if (r) {
++ prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
++ }
++ else {
++ prot_printf(imapd_out, "%s OK %s\r\n", tag,
++ error_message(IMAP_OK_COMPLETED));
++ syslog(LOG_DEBUG, "cmd_expunge: user %s, mailbox %s, sequence %s",
++ imapd_userid, imapd_mailbox->name, "''");
++ }
++
+ index_closemailbox(imapd_mailbox);
+ mailbox_close(imapd_mailbox);
+ imapd_mailbox = 0;
+-
+- if (r) {
+- prot_printf(imapd_out, "%s NO %s\r\n", tag, error_message(r));
+- }
+- else {
+- prot_printf(imapd_out, "%s OK %s\r\n", tag,
+- error_message(IMAP_OK_COMPLETED));
+- }
+ }
+
+ /*
+diff -r 5e673d53c57c imap/mailbox.c
+--- a/imap/mailbox.c Sat Sep 29 13:56:24 2007 +0200
++++ b/imap/mailbox.c Mon Oct 01 11:17:30 2007 +0200
+@@ -2457,6 +2457,8 @@ int mailbox_expunge(struct mailbox *mail
+ *(fname->tail)++ = '/';
+ fname->len++;
+ for (msgno = 0; msgno < numdeleted; msgno++) {
++ syslog(LOG_DEBUG, "mailbox_expunge: removing mail %s:%d",
++ mailbox->name, deleted[msgno]);
+ mailbox_message_get_fname(mailbox, deleted[msgno],
+ fname->tail,
+ sizeof(fname->buf) - fname->len);
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_UID.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_UID.patch
new file mode 100644
index 0000000..0bac4f3
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.3.9-KOLAB_UID.patch
@@ -0,0 +1,115 @@
+Allows login by uid rather than the mail address on the cyrus imapd server [Version: 2.3.9]
+
+diff -r a0335c09d80e configure
+--- a/configure Mon Oct 01 11:18:56 2007 +0200
++++ b/configure Mon Oct 15 11:10:31 2007 +0200
+@@ -18094,7 +18094,7 @@ done
+ done
+
+ IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}"
+-IMAP_LIBS="${LIB_SASL} ${LIBS}"
++IMAP_LIBS="${LIB_SASL} -lldap -llber ${LIBS}"
+
+
+
+diff -r a0335c09d80e imap/global.c
+--- a/imap/global.c Mon Oct 01 11:18:56 2007 +0200
++++ b/imap/global.c Mon Oct 15 11:10:31 2007 +0200
+@@ -52,6 +52,9 @@
+ #include <netinet/in.h>
+ #include <sys/stat.h>
+
++#include <ldap.h>
++#include <lber.h>
++
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
+@@ -362,6 +365,18 @@ char *canonify_userid(char *user, char *
+ char *domain = NULL;
+ int len = strlen(user);
+ char buf[81];
++ const char *uri;
++ const char *base;
++ const char *binddn;
++ const char *bindpw;
++ struct timeval timeout;
++ char filter[255];
++ LDAP *handle;
++ LDAPMessage *res;
++ LDAPMessage *entry;
++ char ** vals;
++
++ int rc;
+
+ /* check for domain */
+ if (config_virtdomains &&
+@@ -380,6 +395,47 @@ char *canonify_userid(char *user, char *
+ }
+
+ if (config_virtdomains) {
++ if (config_virtdomains == IMAP_ENUM_VIRTDOMAINS_LDAP) {
++ uri = config_getstring(IMAPOPT_LDAP_URI);
++ base = config_getstring(IMAPOPT_LDAP_BASE);
++ binddn = config_getstring(IMAPOPT_LDAP_BIND_DN);
++ bindpw = config_getstring(IMAPOPT_LDAP_PASSWORD);
++ timeout.tv_sec = config_getint(IMAPOPT_LDAP_TIME_LIMIT);
++ timeout.tv_usec = 0;
++ sprintf(filter, "(uid=%s)", user);
++ rc = ldap_initialize(&handle, uri);
++ if (rc != LDAP_SUCCESS) {
++ syslog(LOG_ERR, "ldap_initialize failed (%s)", uri);
++ } else {
++ rc = ldap_simple_bind_s(handle, binddn, bindpw);
++ if (rc != LDAP_SUCCESS) {
++ syslog(LOG_ERR, "ldap_simple_bind() failed %d (%s)", rc, ldap_err2string(rc));
++ } else {
++ rc = ldap_search_st(handle, base, LDAP_SCOPE_SUBTREE, filter, NULL, 0, &timeout, &res);
++ if (rc != LDAP_SUCCESS) {
++ syslog(LOG_ERR, "ldap_search_st failed %d (%s)", rc, ldap_err2string(rc));
++ } else {
++ if ( (entry = ldap_first_entry(handle, res)) != NULL ) {
++ // read mail attribute from entry
++ if ( (vals = ldap_get_values(handle, entry, "mail")) ) {
++ if (strchr(vals[0], '@')) {
++ static char buf[81]; /* same size as in auth_canonifyid */
++ strncpy( buf, vals[0], sizeof(buf) );
++ buf[80] = '\0'; /* make sure it's null-terminated */
++ ldap_value_free( vals );
++ ldap_msgfree( res );
++ ldap_unbind_s(handle); /* also frees handle */
++ return auth_canonifyid( buf, 0) ;
++ }
++ ldap_value_free( vals );
++ }
++ }
++ ldap_msgfree( res );
++ }
++ }
++ ldap_unbind_s(handle); /* also frees handle */
++ }
++ }
+ if (domain) {
+ if (config_defdomain && !strcasecmp(config_defdomain, domain+1)) {
+ *domain = '\0'; /* trim the default domain */
+@@ -392,7 +448,7 @@ char *canonify_userid(char *user, char *
+ user = buf;
+ }
+ }
+- else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID) {
++ else if (config_virtdomains != IMAP_ENUM_VIRTDOMAINS_USERID && config_virtdomains != IMAP_ENUM_VIRTDOMAINS_LDAP) {
+ socklen_t salen;
+ int error;
+ struct sockaddr_storage localaddr;
+diff -r a0335c09d80e lib/imapoptions
+--- a/lib/imapoptions Mon Oct 01 11:18:56 2007 +0200
++++ b/lib/imapoptions Mon Oct 15 11:10:31 2007 +0200
+@@ -1017,7 +1017,7 @@ are listed with ``<none>''.
+ mailbox hierarchy. The default is to use the netnews separator
+ character '.'. */
+
+-{ "virtdomains", "off", ENUM("off", "userid", "on") }
++{ "virtdomains", "off", ENUM("off", "userid", "ldap", "on") }
+ /* Enable virtual domain support. If enabled, the user's domain will
+ be determined by splitting a fully qualified userid at the last '@'
+ or '%' symbol. If the userid is unqualified, and the virtdomains
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-parallel.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-parallel.patch
new file mode 100644
index 0000000..5932afc
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-parallel.patch
@@ -0,0 +1,11 @@
+--- imap/Makefile.in.orig 2006-08-28 09:32:33.000000000 -0700
++++ imap/Makefile.in 2006-08-28 09:33:03.000000000 -0700
+@@ -155,6 +155,8 @@
+
+ ### Built Source Files
+
++version.o: xversion.h
++
+ xversion:
+ rm -f version.o
+ AWK=$(AWK) $(srcdir)/xversion.sh
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-strip.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-strip.patch
new file mode 100644
index 0000000..fa82a4b
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-strip.patch
@@ -0,0 +1,11 @@
+--- imtest/Makefile.in.orig 2007-09-07 21:45:46.000000000 +0200
++++ imtest/Makefile.in 2007-09-07 21:45:52.000000000 +0200
+@@ -72,7 +72,7 @@
+ all: imtest
+
+ install:
+- $(INSTALL) -s -m 755 imtest $(DESTDIR)$(exec_prefix)/bin
++ $(INSTALL) -m 755 imtest $(DESTDIR)$(exec_prefix)/bin
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/pop3test
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/nntptest
+ ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/lmtptest
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-unsupported-8bit.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-unsupported-8bit.patch
new file mode 100644
index 0000000..cf60844
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-unsupported-8bit.patch
@@ -0,0 +1,79 @@
+--- cyrus-imapd-2.2.10/imap/message.c.munge8bit 2004-02-27 18:44:55.000000000 +0100
++++ cyrus-imapd-2.2.10/imap/message.c 2004-07-27 18:20:13.725563440 +0200
+@@ -227,6 +227,7 @@
+ int n;
+ int sawcr = 0, sawnl;
+ int reject8bit = config_getswitch(IMAPOPT_REJECT8BIT);
++ int munge8bit = config_getswitch(IMAPOPT_MUNGE8BIT);
+ int inheader = 1, blankline = 1;
+
+ while (size) {
+@@ -262,7 +263,7 @@
+ /* We have been configured to reject all mail of this
+ form. */
+ if (!r) r = IMAP_MESSAGE_CONTAINS8BIT;
+- } else {
++ } else if (munge8bit) {
+ /* We have been configured to munge all mail of this
+ form. */
+ *p = 'X';
+--- cyrus-imapd-2.2.10/imap/spool.c.munge8bit 2004-03-04 17:09:34.000000000 +0100
++++ cyrus-imapd-2.2.10/imap/spool.c 2004-07-27 18:20:13.726563149 +0200
+@@ -140,6 +140,7 @@
+ state s = NAME_START;
+ int r = 0;
+ int reject8bit = config_getswitch(IMAPOPT_REJECT8BIT);
++ int munge8bit = config_getswitch(IMAPOPT_MUNGE8BIT);
+ const char **skip = NULL;
+
+ if (namelen == 0) {
+@@ -266,7 +267,7 @@
+ form. */
+ r = IMAP_MESSAGE_CONTAINS8BIT;
+ goto ph_error;
+- } else {
++ } else if (munge8bit) {
+ /* We have been configured to munge all mail of this
+ form. */
+ c = 'X';
+--- cyrus-imapd-2.2.10/lib/imapoptions.munge8bit 2004-07-21 21:07:45.000000000 +0200
++++ cyrus-imapd-2.2.10/lib/imapoptions 2004-07-27 18:20:13.722564314 +0200
+@@ -458,6 +458,12 @@
+ { "mboxlist_db", "skiplist", STRINGLIST("flat", "berkeley", "skiplist")}
+ /* The cyrusdb backend to use for the mailbox list. */
+
++{ "munge8bit", 1, SWITCH }
++/* If enabled, lmtpd munges messages with 8-bit characters. These characters
++ are changed to . If \fBreject8bit\fR is enabled, setting \fBmunge8bit\fR
++ has no effect. (A proper soultion to non-ASCII characters in headers is
++ offered by RFC 2047 and its predecessors.) */
++
+ # xxx badly worded
+ { "mupdate_connections_max", 128, INT }
+ /* The max number of connections that a mupdate process will allow, this
+@@ -670,9 +676,7 @@
+
+ { "reject8bit", 0, SWITCH }
+ /* If enabled, lmtpd rejects messages with 8-bit characters in the
+- headers. Otherwise, 8-bit characters are changed to `X'. (A
+- proper soultion to non-ASCII characters in headers is offered by
+- RFC 2047 and its predecessors.) */
++ headers. */
+
+ { "rfc2046_strict", 0, SWITCH }
+ /* If enabled, imapd will be strict (per RFC 2046) when matching MIME
+--- cyrus-imapd-2.2.10/man/deliver.8.munge8bit 2004-06-21 20:40:10.000000000 +0200
++++ cyrus-imapd-2.2.10/man/deliver.8 2004-07-27 18:20:13.719565188 +0200
+@@ -147,8 +147,10 @@
+ Accept messages using the LMTP protocol.
+ .SH NOTES
+ Depending on the setting of \fBreject8bit\fR in \fBimapd.conf(5)\fR, deliver
+-either rejects messages with 8-bit-set characters in the headers or
+-changes these characters to `X'.
++either rejects/accepts messages with 8-bit-set characters in the headers.
++If we accept messages with 8-bit-set characters in the headers, then depending
++on the setting of \fBmunge8bit\fR, these characters are either left un-touched
++or changed to .
+ This is because such characters can't be interpreted since the
+ character set is not known, although some communities not well-served by
+ US-ASCII assume that those characters can be used to represent characters not
diff --git a/net-mail/cyrus-imapd/files/cyrus.conf b/net-mail/cyrus-imapd/files/cyrus.conf
new file mode 100644
index 0000000..fe7d368
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.conf
@@ -0,0 +1,43 @@
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/files/cyrus.conf,v 1.4 2004/07/18 04:02:23 dragonheart Exp $
+
+# Standard standalone server configuration.
+
+START {
+ # Do not delete this entry!
+ recover cmd="ctl_cyrusdb -r"
+
+ # This is only necessary if using idled for IMAP IDLE.
+ #idled cmd="idled"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/socket.
+SERVICES {
+ # Add or remove based on preferences.
+ imap cmd="imapd" listen="imap2" prefork=0
+ pop3 cmd="pop3d" listen="pop-3" prefork=0
+
+ # Don't forget to generate the needed keys for SSL or TLS
+ # (see doc/html/install-configure.html).
+ #imaps cmd="imapd -s" listen="imaps" prefork=0
+ #pop3s cmd="pop3d -s" listen="pop3s" prefork=0
+
+ sieve cmd="timsieved" listen="sieve" prefork=0
+
+ # at least one LMTP is required for delivery
+ #lmtp cmd="lmtpd" listen="lmtp" prefork=0
+ lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
+
+ # this is only necessary if using notifications
+ #notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+ # This is required.
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+
+ # This is only necessary if using duplicate delivery suppression.
+ delprune cmd="ctl_deliver -E 3" period=1440
+
+ # This is only necessary if caching TLS sessions.
+ tlsprune cmd="tls_prune" period=1440
+}
diff --git a/net-mail/cyrus-imapd/files/cyrus.confd b/net-mail/cyrus-imapd/files/cyrus.confd
new file mode 100644
index 0000000..ca24b44
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.confd
@@ -0,0 +1,6 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/files/cyrus.confd,v 1.1 2004/12/29 06:44:00 swegener Exp $
+
+# Additional options for the cyrus master
+CYRUS_OPTS=""
diff --git a/net-mail/cyrus-imapd/files/cyrus.pam-include b/net-mail/cyrus-imapd/files/cyrus.pam-include
new file mode 100644
index 0000000..6e47645
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.pam-include
@@ -0,0 +1,6 @@
+#%PAM-1.0
+
+auth required pam_nologin.so
+auth include system-auth
+
+account include system-auth
diff --git a/net-mail/cyrus-imapd/files/cyrus.rc6 b/net-mail/cyrus-imapd/files/cyrus.rc6
new file mode 100644
index 0000000..e2e573c
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.rc6
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/files/cyrus.rc6,v 1.7 2004/12/29 06:44:00 swegener Exp $
+
+depend() {
+ need net
+ use dns logger
+ after drac saslauthd
+}
+
+start() {
+ ebegin "Starting cyrus imapd"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/lib/cyrus/master -- ${CYRUS_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cyrus imapd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/cyrus-master.pid
+ eend $?
+}
diff --git a/net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.8-r20 b/net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.8-r20
new file mode 100644
index 0000000..79a11d5
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.8-r20
@@ -0,0 +1,6 @@
+MD5 13e519dec6d0c7b8a4f41170d38c3942 cyrus-imapd-2.3.8-uoa.tbz2 17894
+RMD160 c824671df6b36aadf9c6d76131bd467a407a5e5e cyrus-imapd-2.3.8-uoa.tbz2 17894
+SHA256 dfe6d498991335c2c9f06bf2dd2c716ce865c043f857f5633650c029e17c3549 cyrus-imapd-2.3.8-uoa.tbz2 17894
+MD5 ac03b02c1ae08d52f807b58c488b204f cyrus-imapd-2.3.8.tar.gz 2207366
+RMD160 e89054f75f106c26f497bc37f7d514b0bf80bfe0 cyrus-imapd-2.3.8.tar.gz 2207366
+SHA256 0f5c04a7de2da737e5ca0b4f8df8647175188b22972000192bbc7cd87ffda7fe cyrus-imapd-2.3.8.tar.gz 2207366
diff --git a/net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.9-r20 b/net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.9-r20
new file mode 100644
index 0000000..69290b0
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/digest-cyrus-imapd-2.3.9-r20
@@ -0,0 +1,6 @@
+MD5 416025d721671c546bac1652c89b218e cyrus-imapd-2.3.9-uoa.tbz2 17935
+RMD160 1e46f17972552ed94496d1dfee8671332844775b cyrus-imapd-2.3.9-uoa.tbz2 17935
+SHA256 3ca66f3ec992416276daca9e43dd159797d2838ff9efd118139495a86e070f5d cyrus-imapd-2.3.9-uoa.tbz2 17935
+MD5 113433c1fdc777e3b0466b5ce643b8bc cyrus-imapd-2.3.9.tar.gz 2272004
+RMD160 c9aae3476108c0face06dfe304a136015370b166 cyrus-imapd-2.3.9.tar.gz 2272004
+SHA256 27e6476789788b7c72f09711103f7c4bd0136dbd33ceadd0ae2dc776a17ab437 cyrus-imapd-2.3.9.tar.gz 2272004
diff --git a/net-mail/cyrus-imapd/files/imap.pam b/net-mail/cyrus-imapd/files/imap.pam
new file mode 100644
index 0000000..17ddb9f
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/imap.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+
+auth required /lib/security/pam_nologin.so
+auth required /lib/security/pam_stack.so service=system-auth
+
+account required /lib/security/pam_stack.so service=system-auth
diff --git a/net-mail/cyrus-imapd/files/imapd.conf b/net-mail/cyrus-imapd/files/imapd.conf
new file mode 100644
index 0000000..f4db3a4
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/imapd.conf
@@ -0,0 +1,52 @@
+# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/files/imapd.conf,v 1.5 2004/08/27 06:02:45 langthang Exp $
+
+# Don't forget to use chattr +S (if you are using ext[23])
+# when you change these directories (read the docs).
+configdirectory: /var/imap
+partition-default: /var/spool/imap
+sievedir: /var/imap/sieve
+
+tls_ca_path: /etc/ssl/certs
+tls_cert_file: /etc/ssl/cyrus/server.crt
+tls_key_file: /etc/ssl/cyrus/server.key
+
+# Don't use an everyday user as admin.
+admins: cyrus
+
+hashimapspool: yes
+allowanonymouslogin: no
+allowplaintext: no
+
+# Allow renaming of top-level mailboxes.
+#allowusermoves: yes
+
+# Use this if sieve-scripts could be in ~user/.sieve.
+#sieveusehomedir: yes
+
+# Use saslauthd if you want to use pam for imap.
+# But be warned: login with DIGEST-MD5 or CRAM-MD5
+# is not possible using pam.
+#sasl_pwcheck_method: saslauthd
+
+####################################################
+## This is a recommended authentication method if you
+## emerge cyrus-sasl with 'postgres' or 'mysql'
+## To use with mysql database uncomment those lines below.
+
+#sasl_pwcheck_method: auxprop
+#sasl_auxprop_plugin: sql
+
+## possible values for sasl_auxprop_plugin 'mysql', 'pgsql', 'sqlite'.
+#sasl_sql_engine: mysql
+
+## all possible values.
+#sasl_mech_list: LOGIN PLAIN CRAM-MD5 DIGEST-MD5 NTLM
+## or limit to CRAM-MD5 only
+#sasl_mech_list: CRAM-MD5
+
+## change below to suit your setup.
+sasl_sql_user: mailsqluser
+sasl_sql_passwd: password
+sasl_sql_database: mailsqldb
+sasl_sql_hostnames: localhost
+sasl_sql_select: SELECT clear FROM users WHERE email = '%u@%r'
diff --git a/net-mail/cyrus-imapd/metadata.xml b/net-mail/cyrus-imapd/metadata.xml
new file mode 100644
index 0000000..393e9ef
--- /dev/null
+++ b/net-mail/cyrus-imapd/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>wrobel@gentoo.org</email>
+ <name>Gunnar Wrobel</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/net-mail/kolab-resource-handlers/ChangeLog b/net-mail/kolab-resource-handlers/ChangeLog
new file mode 100644
index 0000000..8002208
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for net-mail/kolab-resource-handlers
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 17 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ kolab-resource-handlers-2.1.ebuild:
+ Fixed horde-framework-kolab dependency.
+
+ 11 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ kolab-resource-handlers-2.1.ebuild:
+ Updated to the newer php ebuild.
+
diff --git a/net-mail/kolab-resource-handlers/Manifest b/net-mail/kolab-resource-handlers/Manifest
new file mode 100644
index 0000000..ff39c60
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/Manifest
@@ -0,0 +1,36 @@
+AUX kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch 3578 RMD160 dff9cf98ef9c36de91b902cec0f3ab2932c397a2 SHA1 10288708df0b912611462305e8b6ef44dcbb3601 SHA256 25449abf5dacdd732b7d987bfcfb2db3de5db1e137701d97998bdf52d9b08993
+MD5 f3f3a017242563542b33cae61ea03de7 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch 3578
+RMD160 dff9cf98ef9c36de91b902cec0f3ab2932c397a2 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch 3578
+SHA256 25449abf5dacdd732b7d987bfcfb2db3de5db1e137701d97998bdf52d9b08993 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch 3578
+AUX kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch 1031 RMD160 1294beb7501467a62f348d3e9d139c2210eddc11 SHA1 383aac750d9614c65733daa7baae0d97d327c71c SHA256 4a49a8dbc0ec9200dd4db919d10460a4e8a27d58296aad78b90e13829694b226
+MD5 ab0d6a5da40e692e3b8fe293da9846d7 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch 1031
+RMD160 1294beb7501467a62f348d3e9d139c2210eddc11 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch 1031
+SHA256 4a49a8dbc0ec9200dd4db919d10460a4e8a27d58296aad78b90e13829694b226 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch 1031
+AUX kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch 1053 RMD160 0569fa1da612692fc33176183976d92cd0dd27e4 SHA1 c904c64a18e69426f6f2c35fd058d79667cb0bed SHA256 5de5b6685c83788ff4884fc81227f93fae215a580febf49626701f0260725c62
+MD5 37ca267b12bb172cec6e2f95689d2c42 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch 1053
+RMD160 0569fa1da612692fc33176183976d92cd0dd27e4 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch 1053
+SHA256 5de5b6685c83788ff4884fc81227f93fae215a580febf49626701f0260725c62 files/kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch 1053
+AUX kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch 539 RMD160 5ade64d8da7656f477656ca91d8f88f0bb70737f SHA1 436832ff8c302693cd5481b7208b976e53365a5a SHA256 defbc7106927ed068de488c42865cf23d6df442f0e8284c48de9048dd197ba60
+MD5 db08235df834395a4a68ba4ae9751628 files/kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch 539
+RMD160 5ade64d8da7656f477656ca91d8f88f0bb70737f files/kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch 539
+SHA256 defbc7106927ed068de488c42865cf23d6df442f0e8284c48de9048dd197ba60 files/kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch 539
+AUX kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch 2729 RMD160 2d49c478b5845eb9e4234dfd97445022c3dc2fd1 SHA1 c33885a46b6af42e5918039f49cf49ffba41aff1 SHA256 1ac77701446a52d7ce006d5a9806a73be3639aac849735713cdf0d353bddb6d5
+MD5 d205ab3a04e5004a16df6dbf529a3f94 files/kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch 2729
+RMD160 2d49c478b5845eb9e4234dfd97445022c3dc2fd1 files/kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch 2729
+SHA256 1ac77701446a52d7ce006d5a9806a73be3639aac849735713cdf0d353bddb6d5 files/kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch 2729
+DIST kolab-resource-handlers-2.1-gentoo-20070510.tar.bz2 92597 RMD160 342c63bc7192dbf9a3a613ff90bf542eef9b3310 SHA1 e30092aee978bb062ea3b5a6e2fc68e8bfd497ce SHA256 6638d31b0d93c4b2c7062fc7a7008fb4cee07394a00f61f7c90ebe438db85d91
+EBUILD kolab-resource-handlers-2.1.ebuild 1061 RMD160 f868bc06732b4f2bdccb6c2eb70499ed209b40ad SHA1 de7735c68a925211bcdccf0fbfe7adc6f7baa936 SHA256 3e464f55867ab01c0b8ffe7a1ee41ed1ab73d469bf29702146eb050ea7db366c
+MD5 e5e38255e99b2eeea035a394d30e504d kolab-resource-handlers-2.1.ebuild 1061
+RMD160 f868bc06732b4f2bdccb6c2eb70499ed209b40ad kolab-resource-handlers-2.1.ebuild 1061
+SHA256 3e464f55867ab01c0b8ffe7a1ee41ed1ab73d469bf29702146eb050ea7db366c kolab-resource-handlers-2.1.ebuild 1061
+MISC ChangeLog 386 RMD160 14cc3153976218f59075e8593d722ad908eb07f1 SHA1 ec142d4e2b5959ac7cf1ef45f67fa93e880bc083 SHA256 139829fba28773e734e0bd3f56b6dde7df7d2f287d005df415bc74ff2b615bcf
+MD5 da05e5d5974211fecf2a0c8f3f163641 ChangeLog 386
+RMD160 14cc3153976218f59075e8593d722ad908eb07f1 ChangeLog 386
+SHA256 139829fba28773e734e0bd3f56b6dde7df7d2f287d005df415bc74ff2b615bcf ChangeLog 386
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 dbb717508a078966718eaa1899ab6f64 files/digest-kolab-resource-handlers-2.1 331
+RMD160 bf3c69776ae5fa2431083ce37f0211910f516786 files/digest-kolab-resource-handlers-2.1 331
+SHA256 c00e70a4074726ef8234d0a3b821fe653edc1242283bed917145a406d28b56d5 files/digest-kolab-resource-handlers-2.1 331
diff --git a/net-mail/kolab-resource-handlers/files/digest-kolab-resource-handlers-2.1 b/net-mail/kolab-resource-handlers/files/digest-kolab-resource-handlers-2.1
new file mode 100644
index 0000000..cfc296b
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/files/digest-kolab-resource-handlers-2.1
@@ -0,0 +1,3 @@
+MD5 f555e327f1fe9e71a7122b687e51528e kolab-resource-handlers-2.1-gentoo-20070510.tar.bz2 92597
+RMD160 342c63bc7192dbf9a3a613ff90bf542eef9b3310 kolab-resource-handlers-2.1-gentoo-20070510.tar.bz2 92597
+SHA256 6638d31b0d93c4b2c7062fc7a7008fb4cee07394a00f61f7c90ebe438db85d91 kolab-resource-handlers-2.1-gentoo-20070510.tar.bz2 92597
diff --git a/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch
new file mode 100644
index 0000000..af66b88
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.class.php.in-2.1.patch
@@ -0,0 +1,101 @@
+--- kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.class.php.in 2007-05-10 15:28:16.000000000 +0200
++++ kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.class.php.in.gentoo 2007-05-10 15:31:42.000000000 +0200
+@@ -29,7 +29,6 @@
+ updates.
+ */
+
+-
+ require_once '@kolab_php_module_prefix@freebusy/freebusycache.class.php';
+ require_once '@kolab_php_module_prefix@freebusy/freebusyimapcache.class.php';
+ require_once '@kolab_php_module_prefix@freebusy/recurrence.class.php';
+@@ -211,12 +210,12 @@
+ $imapcache->cache_store();
+ $imapcache->output_fb($vFb);
+
+- $xvCal = $vCal;
+- $xvCal->addComponent($vFb);
++ $vCal->addComponent($vFb);
++ $extended = $vCal->exportvCalendar();
+ $vCal->addComponent($this->clearExtra($vFb));
+
+ // Generate the vCal file.
+- $result = array( $vCal->exportvCalendar(), $xvCal->exportvCalendar() );
++ $result = array( $vCal->exportvCalendar(), $extended );
+ return $result;
+ }
+
+@@ -392,44 +391,47 @@
+ }
+
+ function getEventHash($xml_text) {
+- $xmldoc = @domxml_open_mem($xml_text, DOMXML_LOAD_PARSING +
+- DOMXML_LOAD_COMPLETE_ATTRS + DOMXML_LOAD_SUBSTITUTE_ENTITIES +
+- DOMXML_LOAD_DONT_KEEP_BLANKS, $error);
+-
+- if (!empty($error)) {
++
++ require_once 'Horde/DOM.php';
++
++ $result = Horde_DOM_Document::factory(array('xml' => $xml_text));
++
++ if (is_a($result, 'PEAR_Error')) {
+ // There were errors parsing the XML data - abort
+- myLog( "Error parsing \"$xml_txt\": $error", RM_LOG_ERROR);
++ myLog( "Error parsing \"$xml_txt\": $result", RM_LOG_ERROR);
+ return false;
+ }
+
+- $noderoot = $xmldoc->document_element();
++ $noderoot = $result->document_element();
+ $childnodes = $noderoot->child_nodes();
+
+ $event_hash = array();
+
+ // Build the event hash
+ foreach ($childnodes as $value) {
+- //myLog("Looking at tag ".($value->tagname), RM_LOG_DEBUG);
+- if( $value->tagname == 'recurrence' ) {
+- $rhash = array();
+- $attrs = $value->attributes();
+- foreach( $attrs as $attr ) {
+- //myLog("getEventHash setting rhash[".$attr->name."] = ".$attr->value, RM_LOG_DEBUG);
+- $rhash[$attr->name] = $attr->value;
+- }
+- foreach( $value->child_nodes() as $v ) {
+- if( $v->tagname == 'day' || $v->tagname == 'exclusion' ) {
+- $rhash[$v->tagname][] = $v->get_content();
+- } else {
+- $rhash[$v->tagname] = $v->get_content();
+- if( $v->tagname == 'range' && $v->has_attribute('type') ) {
+- $rhash['rangetype'] = $v->get_attribute('type');
+- }
++ if ($value->type == XML_ELEMENT_NODE) {
++ //myLog("Looking at tag ".($value->tagname), RM_LOG_DEBUG);
++ if( $value->tagname == 'recurrence' ) {
++ $rhash = array();
++ $attrs = $value->attributes();
++ foreach( $attrs as $attr ) {
++ //myLog("getEventHash setting rhash[".$attr->name."] = ".$attr->value, RM_LOG_DEBUG);
++ $rhash[$attr->name] = $attr->value;
+ }
+- }
+- $event_hash[$value->tagname] = $rhash;
+- } else {
+- $event_hash[$value->tagname] = $value->get_content();
++ foreach( $value->child_nodes() as $v ) {
++ if( $v->tagname == 'day' || $v->tagname == 'exclusion' ) {
++ $rhash[$v->tagname][] = $v->get_content();
++ } else {
++ $rhash[$v->tagname] = $v->get_content();
++ if( $v->tagname == 'range' && $v->has_attribute('type') ) {
++ $rhash['rangetype'] = $v->get_attribute('type');
++ }
++ }
++ }
++ $event_hash[$value->tagname] = $rhash;
++ } else {
++ $event_hash[$value->tagname] = $value->get_content();
++ }
+ }
+ }
+
diff --git a/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch
new file mode 100644
index 0000000..14d1023
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_freebusy.php.in-2.1.patch
@@ -0,0 +1,31 @@
+--- kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.php.in 2007-05-10 15:28:16.000000000 +0200
++++ kolab-resource-handlers/kolab-resource-handlers/freebusy/freebusy.php.in.gentoo 2007-05-10 15:29:57.000000000 +0200
+@@ -33,9 +33,26 @@
+
+ logInit( 'freebusy' );
+
++$imapuser = isset($_SERVER['PHP_AUTH_USER'])?$_SERVER['PHP_AUTH_USER']:false;
++$imappw = isset($_SERVER['PHP_AUTH_PW'])?$_SERVER['PHP_AUTH_PW']:false;
++
++if( empty($imapuser) && isset($_ENV['REDIRECT_REDIRECT_REMOTE_USER']) ) {
++ $a = base64_decode( substr($_ENV['REDIRECT_REDIRECT_REMOTE_USER'], 6)) ;
++
++ if ( (strlen($a) == 0) || ( strcasecmp($a, ":" ) == 0 ))
++ {
++ $imapuser = false;
++ $imappw = false;
++ }
++ else
++ {
++ list($name, $password) = explode(':', $a, 2);
++ $imapuser = $name;
++ $imappw = $password;
++ }
++ }
++
+ $user = trim($_REQUEST['uid']);
+-$imapuser = $_SERVER['PHP_AUTH_USER'];
+-$imappw = $_SERVER['PHP_AUTH_PW'];
+
+ $req_cache = false;
+ $req_extended = false;
diff --git a/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch
new file mode 100644
index 0000000..6a40440
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_freebusy_pfb.php.in-2.1.patch
@@ -0,0 +1,26 @@
+--- kolab-resource-handlers/kolab-resource-handlers/freebusy/pfb.php.in 2006-11-22 18:06:03.000000000 +0100
++++ kolab-resource-handlers/kolab-resource-handlers/freebusy/pfb.php.in.gentoo 2006-11-22 18:11:34.000000000 +0100
+@@ -46,6 +46,23 @@
+
+ $imapuser = isset($_SERVER['PHP_AUTH_USER'])?$_SERVER['PHP_AUTH_USER']:false;
+ $imappw = isset($_SERVER['PHP_AUTH_PW'])?$_SERVER['PHP_AUTH_PW']:false;
++
++if( empty($imapuser) && isset($_ENV['REDIRECT_REDIRECT_REMOTE_USER']) ) {
++ $a = base64_decode( substr($_ENV['REDIRECT_REDIRECT_REMOTE_USER'], 6)) ;
++
++ if ( (strlen($a) == 0) || ( strcasecmp($a, ":" ) == 0 ))
++ {
++ $imapuser = false;
++ $imappw = false;
++ }
++ else
++ {
++ list($name, $password) = explode(':', $a, 2);
++ $imapuser = $name;
++ $imappw = $password;
++ }
++ }
++
+ $req_cache = isset($_REQUEST['cache'])?(bool)$_REQUEST['cache']:false;
+ $req_folder = isset($_REQUEST['folder'])?$_REQUEST['folder']:false;
+ $req_extended = isset($_REQUEST['extended'])?(bool)$_REQUEST['extended']:false;
diff --git a/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch
new file mode 100644
index 0000000..f554065
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_olhacks.php.in-2.1.patch
@@ -0,0 +1,12 @@
+--- kolab-resource-handlers/kolab-resource-handlers/resmgr/olhacks.php.in 2007-05-10 15:28:16.000000000 +0200
++++ kolab-resource-handlers/kolab-resource-handlers/resmgr/olhacks.php.in.gentoo 2007-05-10 15:29:05.000000000 +0200
+@@ -19,9 +19,7 @@
+ */
+
+ require_once '@kolab_php_module_prefix@kolabfilter/misc.php';
+-require_once HORDE_BASE . '/lib/core.php';
+ require_once 'Horde/iCalendar.php';
+-require_once 'Horde/NLS.php';
+ require_once 'Horde/MIME.php';
+ require_once 'Horde/MIME/Message.php';
+ require_once 'Horde/MIME/Headers.php';
diff --git a/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch
new file mode 100644
index 0000000..145fdad
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/files/kolab-resource-handlers_kolab-resource-handlers_resmgr_resmgr.php.in-2.1.patch
@@ -0,0 +1,68 @@
+--- kolab-resource-handlers/kolab-resource-handlers/resmgr/resmgr.php.in 2006-11-13 15:37:44.000000000 +0100
++++ kolab-resource-handlers/kolab-resource-handlers/resmgr/resmgr.php.in.gentoo 2006-11-14 15:36:38.000000000 +0100
+@@ -33,16 +33,13 @@
+ define('RM_ITIP_TENTATIVE', 3);
+
+ require_once 'Net/IMAP.php';
+-require_once 'Horde/Auth.php';
+ require_once 'Horde/iCalendar.php';
+-require_once 'Horde/NLS.php';
+ require_once 'Horde/MIME.php';
+ require_once 'Horde/MIME/Message.php';
+ require_once 'Horde/MIME/Headers.php';
+ require_once 'Horde/MIME/Part.php';
+ require_once 'Horde/MIME/Structure.php';
+-//include_once 'Horde/Kolab.php';
+-require_once 'Horde/Text.php';
++require_once 'Horde/String.php';
+ require_once '@kolab_php_module_prefix@freebusy/recurrence.class.php';
+
+ // Globals
+@@ -556,7 +553,7 @@
+ $vCal->addComponent($itip_reply);
+
+ //$mime = &new MIME_Part('multipart/alternative');
+- //$body = &new MIME_Part('text/plain', Text::wrap($message, 76, "\n"));
++ //$body = &new MIME_Part('text/plain', String::wrap($message, 76, "\n"));
+
+ $ics = &new MIME_Part('text/calendar', $vCal->exportvCalendar(), 'UTF-8' );
+ //$ics->setName('event-reply.ics');
+@@ -793,10 +790,19 @@
+
+ function &buildKolabEvent(&$itip)
+ {
++ require_once 'Horde/DOM.php';
++
+ global $organiser, $resource, $uid, $sid;
+
+ $recurrence = false;
+- $kolab_xml = domxml_new_doc('1.0');
++
++ $result = Horde_DOM_Document::factory(array('xml' => $xml_text));
++ if (is_a($result, 'PEAR_Error')) {
++ // There were errors building the xml document
++ myLog( "Error building xml document", RM_LOG_ERROR);
++ return false;
++ }
++
+ $kolab_event = $kolab_xml->append_child($kolab_xml->create_element('event'));
+ $kolab_event->set_attribute('version', '1.0');
+
+@@ -1296,7 +1302,7 @@
+
+ $kolabinfo = 'This is a Kolab Groupware object. To view this object you will need a client that understands the Kolab Groupware format. For a list of such clients please visit http://www.kolab.org/kolab2-clients.html';
+
+- $body = &new MIME_Part('text/plain', Text::wrap($kolabinfo, 76, "\n"));
++ $body = &new MIME_Part('text/plain', String::wrap($kolabinfo, 76, "\n"));
+
+ $part = &new MIME_Part('application/x-vnd.kolab.event', $kolab_xml->dump_mem(true));
+ $part->setName('kolab.event');
+@@ -1398,7 +1404,7 @@
+ }
+
+ myLog("Sending confirmation of cancelation to $organiser");
+- $body = &new MIME_Part('text/plain', Text::wrap($body, 76, "\n"));
++ $body = &new MIME_Part('text/plain', String::wrap($body, 76, "\n"));
+ $mime = &MIME_Message::convertMimePart($body);
+ $mime->setTransferEncoding('quoted-printable');
+ $mime->transferEncodeContents();
diff --git a/net-mail/kolab-resource-handlers/kolab-resource-handlers-2.1.ebuild b/net-mail/kolab-resource-handlers/kolab-resource-handlers-2.1.ebuild
new file mode 100644
index 0000000..4e5c093
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/kolab-resource-handlers-2.1.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils php-lib
+
+MY_P=kolab-resource-handlers-2.1-gentoo-20070510
+
+DESCRIPTION="The kolab resource manager"
+HOMEPAGE="http://www.kolab.org"
+SRC_URI="http://build.pardus.de/downloads/${MY_P}.tar.bz2"
+
+SLOT="0"
+
+LICENSE="GPL-2"
+KEYWORDS="x86 amd64"
+IUSE=""
+
+DEPEND=""
+
+RDEPEND="${DEPEND}
+
+=dev-lang/php-5.2.4-r20
+!>dev-lang/php-5.2.4-r20
+
+>=dev-php/PEAR-PEAR-1.4.6-r1
+>=dev-php/PEAR-Net_SMTP-1.2.7
+>=dev-php/PEAR-Net_LMTP-1.0.1-r1
+>=dev-php/PEAR-Net_IMAP-1.0.3-r2
+>=dev-php/PEAR-Mail_Mime-1.3.1-r1
+dev-php/horde-framework-kolab
+"
+
+S=${WORKDIR}/${MY_P}
+
+src_unpack() {
+
+ unpack ${A} && cd "${S}"
+
+ for PATCH in ${FILESDIR}/*-${PV}.patch
+ do
+ epatch ${PATCH}
+ done
+
+}
+
+src_compile() {
+
+ local myconf
+ myconf="${myconf} --with-dist=gentoo"
+ myconf="${myconf} --libexecdir=/usr/lib"
+ myconf="${myconf} --localstatedir=/var"
+
+ econf ${myconf} || die
+ emake || die
+
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed"
+}
diff --git a/net-mail/kolab-resource-handlers/metadata.xml b/net-mail/kolab-resource-handlers/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/net-mail/kolab-resource-handlers/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/net-mail/kolab-webadmin/Manifest b/net-mail/kolab-webadmin/Manifest
new file mode 100644
index 0000000..85bc3eb
--- /dev/null
+++ b/net-mail/kolab-webadmin/Manifest
@@ -0,0 +1,32 @@
+AUX kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch 717 RMD160 47e5f0171c9f1d7b7b6f58715587e8d99c3d9850 SHA1 4af956e165201cb4df25fe9ea3d8372d08d8ddfb SHA256 cadddda544f0b5c7c597beab86b5509db11e844222ae25ed456dc7d31ae07450
+MD5 28c0106c987288ccc0caf21a92f0ef8a files/kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch 717
+RMD160 47e5f0171c9f1d7b7b6f58715587e8d99c3d9850 files/kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch 717
+SHA256 cadddda544f0b5c7c597beab86b5509db11e844222ae25ed456dc7d31ae07450 files/kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch 717
+AUX kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch 574 RMD160 d293f5a91cd41b7e3faa2ddbad0a845e32a7b7bd SHA1 5dbc2110223e41c265e73f12c12e15461ace2b5d SHA256 9d4b4f7e3d0afb874fbf404a50063c143772e6346bf7ce91b4b5e2b4bdea7677
+MD5 a5ed12e34748846f40e7ef6644c221d5 files/kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch 574
+RMD160 d293f5a91cd41b7e3faa2ddbad0a845e32a7b7bd files/kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch 574
+SHA256 9d4b4f7e3d0afb874fbf404a50063c143772e6346bf7ce91b4b5e2b4bdea7677 files/kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch 574
+AUX kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch 1117 RMD160 a28082dc81c205e32eb952d5c04a000071fc7351 SHA1 66a88d39780d2e8cfc777a49c48e17197a5e8f51 SHA256 f4258de04a7698caffbf1b5a36447ffb605f6a8007013d412b84b3f7b0b36f14
+MD5 4cecf7fb1fc267cd4b4e3e4b23477ec6 files/kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch 1117
+RMD160 a28082dc81c205e32eb952d5c04a000071fc7351 files/kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch 1117
+SHA256 f4258de04a7698caffbf1b5a36447ffb605f6a8007013d412b84b3f7b0b36f14 files/kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch 1117
+AUX kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch 422 RMD160 8941a8c27a28304df982bd127da35b8e188ae6a1 SHA1 70cecf8482892cf3deccbad65a1d1c3f4f2ed20c SHA256 5656d9fe1f957200304d6cab8e16365c0346acde87f324ef20e0f397f937860c
+MD5 3b845098c1e2daae23688d3886de529a files/kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch 422
+RMD160 8941a8c27a28304df982bd127da35b8e188ae6a1 files/kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch 422
+SHA256 5656d9fe1f957200304d6cab8e16365c0346acde87f324ef20e0f397f937860c files/kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch 422
+AUX kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch 807 RMD160 d6095de1cf38a2014e8b4b3cb7230fdace60347f SHA1 8c1b03692f4fb357f1f51c9989d470d4685217e1 SHA256 82e0ce30c0a6c4551714793bee73f616550ddf2d28514dfdf02e5087174fd579
+MD5 c2b464c3c1f27b1a7c14ddb78e5aac20 files/kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch 807
+RMD160 d6095de1cf38a2014e8b4b3cb7230fdace60347f files/kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch 807
+SHA256 82e0ce30c0a6c4551714793bee73f616550ddf2d28514dfdf02e5087174fd579 files/kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch 807
+AUX kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch 1032 RMD160 fc2c9e7c795a536e376c492d23c86acd076ec11c SHA1 ad18307f78bee927cfe84a321e84bd9f26e7d6c8 SHA256 101b24ac3011f2eafe5241b3221489e345e9841760e22eef11386602097cf02c
+MD5 9c6801e2fba6a52d00bb404f82b536b3 files/kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch 1032
+RMD160 fc2c9e7c795a536e376c492d23c86acd076ec11c files/kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch 1032
+SHA256 101b24ac3011f2eafe5241b3221489e345e9841760e22eef11386602097cf02c files/kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch 1032
+DIST kolab-webadmin-2.1-gentoo-20070528.tar.bz2 237119 RMD160 632369bf676feefa7991ff75addab84a14c0bae2 SHA1 5710869a0a29c6a62e83c0766e03ba787b01d3db SHA256 75dca1f60eaab1d0fc64359183bf5573dba699af8db321324d326382dd192a30
+EBUILD kolab-webadmin-2.1.ebuild 1137 RMD160 999a61a04e0bf249ba960e44fcb1b2828a885353 SHA1 d9eaa60b50f15836adc7e777fed0003ec1c6a542 SHA256 20611428b1d234a122ae2f678c9bfe8b8ed9599a7e23978aac6c35d0f3a1857e
+MD5 b519bf423684e7bf8c6410165c7b7b18 kolab-webadmin-2.1.ebuild 1137
+RMD160 999a61a04e0bf249ba960e44fcb1b2828a885353 kolab-webadmin-2.1.ebuild 1137
+SHA256 20611428b1d234a122ae2f678c9bfe8b8ed9599a7e23978aac6c35d0f3a1857e kolab-webadmin-2.1.ebuild 1137
+MD5 f8cb3ab4392144d9614201097e372304 files/digest-kolab-webadmin-2.1 307
+RMD160 b2b8f0d8a1c8c8e12adb4fb86dc2b6c0517052c8 files/digest-kolab-webadmin-2.1 307
+SHA256 9cd35e443231a4d90255db044a37dc85a06443e30cdf1f0070770a676809826e files/digest-kolab-webadmin-2.1 307
diff --git a/net-mail/kolab-webadmin/files/digest-kolab-webadmin-2.1 b/net-mail/kolab-webadmin/files/digest-kolab-webadmin-2.1
new file mode 100644
index 0000000..c762562
--- /dev/null
+++ b/net-mail/kolab-webadmin/files/digest-kolab-webadmin-2.1
@@ -0,0 +1,3 @@
+MD5 f3d9a666f7f985d8d3d4c266db82bcaa kolab-webadmin-2.1-gentoo-20070528.tar.bz2 237119
+RMD160 632369bf676feefa7991ff75addab84a14c0bae2 kolab-webadmin-2.1-gentoo-20070528.tar.bz2 237119
+SHA256 75dca1f60eaab1d0fc64359183bf5573dba699af8db321324d326382dd192a30 kolab-webadmin-2.1-gentoo-20070528.tar.bz2 237119
diff --git a/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch
new file mode 100644
index 0000000..1a244a4
--- /dev/null
+++ b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_Makefile.am-2.1.patch
@@ -0,0 +1,18 @@
+--- kolab-webadmin/kolab-webadmin/Makefile.am 2007-05-24 14:15:53.000000000 +0200
++++ kolab-webadmin/kolab-webadmin/Makefile.am.gentoo 2007-05-24 14:16:57.000000000 +0200
+@@ -147,7 +147,7 @@
+ php/admin/templates/formcontainer.tpl \
+ php/admin/templates/admindeleted.tpl
+
+-phptemplatesdir = $(phpkolabdir)/templates
++phptemplatesdir = $(wskolabdir)/templates
+ phptemplates_DATA = $(PHP_TEMPLATES) \
+ php/admin/templates/versions.tpl
+ EXTRA_DIST += $(PHP_TEMPLATES)
+@@ -409,5 +409,5 @@
+
+
+ install-data-hook:
+- $(mkinstalldirs) $(DESTDIR)$(phpkolabdir)/templates_c
++ $(mkinstalldirs) $(DESTDIR)$(wskolabdir)/templates_c
+ # test -z "$(webserver_usr)" || chown $(webserver_usr) $(DESTDIR)$(phpkolabdir)/templates_c
diff --git a/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch
new file mode 100644
index 0000000..044c1c2
--- /dev/null
+++ b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_config.php.in-2.1.patch
@@ -0,0 +1,13 @@
+--- kolab-webadmin/kolab-webadmin/php/admin/include/config.php.in 2006-08-29 17:46:20.000000000 +0200
++++ kolab-webadmin/kolab-webadmin/php/admin/include/config.php.in.gentoo 2006-08-29 17:45:58.000000000 +0200
+@@ -20,8 +20,8 @@
+
+ $topdir = '/@kolab_php_module_prefix@admin';
+ $kolab_prefix = '@prefix@';
+-$php_dir = '@phplibdir2@';
+-$locale_dir = "$php_dir/@kolab_php_module_prefix@admin/locale/";
++$php_dir = '@webserver_document_root@/@webserver_web_prefix@';
++$locale_dir = "@phplibdir2@/@kolab_php_module_prefix@admin/locale/";
+
+ /*
+ Local variables:
diff --git a/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch
new file mode 100644
index 0000000..cfb264d
--- /dev/null
+++ b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_ldap.class.php-2.1.patch
@@ -0,0 +1,31 @@
+--- kolab-webadmin/kolab-webadmin/php/admin/include/ldap.class.php 2007-02-27 15:44:36.000000000 +0100
++++ kolab-webadmin/kolab-webadmin/php/admin/include/ldap.class.php.gentoo 2007-03-21 17:51:55.000000000 +0100
+@@ -117,7 +117,7 @@
+ $dn = $_SESSION['php_dn'];
+ $pw = $_SESSION['php_pw'];
+ }
+- $this->is_bound = ldap_bind( $this->connection, $dn, $pw );
++ $this->is_bound = @ldap_bind( $this->connection, $dn, $pw );
+ if( $this->is_bound ) {
+ $this->bind_dn = $dn;
+ } else {
+@@ -415,6 +415,9 @@
+ }
+
+ function addToDomainGroups( $member, $domains ) {
++ if (empty($domains)) {
++ return true;
++ }
+ foreach( $domains as $domain ) {
+ $domgrpdn = 'cn='.$this->dn_escape($domain).',cn=domains,cn=internal,'.$_SESSION['base_dn'];
+ $dom_obj = $this->read( $domgrpdn );
+@@ -441,6 +444,9 @@
+ }
+
+ function removeFromDomainGroups( $member, $domains ) {
++ if (empty($domains)) {
++ return true;
++ }
+ foreach( $domains as $domain ) {
+ $domgrpdn = 'cn='.$this->dn_escape($domain).',cn=domains,cn=internal,'.$_SESSION['base_dn'];
+ $dom_obj = $this->read( $domgrpdn );
diff --git a/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch
new file mode 100644
index 0000000..47d1fa3
--- /dev/null
+++ b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_locale.php-2.1.patch
@@ -0,0 +1,14 @@
+--- kolab-webadmin/kolab-webadmin/php/admin/include/locale.php 2007-02-16 10:00:11.000000000 +0100
++++ kolab-webadmin/kolab-webadmin/php/admin/include/locale.php.gentoo 2007-02-16 10:08:27.000000000 +0100
+@@ -22,7 +22,10 @@
+
+ // PENDING(romain,steffen): Clean up so this is not a mix of code and global functions
+
+-session_start();
++if(session_id() == '')
++{
++ session_start();
++}
+
+ function supported_lang($lang) {
+
diff --git a/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch
new file mode 100644
index 0000000..f59399c
--- /dev/null
+++ b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_php_admin_include_mysmarty.php.in-2.1.patch
@@ -0,0 +1,22 @@
+--- kolab-webadmin/kolab-webadmin/php/admin/include/mysmarty.php.in 2007-03-27 10:14:38.000000000 +0200
++++ kolab-webadmin/kolab-webadmin/php/admin/include/mysmarty.php.in.gentoo 2006-08-29 17:45:49.000000000 +0200
+@@ -34,7 +34,7 @@
+ global $language;
+ $this->Smarty();
+
+- $basedir = "$php_dir/@kolab_php_module_prefix@admin/";
++ $basedir = "$php_dir/admin/";
+ $this->template_dir = $basedir.'templates/';
+ $this->compile_dir = $basedir.'templates_c/';
+ $this->config_dir = $basedir.'configs/';
+@@ -67,8 +67,8 @@
+ 'code' => 'it_IT' ),
+ array( 'name' => 'Nederlands',
+ 'code' => 'nl_NL' ),
+- // array( 'name' => 'Español',
+- // 'code' => 'es_ES' ),
++ array( 'name' => 'Español',
++ 'code' => 'es_ES' )
+ ));
+ }
+
diff --git a/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch
new file mode 100644
index 0000000..2a68868
--- /dev/null
+++ b/net-mail/kolab-webadmin/files/kolab-webadmin_kolab-webadmin_www_admin_service_index.php.in-2.1.patch
@@ -0,0 +1,20 @@
+--- kolab-webadmin/kolab-webadmin/www/admin/service/index.php.in 2007-02-01 21:17:38.000000000 +0100
++++ kolab-webadmin/kolab-webadmin/www/admin/service/index.php.in.gentoo 2006-07-20 16:21:40.000000000 +0200
+@@ -99,7 +99,7 @@
+ if( !$dn ) {
+ $errors[] = sprintf(_("No account found for email address %s"), $mail);
+ } else {
+- foreach( array( 'postmaster', 'hostmaster', 'abuse', 'virusalert', 'MAILER-DAEMON' ) as $group ) {
++ foreach( array( 'postmaster', 'hostmaster', 'abuse', 'virusalert', 'mailer-daemon' ) as $group ) {
+ $gadr = $group.'@'.$domain;
+ $attrs = array( 'objectClass' => array( 'top', 'kolabGroupOfNames' ),
+ 'cn' => $gadr,
+@@ -327,7 +327,7 @@
+ !exists_group( 'postmaster@'.$domain ) ||
+ !exists_group( 'abuse@'.$domain ) ||
+ !exists_group( 'virusalert@'.$domain ) ||
+- !exists_group( 'MAILER-DAEMON@'.$domain ) ) {
++ !exists_group( 'mailer-daemon@'.$domain ) ) {
+ // Ok, user did not set up system aliases
+ $systemaliasconf[] = array( 'n'=>$domain_count, 'domain'=>$domain );
+ }
diff --git a/net-mail/kolab-webadmin/kolab-webadmin-2.1.ebuild b/net-mail/kolab-webadmin/kolab-webadmin-2.1.ebuild
new file mode 100644
index 0000000..6238107
--- /dev/null
+++ b/net-mail/kolab-webadmin/kolab-webadmin-2.1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+# Marked STABLE (comment necessary for update script)
+
+inherit eutils depend.php
+
+MY_P=${PN}-2.1-gentoo-20070528
+
+DESCRIPTION="The kolab webadmin frontend"
+HOMEPAGE="http://www.kolab.org"
+SRC_URI="http://build.pardus.de/downloads/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 amd64"
+IUSE=""
+
+DEPEND=""
+
+RDEPEND="
+>=dev-php/smarty-2.6.12
+>=dev-php/PEAR-PEAR-1.4.6-r1
+>=dev-php/PEAR-Auth_SASL-1.0.1-r1
+>=dev-php/PEAR-Net_Socket-1.0.6-r1
+"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+
+ require_php_with_use ldap nls
+
+}
+
+src_unpack() {
+
+ unpack ${A} && cd "${S}"
+
+ for PATCH in ${FILESDIR}/*-${PV}.patch
+ do
+ epatch ${PATCH}
+ done
+
+}
+
+src_compile() {
+
+ local myconf
+ myconf="${myconf} --with-dist=gentoo"
+ myconf="${myconf} --libexecdir=/usr/lib"
+ myconf="${myconf} --localstatedir=/var"
+
+ econf ${myconf} || die
+ emake || die
+}
+
+src_install() {
+
+ make DESTDIR="${D}" install || die "Install failed"
+
+ keepdir /var/www/kolab/htdocs/admin/templates_c
+ fowners apache:apache /var/www/kolab/htdocs/admin/templates_c
+}
diff --git a/net-mail/kolabd/ChangeLog b/net-mail/kolabd/ChangeLog
new file mode 100644
index 0000000..bf3aea4
--- /dev/null
+++ b/net-mail/kolabd/ChangeLog
@@ -0,0 +1,17 @@
+# ChangeLog for net-mail/kolabd
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 17 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch:
+ Fixed the inclusion of imap annotations.
+
+ 17 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch,
+ files/cgi-php.ini.2.1.template:
+ Fixed the php memory limits.
+
+ 11 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/imapd.annotation_definitions.2.1.template, kolabd-2.1.ebuild:
+ Updated to the newer php and cyrus ebuilds.
+
diff --git a/net-mail/kolabd/Manifest b/net-mail/kolabd/Manifest
new file mode 100644
index 0000000..7bff69c
--- /dev/null
+++ b/net-mail/kolabd/Manifest
@@ -0,0 +1,224 @@
+AUX 00_kolab.conf.2.1.template 3128 RMD160 f37ff5225fd7f359dc60d4c2d214217183db7e18 SHA1 309fc0a6dad6454bbc0b5855c8e1e1126beb6a90 SHA256 a123e98a949c331acd84f64aa8bb726ad3fcd155e41941f4ec16bcc67c8f585e
+MD5 6919656359dae9a96496c463ed72111e files/00_kolab.conf.2.1.template 3128
+RMD160 f37ff5225fd7f359dc60d4c2d214217183db7e18 files/00_kolab.conf.2.1.template 3128
+SHA256 a123e98a949c331acd84f64aa8bb726ad3fcd155e41941f4ec16bcc67c8f585e files/00_kolab.conf.2.1.template 3128
+AUX 11_kolab_domain.conf.2.1.template 4533 RMD160 d344487756da64886d2d0a04c8a008a7f79fa66b SHA1 d72ffcab81fcd9c90552c9548f7e25f977087dbc SHA256 c7d25368caf10baba4d3e13a0fa5a8d4f6751312ebf4883f45463a5e700e2251
+MD5 6a5f36a4af67a852a48b90b0f1bed620 files/11_kolab_domain.conf.2.1.template 4533
+RMD160 d344487756da64886d2d0a04c8a008a7f79fa66b files/11_kolab_domain.conf.2.1.template 4533
+SHA256 c7d25368caf10baba4d3e13a0fa5a8d4f6751312ebf4883f45463a5e700e2251 files/11_kolab_domain.conf.2.1.template 4533
+AUX 12_kolab_vhosts.conf.2.1.template 1700 RMD160 50e290109f1ea5103c5b23d75da3db88f4dd4c98 SHA1 ec922a13cac58c8defe7fb5d4116391a53e14cdc SHA256 d1d4ae8b69a173d33449893d38c3261422c8704ff26055ff73037e35d5d35a5f
+MD5 91e3598f99216c85c3edb1ac216a541d files/12_kolab_vhosts.conf.2.1.template 1700
+RMD160 50e290109f1ea5103c5b23d75da3db88f4dd4c98 files/12_kolab_vhosts.conf.2.1.template 1700
+SHA256 d1d4ae8b69a173d33449893d38c3261422c8704ff26055ff73037e35d5d35a5f files/12_kolab_vhosts.conf.2.1.template 1700
+AUX 13_kolab_example.conf.2.1.template 6474 RMD160 5eebdc0b87cbb196baa7610b24890135f6b0c181 SHA1 b673ebac378fa85ae4bb49098a8ed193171007e5 SHA256 f87a47f69daced468fe58bce0d73ff82da12e938566657d376231f2ce85cffc7
+MD5 7694b9226599c8dd6a994d52fd419e91 files/13_kolab_example.conf.2.1.template 6474
+RMD160 5eebdc0b87cbb196baa7610b24890135f6b0c181 files/13_kolab_example.conf.2.1.template 6474
+SHA256 f87a47f69daced468fe58bce0d73ff82da12e938566657d376231f2ce85cffc7 files/13_kolab_example.conf.2.1.template 6474
+AUX 70_mod_php5.conf.2.1.template 909 RMD160 298a3b06aa6f1a7b835ce89db3c74d128d660f62 SHA1 9960cc5d942280634bf716cbc1d2641806b2de0c SHA256 0752b91435216796e5f0244bc1a4ee35bcab5b50765c3ca36eb52f8b9969a1fe
+MD5 1aa9b14b61646c761c6dac2e1cacfbf6 files/70_mod_php5.conf.2.1.template 909
+RMD160 298a3b06aa6f1a7b835ce89db3c74d128d660f62 files/70_mod_php5.conf.2.1.template 909
+SHA256 0752b91435216796e5f0244bc1a4ee35bcab5b50765c3ca36eb52f8b9969a1fe files/70_mod_php5.conf.2.1.template 909
+AUX access.2.1.postfix 971 RMD160 b86b158dbdf80401e486ebdc2f087733c4c1e0a4 SHA1 924c0963c490c9db6dfc1ba242de407184b7f592 SHA256 ad5435f3a800463a58706257003e8d598301bd8a81ba1ec869279d72ea7b1902
+MD5 630e33b1382c98b59dc2d062f7768e10 files/access.2.1.postfix 971
+RMD160 b86b158dbdf80401e486ebdc2f087733c4c1e0a4 files/access.2.1.postfix 971
+SHA256 ad5435f3a800463a58706257003e8d598301bd8a81ba1ec869279d72ea7b1902 files/access.2.1.postfix 971
+AUX admin.service 29 RMD160 231c94400d675b2568c965738db327dd85f9b4d0 SHA1 526eadadf37286c703b4a39c6892725fd7232259 SHA256 925aa7c6896134401410548db058d3e127e38fc0f1461e5622699ff1a32945ec
+MD5 be0238184c22c70a6202aa485575be28 files/admin.service 29
+RMD160 231c94400d675b2568c965738db327dd85f9b4d0 files/admin.service 29
+SHA256 925aa7c6896134401410548db058d3e127e38fc0f1461e5622699ff1a32945ec files/admin.service 29
+AUX aliases.2.1.postfix 833 RMD160 23d32eb4aa8d8b545fc36a3c873ffdecc4707423 SHA1 7b3afe13feb592d72bc420c728ccab5cde60664b SHA256 80a1f5ac6e8879121e932ac360f2314c58b7dffd2adf1794c976a4cfe6371222
+MD5 9f367d9be5fab9d45d4d06c2934cb50f files/aliases.2.1.postfix 833
+RMD160 23d32eb4aa8d8b545fc36a3c873ffdecc4707423 files/aliases.2.1.postfix 833
+SHA256 80a1f5ac6e8879121e932ac360f2314c58b7dffd2adf1794c976a4cfe6371222 files/aliases.2.1.postfix 833
+AUX canonical.2.1.postfix 440 RMD160 82bc1a146fc7e7c9cc26ffdf3980b925a9e307b7 SHA1 3f330cd3961b31f16336e72ded3b84ebe3a565e9 SHA256 624ebcb1394fafebc9b2e9567e4ed3ecc31c5c86ea6928deaa8def66760519ed
+MD5 d5db34cc4dcade59689ebd4207758377 files/canonical.2.1.postfix 440
+RMD160 82bc1a146fc7e7c9cc26ffdf3980b925a9e307b7 files/canonical.2.1.postfix 440
+SHA256 624ebcb1394fafebc9b2e9567e4ed3ecc31c5c86ea6928deaa8def66760519ed files/canonical.2.1.postfix 440
+AUX cgi-php.ini.2.1.template 42303 RMD160 6b92c494793a2a9101ba81e3f4e0bff38df24359 SHA1 337adee71b444ce07f1f2c0940233bafe8eb655b SHA256 f7cf18d3d010ecda9a77e063dd7826ef25b51be41251e81b19b9682276b569a5
+MD5 0a5c76c457bc76726f6fb98a97b10939 files/cgi-php.ini.2.1.template 42303
+RMD160 6b92c494793a2a9101ba81e3f4e0bff38df24359 files/cgi-php.ini.2.1.template 42303
+SHA256 f7cf18d3d010ecda9a77e063dd7826ef25b51be41251e81b19b9682276b569a5 files/cgi-php.ini.2.1.template 42303
+AUX conf.d-apache2.2.1.template 4106 RMD160 ead4b617ab45f281cfb5e3ab95e08331aeafa187 SHA1 6e334c6130a06013c68776edfd48439351225e9b SHA256 96c786f62516c50f2ab6ba7f8adc6f322829780e9830df3690c45f6afa3da2b8
+MD5 431b47b178c7ec53e026ccc83d4fe712 files/conf.d-apache2.2.1.template 4106
+RMD160 ead4b617ab45f281cfb5e3ab95e08331aeafa187 files/conf.d-apache2.2.1.template 4106
+SHA256 96c786f62516c50f2ab6ba7f8adc6f322829780e9830df3690c45f6afa3da2b8 files/conf.d-apache2.2.1.template 4106
+AUX conf.d-sasl.2.1.template 593 RMD160 c6f13c345f4084d1f096af0d7820d8ac403c085f SHA1 4236ca032de43c51e711c58d0a74f751b8e08035 SHA256 25a112d142bbf3aa3abb2384f246b7b5bf402894abc62e05a1d5dc62ee0a3e20
+MD5 700f3caa316f1f0fa4486074a178c3ec files/conf.d-sasl.2.1.template 593
+RMD160 c6f13c345f4084d1f096af0d7820d8ac403c085f files/conf.d-sasl.2.1.template 593
+SHA256 25a112d142bbf3aa3abb2384f246b7b5bf402894abc62e05a1d5dc62ee0a3e20 files/conf.d-sasl.2.1.template 593
+AUX conf.d-slapd.2.1.template 559 RMD160 0209b81aa2875756f00642b76accee35d058437b SHA1 d50d4406741460047b27cb937e3de066dcba5faa SHA256 39a3c132811049aade1abd9db81d749f262ca498d19eddd6d7ebb7edab488183
+MD5 36266757ec6d48e1eb550794c803076b files/conf.d-slapd.2.1.template 559
+RMD160 0209b81aa2875756f00642b76accee35d058437b files/conf.d-slapd.2.1.template 559
+SHA256 39a3c132811049aade1abd9db81d749f262ca498d19eddd6d7ebb7edab488183 files/conf.d-slapd.2.1.template 559
+AUX favicon.ico 2238 RMD160 be3a923ef4ac6812c45e67fc04d404448d85a5f9 SHA1 365a90dc1f342c8a5a25e217e2211476ce1322e3 SHA256 e692aaeb8c947bb712b621155f610f80e8467fcb18f658e6743c87701daf17a7
+MD5 75627a30e63a6e37ac62263aff66473e files/favicon.ico 2238
+RMD160 be3a923ef4ac6812c45e67fc04d404448d85a5f9 files/favicon.ico 2238
+SHA256 e692aaeb8c947bb712b621155f610f80e8467fcb18f658e6743c87701daf17a7 files/favicon.ico 2238
+AUX horde.schema 14662 RMD160 f1b2dcddcfcee176322d2af29eb2fcf91577dda4 SHA1 76105b2944689f97f29cb51a815c7cea97173f2d SHA256 ab89bae9c75c7c610c6acc951a423b53b9a200b248fc1f8beaf16128ccc45dba
+MD5 4761906f2fba7b73b549d2308371c212 files/horde.schema 14662
+RMD160 f1b2dcddcfcee176322d2af29eb2fcf91577dda4 files/horde.schema 14662
+SHA256 ab89bae9c75c7c610c6acc951a423b53b9a200b248fc1f8beaf16128ccc45dba files/horde.schema 14662
+AUX horde.service 15 RMD160 b04ae9256341c7375ede0ae0a88ff7546356649a SHA1 bb3bebdc2d3a3cdea738d4ed208432a4d2ded19f SHA256 34fe62312c9a06db2813e777ce585085358f580578ba13f5bd2a85450541acd4
+MD5 72a116eb3f350fdea5a3f7fbf403c133 files/horde.service 15
+RMD160 b04ae9256341c7375ede0ae0a88ff7546356649a files/horde.service 15
+SHA256 34fe62312c9a06db2813e777ce585085358f580578ba13f5bd2a85450541acd4 files/horde.service 15
+AUX imapd.annotation_definitions.2.1.template 486 RMD160 2ef8097f91ec9c0a13c5392404c470f431785263 SHA1 6d58053d018d16421aaa90096974106889c31796 SHA256 0878ca4507a4ce507811328f5860ea70b0608cda00bd0b407bc1cbe8352541e0
+MD5 67e395d689783398f4335dac32d90b62 files/imapd.annotation_definitions.2.1.template 486
+RMD160 2ef8097f91ec9c0a13c5392404c470f431785263 files/imapd.annotation_definitions.2.1.template 486
+SHA256 0878ca4507a4ce507811328f5860ea70b0608cda00bd0b407bc1cbe8352541e0 files/imapd.annotation_definitions.2.1.template 486
+AUX index.php 1675 RMD160 784206df1d7342ac81021e63b702ee2b432e983a SHA1 a6618fd533d6c73f140b9cd60e163b88ba056216 SHA256 40fec2fece56bc189de7c21b3956f20fb858b775931d0529b304185e7dd12034
+MD5 f62a7874a57dbce96077250140260fb3 files/index.php 1675
+RMD160 784206df1d7342ac81021e63b702ee2b432e983a files/index.php 1675
+SHA256 40fec2fece56bc189de7c21b3956f20fb858b775931d0529b304185e7dd12034 files/index.php 1675
+AUX kolab-domain-base.include.2.1.template 1099 RMD160 e7cf4b4192e62c783cab4a246ffc85525efd236a SHA1 416c468efc3cc7270e6051bb34fd0858bea7ba63 SHA256 53d8241314d124f0654a542f00f90985bbd5b922de08adc734875038495d2089
+MD5 784a5fc7d28aba0b94b6ee61c807e5d2 files/kolab-domain-base.include.2.1.template 1099
+RMD160 e7cf4b4192e62c783cab4a246ffc85525efd236a files/kolab-domain-base.include.2.1.template 1099
+SHA256 53d8241314d124f0654a542f00f90985bbd5b922de08adc734875038495d2089 files/kolab-domain-base.include.2.1.template 1099
+AUX kolab-vhosts-mailman.include.use-mailman-2.1.template 536 RMD160 38436af2e79b5833df10b6ef4b7cc70f9c122202 SHA1 756583785886a9046648cbf1a7058ff78e1585e9 SHA256 1afc77a97492d978aa3cf46aff634e08830a2cd65901093a6b20230a34c2b920
+MD5 757bf869026822e9631eea507848919f files/kolab-vhosts-mailman.include.use-mailman-2.1.template 536
+RMD160 38436af2e79b5833df10b6ef4b7cc70f9c122202 files/kolab-vhosts-mailman.include.use-mailman-2.1.template 536
+SHA256 1afc77a97492d978aa3cf46aff634e08830a2cd65901093a6b20230a34c2b920 files/kolab-vhosts-mailman.include.use-mailman-2.1.template 536
+AUX kolab_logo.small.png 9459 RMD160 7941c8ed28de86ae26da68a6cc8c6c851c58e510 SHA1 b937085beba22615a714a1875a7efe137d3078b2 SHA256 054beb039f6d590be122d8d45aa49f3c383a5e093190137c2e8d98e01403d825
+MD5 e9810bfa64b2cd59aa97ceb5e02a94f1 files/kolab_logo.small.png 9459
+RMD160 7941c8ed28de86ae26da68a6cc8c6c851c58e510 files/kolab_logo.small.png 9459
+SHA256 054beb039f6d590be122d8d45aa49f3c383a5e093190137c2e8d98e01403d825 files/kolab_logo.small.png 9459
+AUX kolab_services 2862 RMD160 8210ceccd575b61b7738af6f8b0bd16c61185588 SHA1 1d23c96cd04172aa07f0638ad38b41c4ce0cb9b5 SHA256 b0bcc0c7dfb0edfb32fa1239c6d2347620b2dd0c05d3a71201dd6514a52c1184
+MD5 d533c9df73cf8f000a120d5e17f74a03 files/kolab_services 2862
+RMD160 8210ceccd575b61b7738af6f8b0bd16c61185588 files/kolab_services 2862
+SHA256 b0bcc0c7dfb0edfb32fa1239c6d2347620b2dd0c05d3a71201dd6514a52c1184 files/kolab_services 2862
+AUX kolabd 330 RMD160 18b5c4ddbbd89b1140bb00063b75151e9966e3eb SHA1 44bbd004f9611905f321e72b1ecb71840571688b SHA256 c84ab45fe75384abb11ea869333f7293e07c4e180e916363572ac7e2536c9706
+MD5 a7819a6af60c7abcb50b8a8c526361a7 files/kolabd 330
+RMD160 18b5c4ddbbd89b1140bb00063b75151e9966e3eb files/kolabd 330
+SHA256 c84ab45fe75384abb11ea869333f7293e07c4e180e916363572ac7e2536c9706 files/kolabd 330
+AUX kolabd.legacy 338 RMD160 b3c57baefad50536ef92dab3ef338af82ea7e771 SHA1 1bc91f1ee86eab78d7e76b069e18a1d5d2053bb2 SHA256 006fda47be7a352d4814d7923ca09c93d6252eb267f3b7adc383210b86f4b00e
+MD5 fad67aea24c9f29721b9aa57d15164de files/kolabd.legacy 338
+RMD160 b3c57baefad50536ef92dab3ef338af82ea7e771 files/kolabd.legacy 338
+SHA256 006fda47be7a352d4814d7923ca09c93d6252eb267f3b7adc383210b86f4b00e files/kolabd.legacy 338
+AUX kolabd_kolabd_kolab_bootstrap.in-2.1.patch 848 RMD160 20ea5c7356b30493b3da1d3d7299f8c58e07bfed SHA1 e45d0153364e1b83f97041f3d045a2594c4a1da0 SHA256 1d689741c76b1498d8f304a28b998ac9eb8ab6573137e0240bda03c66d8e9c84
+MD5 32c6f6655cd9c3912451430be641ca87 files/kolabd_kolabd_kolab_bootstrap.in-2.1.patch 848
+RMD160 20ea5c7356b30493b3da1d3d7299f8c58e07bfed files/kolabd_kolabd_kolab_bootstrap.in-2.1.patch 848
+SHA256 1d689741c76b1498d8f304a28b998ac9eb8ab6573137e0240bda03c66d8e9c84 files/kolabd_kolabd_kolab_bootstrap.in-2.1.patch 848
+AUX kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch 416 RMD160 67835eb3b711fa0962fc099b187c27b5a070939d SHA1 8ecf895ad58944bed18d1c0f8eebe77bbb0d218e SHA256 b4d9d8e7efcfbd03a38214bdbe0bad222affa5560599e4da07fc197efa5991e8
+MD5 dbfc60b3ddf17ff4d7de6b75b04f519e files/kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch 416
+RMD160 67835eb3b711fa0962fc099b187c27b5a070939d files/kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch 416
+SHA256 b4d9d8e7efcfbd03a38214bdbe0bad222affa5560599e4da07fc197efa5991e8 files/kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch 416
+AUX kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch 470 RMD160 3c3f4096561f74ac9210569c7a4540d499a712df SHA1 5cfd505b674adf5c7c236f6840e24a5efb08db29 SHA256 3e1af7e1bff10292d21440eefd6aecf82be912f485ab36310761218f67782e02
+MD5 0255502415bdd9443b11ba33d58fdbd3 files/kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch 470
+RMD160 3c3f4096561f74ac9210569c7a4540d499a712df files/kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch 470
+SHA256 3e1af7e1bff10292d21440eefd6aecf82be912f485ab36310761218f67782e02 files/kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch 470
+AUX kolabd_kolabd_namespace_libexec_start.in-2.1.patch 257 RMD160 4fff005ad382795243b45172f20e9d4df5304711 SHA1 286142ff036de9b0edef7873b6f40a2dcb60de8e SHA256 702474a7eaf9200a80cdf32ddae8f8a2abfc8ae95aad00f7dcb8e90c89c9a699
+MD5 b028c5f0659cbd169c5f5757cc7a973c files/kolabd_kolabd_namespace_libexec_start.in-2.1.patch 257
+RMD160 4fff005ad382795243b45172f20e9d4df5304711 files/kolabd_kolabd_namespace_libexec_start.in-2.1.patch 257
+SHA256 702474a7eaf9200a80cdf32ddae8f8a2abfc8ae95aad00f7dcb8e90c89c9a699 files/kolabd_kolabd_namespace_libexec_start.in-2.1.patch 257
+AUX kolabd_kolabd_namespace_libexec_stop.in-2.1.patch 249 RMD160 e2c8e4fb96d6f6ff81924e6dd10ea63613842484 SHA1 01cdae6abda7151f1e0819e1e09cdc31d3bd2fc4 SHA256 e982a9b280f472f02b85f5a1194393e5bc2121c6524addc3cfa1e7aaeb499fd3
+MD5 61abb78299e7640a4eace894e5a0dc21 files/kolabd_kolabd_namespace_libexec_stop.in-2.1.patch 249
+RMD160 e2c8e4fb96d6f6ff81924e6dd10ea63613842484 files/kolabd_kolabd_namespace_libexec_stop.in-2.1.patch 249
+SHA256 e982a9b280f472f02b85f5a1194393e5bc2121c6524addc3cfa1e7aaeb499fd3 files/kolabd_kolabd_namespace_libexec_stop.in-2.1.patch 249
+AUX kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch 491 RMD160 b3b533d69d6290812ce0cf24e8023307207e38e0 SHA1 d80d0d4b4d39b3afa158fc57d96514f3437f6896 SHA256 8690e85a0c15884db0592e59e3cdab1d029b0e8ae3ff36af8908178595369f2c
+MD5 0e4e3b7f398edff6b42524695f11da04 files/kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch 491
+RMD160 b3b533d69d6290812ce0cf24e8023307207e38e0 files/kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch 491
+SHA256 8690e85a0c15884db0592e59e3cdab1d029b0e8ae3ff36af8908178595369f2c files/kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch 491
+AUX kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch 361 RMD160 69d8481629368549de79d772095331e917bbc3a6 SHA1 3a77d3d1fb621345af1eedc77faa6b33d2761168 SHA256 542480f8eb9b8980d29a4220c2122d95046893c4d7a103e15cb494c220f76e5a
+MD5 f2f5b21d3e1129f3e34aa50ffbf80e0d files/kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch 361
+RMD160 69d8481629368549de79d772095331e917bbc3a6 files/kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch 361
+SHA256 542480f8eb9b8980d29a4220c2122d95046893c4d7a103e15cb494c220f76e5a files/kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch 361
+AUX kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch 752 RMD160 fba878ad4b24ad74fbe9513c26c65c23e63406e7 SHA1 92b1db152f6a83a7589d19b7048695bf1eb52212 SHA256 17868bfcdbcdbd64c89e0a70602855d42b84a767315987611e7803f419c66f85
+MD5 264dbd31915344a1f9b0b5f199ed91c3 files/kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch 752
+RMD160 fba878ad4b24ad74fbe9513c26c65c23e63406e7 files/kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch 752
+SHA256 17868bfcdbcdbd64c89e0a70602855d42b84a767315987611e7803f419c66f85 files/kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch 752
+AUX kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch 837 RMD160 acff30ea879c509486c3c68dbc1b5080383a0866 SHA1 dad175047e0cafb2ac366db2816680c5811758ae SHA256 b52a9dc4cdd6a65b4569adb471f5aedd0624ea116c782336834c2ed7543f0dbf
+MD5 3e38f8775cfc933bad96df76011e29d0 files/kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch 837
+RMD160 acff30ea879c509486c3c68dbc1b5080383a0866 files/kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch 837
+SHA256 b52a9dc4cdd6a65b4569adb471f5aedd0624ea116c782336834c2ed7543f0dbf files/kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch 837
+AUX kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch 2186 RMD160 6cd2524873ee82f54b71195228bb43c27b21148b SHA1 bd4410ba2f28e71b3a894e2d8d053a80f994e570 SHA256 170e0308b5a11cfc3dfde60a783765e002f3bec01a51b6b6ab58f7220728b3b8
+MD5 16a48ed3a52dd1abe26948139a2e5286 files/kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch 2186
+RMD160 6cd2524873ee82f54b71195228bb43c27b21148b files/kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch 2186
+SHA256 170e0308b5a11cfc3dfde60a783765e002f3bec01a51b6b6ab58f7220728b3b8 files/kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch 2186
+AUX kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch 1162 RMD160 5782722fd55f352239884b43e41a8074df497bc0 SHA1 10fe8dfe1ac55cb1389f33cce418fc691701b276 SHA256 709df9ad962fd463ceb48d7a1dc08fef68978865403022b70940fffca7825bfc
+MD5 8ac0de35821387666b51027791ddf320 files/kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch 1162
+RMD160 5782722fd55f352239884b43e41a8074df497bc0 files/kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch 1162
+SHA256 709df9ad962fd463ceb48d7a1dc08fef68978865403022b70940fffca7825bfc files/kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch 1162
+AUX kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch 624 RMD160 630e6047432c978fc9ba668a77f80c28987758d8 SHA1 73fb059e916e2a7d53627c3e24a250101f1cf046 SHA256 7cc84fc0770b9e9fd4a6f22ae39a3ba00f0a18f9a023f9fc7362c8cdfc4e3319
+MD5 7483850f9d7251307c2f40a041ba6f95 files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch 624
+RMD160 630e6047432c978fc9ba668a77f80c28987758d8 files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch 624
+SHA256 7cc84fc0770b9e9fd4a6f22ae39a3ba00f0a18f9a023f9fc7362c8cdfc4e3319 files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch 624
+AUX kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch 514 RMD160 5ae70766ab39746415e1ed5601bb5dd99b46e86c SHA1 faaf8211221330f40d0bae09f0c85ae60311cc7f SHA256 192bff57b84cb33e38a9338e33182b8b3e9c952ebf247e0ee1882731e4b8a7c9
+MD5 dd7fb3e4742cf3d4d272062e1f8691d1 files/kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch 514
+RMD160 5ae70766ab39746415e1ed5601bb5dd99b46e86c files/kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch 514
+SHA256 192bff57b84cb33e38a9338e33182b8b3e9c952ebf247e0ee1882731e4b8a7c9 files/kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch 514
+AUX kolabd_kolabd_templates_main.cf.template.in-2.1.patch 45228 RMD160 f1264f1fa4a4d81db1e4a2954f66c2323ff29f32 SHA1 21c485cc5b06ba1583ea38828ba9d73b026148bf SHA256 6c724db3cc8ec10d081cbe818b8b7f3d4ff7d0d681a83dd5b3b8925b4bad7bcf
+MD5 f0a82712f90a2a5105f5b5cdc7f78d0c files/kolabd_kolabd_templates_main.cf.template.in-2.1.patch 45228
+RMD160 f1264f1fa4a4d81db1e4a2954f66c2323ff29f32 files/kolabd_kolabd_templates_main.cf.template.in-2.1.patch 45228
+SHA256 6c724db3cc8ec10d081cbe818b8b7f3d4ff7d0d681a83dd5b3b8925b4bad7bcf files/kolabd_kolabd_templates_main.cf.template.in-2.1.patch 45228
+AUX kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch 45492 RMD160 99b30b54e1fd14eefc3fa4a329bce544130de762 SHA1 e4fdc0c83aa91137f10730081cd7c92f4cca31e8 SHA256 f58a3cab7bf3625cb7c884bc2b8d62dc8fd33f2949a91e5a433f41c2db82a139
+MD5 4b7cc7177422e67e7637b4fd08836a4d files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch 45492
+RMD160 99b30b54e1fd14eefc3fa4a329bce544130de762 files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch 45492
+SHA256 f58a3cab7bf3625cb7c884bc2b8d62dc8fd33f2949a91e5a433f41c2db82a139 files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch 45492
+AUX kolabd_kolabd_templates_master.cf.template.in-2.1.patch 8902 RMD160 0e26cb48d6107ff7ce8106fd1768e736c10189c5 SHA1 7b06350d2ddfd8cdd90579fd46acd07ed1522939 SHA256 a50cef349e344ad5571379d7e5d9094b3af8762570e72b7d9ac1dd4031bead6b
+MD5 b18856b8b4dd932a21c847049e4c5e20 files/kolabd_kolabd_templates_master.cf.template.in-2.1.patch 8902
+RMD160 0e26cb48d6107ff7ce8106fd1768e736c10189c5 files/kolabd_kolabd_templates_master.cf.template.in-2.1.patch 8902
+SHA256 a50cef349e344ad5571379d7e5d9094b3af8762570e72b7d9ac1dd4031bead6b files/kolabd_kolabd_templates_master.cf.template.in-2.1.patch 8902
+AUX kolabd_kolabd_templates_php.ini.template.in-2.1.patch 47874 RMD160 74a828c0fda3549dd3b110d773ab62cafd3bef8d SHA1 baa9eb8a00ac70babeba6b16228b8b391ce1e432 SHA256 b0f38a67863086d4e6e74faff8b1eb5a642ff9786d41441be2f3984bb51f60d5
+MD5 56ef9e26d7bcd0ce9c750aae051b9fad files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch 47874
+RMD160 74a828c0fda3549dd3b110d773ab62cafd3bef8d files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch 47874
+SHA256 b0f38a67863086d4e6e74faff8b1eb5a642ff9786d41441be2f3984bb51f60d5 files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch 47874
+AUX kolabd_kolabd_templates_rc.conf.template.in-2.1.patch 656 RMD160 8f6729050df49b169342b730c567d021c236e3d7 SHA1 d5fd84d82d45d63f3b0a07cb57a13f9d28809a99 SHA256 4f6b5a21eb592c4b0163f62c0ac86a96858c0ddec7014909329859fd7f5c2d50
+MD5 49a8e09d08ad990e85f025fc9e9917c3 files/kolabd_kolabd_templates_rc.conf.template.in-2.1.patch 656
+RMD160 8f6729050df49b169342b730c567d021c236e3d7 files/kolabd_kolabd_templates_rc.conf.template.in-2.1.patch 656
+SHA256 4f6b5a21eb592c4b0163f62c0ac86a96858c0ddec7014909329859fd7f5c2d50 files/kolabd_kolabd_templates_rc.conf.template.in-2.1.patch 656
+AUX kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch 476 RMD160 79b3690ec0d181f6670c58f517e2a3b90f6b0952 SHA1 72c161fe0da1770d288b8ca546b494ccaf4adf80 SHA256 2e842a377f222bda4351154914bbdf614c3293af3647b921cbbf68c3973dcdc9
+MD5 74b02f299a39d162ed56bce8cf2f9732 files/kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch 476
+RMD160 79b3690ec0d181f6670c58f517e2a3b90f6b0952 files/kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch 476
+SHA256 2e842a377f222bda4351154914bbdf614c3293af3647b921cbbf68c3973dcdc9 files/kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch 476
+AUX kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch 459 RMD160 571b8c3cd4c57f5aa79e60c2518aaffc081293f0 SHA1 11c74af4ce6af47ee8ec8c9333f36d3839349ad6 SHA256 f1fe03449825e18738e53e70b8a0b954f597aa1b222dc18dfbf1eb145f1578f4
+MD5 29728cea432002b197a481caee81c726 files/kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch 459
+RMD160 571b8c3cd4c57f5aa79e60c2518aaffc081293f0 files/kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch 459
+SHA256 f1fe03449825e18738e53e70b8a0b954f597aa1b222dc18dfbf1eb145f1578f4 files/kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch 459
+AUX kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch 568 RMD160 27faf39c8daa08674a74c0ce384025303c1b0026 SHA1 92cc25c8d06b93d04c1abf4e34fd99953b0d0c8a SHA256 5a25d7dd10ac7f58fbabf9e603aca0ce3627dd70b22e0b43807230af35dc4457
+MD5 dec9ed8a504beac9c7f198dbc5bd8303 files/kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch 568
+RMD160 27faf39c8daa08674a74c0ce384025303c1b0026 files/kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch 568
+SHA256 5a25d7dd10ac7f58fbabf9e603aca0ce3627dd70b22e0b43807230af35dc4457 files/kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch 568
+AUX kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch 906 RMD160 789f17847a8fac7d48a99b51d7bb00c9d0493773 SHA1 824a79bffcea84aa921f78e17c63baf7680a9390 SHA256 abf0a3bd7de3f3c44baf5c1ba980d2196636902e0e1ea6d3f3bd9b45c8c17000
+MD5 d032ef65084142ae3937343fd3435c7c files/kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch 906
+RMD160 789f17847a8fac7d48a99b51d7bb00c9d0493773 files/kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch 906
+SHA256 abf0a3bd7de3f3c44baf5c1ba980d2196636902e0e1ea6d3f3bd9b45c8c17000 files/kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch 906
+AUX kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch 429 RMD160 43e42c7beb1621992cfee7811d5d9955a84ac7f1 SHA1 58dcbbbe43d104c7cd50c259575eca69ee486ce0 SHA256 1a1328d3703b4ebd95d09107a01c86c9091462c4a534063a7747851d6a5fe1ec
+MD5 e7b77d21e948ba399e9165db4a8c2a34 files/kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch 429
+RMD160 43e42c7beb1621992cfee7811d5d9955a84ac7f1 files/kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch 429
+SHA256 1a1328d3703b4ebd95d09107a01c86c9091462c4a534063a7747851d6a5fe1ec files/kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch 429
+AUX kolabvirtual.2.1.postfix 638 RMD160 4466fd5cc41d38edc417dc5f84f470cce1c8887c SHA1 740155c1075b944995ff2faf37915d33ce514587 SHA256 dc8ea6aeb7ac59abd720bccfb0e42f19ef6d0606ab1b5c28dceffe4de3b1d619
+MD5 81b90dda6743505185a422ec7f09c18c files/kolabvirtual.2.1.postfix 638
+RMD160 4466fd5cc41d38edc417dc5f84f470cce1c8887c files/kolabvirtual.2.1.postfix 638
+SHA256 dc8ea6aeb7ac59abd720bccfb0e42f19ef6d0606ab1b5c28dceffe4de3b1d619 files/kolabvirtual.2.1.postfix 638
+AUX local.cf.use-spam-2.1.template 2042 RMD160 fbd89992bc5adce30b10c2e28e0b4bc7055303a6 SHA1 008cd5bbe4e062648e33641ee5b25c42b500eb98 SHA256 a66cb54fcafac6486e6d408c06e5af64960f10f3ce602e10d750085095412434
+MD5 1dc8ede312817f07a1ec2e1436869d10 files/local.cf.use-spam-2.1.template 2042
+RMD160 fbd89992bc5adce30b10c2e28e0b4bc7055303a6 files/local.cf.use-spam-2.1.template 2042
+SHA256 a66cb54fcafac6486e6d408c06e5af64960f10f3ce602e10d750085095412434 files/local.cf.use-spam-2.1.template 2042
+AUX powered-by-gentoo.jpg 12582 RMD160 8c31f3e2072ea81cb9ab88f4cf6cdf6cc41fac17 SHA1 3c81983709b5944fdb8ff3d7c19cd9f784de75ea SHA256 5dfcf9bc4508ede5890f6123f9798093bf236c33e6a474f2e1999424ca48ae74
+MD5 360aa89dc04c40f1aa2e3d14494a9917 files/powered-by-gentoo.jpg 12582
+RMD160 8c31f3e2072ea81cb9ab88f4cf6cdf6cc41fac17 files/powered-by-gentoo.jpg 12582
+SHA256 5dfcf9bc4508ede5890f6123f9798093bf236c33e6a474f2e1999424ca48ae74 files/powered-by-gentoo.jpg 12582
+AUX relocated.2.1.postfix 457 RMD160 eb16b0af4f8ba7e7edf7cf748fa0498e15533bbe SHA1 5a8150bc90ef557fa56e668acaa72c92ad3759b4 SHA256 7d9436948c531fa3fd7bdf38f3995a94648c94b866742800b088996dd0c43911
+MD5 cfcf3a726e07292b57f49e6c45ab4ba9 files/relocated.2.1.postfix 457
+RMD160 eb16b0af4f8ba7e7edf7cf748fa0498e15533bbe files/relocated.2.1.postfix 457
+SHA256 7d9436948c531fa3fd7bdf38f3995a94648c94b866742800b088996dd0c43911 files/relocated.2.1.postfix 457
+AUX v310.pre.use-spam-2.1.template 2503 RMD160 4c7db951eefb456f00085c190b6e93737a708ae7 SHA1 b99db01963519929b477448b59249ddb2cd7e9a8 SHA256 4c5b8e60ef1795ad9259a9b957b0cbd79d802226da8a82f558853454d004b73a
+MD5 39bb9ce879df2daec7ebd82cf6cbc284 files/v310.pre.use-spam-2.1.template 2503
+RMD160 4c7db951eefb456f00085c190b6e93737a708ae7 files/v310.pre.use-spam-2.1.template 2503
+SHA256 4c5b8e60ef1795ad9259a9b957b0cbd79d802226da8a82f558853454d004b73a files/v310.pre.use-spam-2.1.template 2503
+DIST kolabd-2.1-gentoo-20070510.tar.bz2 156622 RMD160 589b75593436a5057c17b286e68dd9a1453df572 SHA1 2544ce056a8c459963e9bf9828f9b4659ab905c3 SHA256 f320b597a379539ae734d6833bd957bd306cdbc784ca5de1009e68a921ec88ce
+EBUILD kolabd-2.1.ebuild 12132 RMD160 4184c34c70074b6850c38260da1fce39fa9e22dc SHA1 892f881a8fb6484fd85940b0e66b9a3c39f61a8b SHA256 ebe6858e4fba0729f8dda96d11b4b4a2c27ae06421de652814d3399e8306eac8
+MD5 772c5fe96b64f9b0c2318ddc62e5357b kolabd-2.1.ebuild 12132
+RMD160 4184c34c70074b6850c38260da1fce39fa9e22dc kolabd-2.1.ebuild 12132
+SHA256 ebe6858e4fba0729f8dda96d11b4b4a2c27ae06421de652814d3399e8306eac8 kolabd-2.1.ebuild 12132
+MISC ChangeLog 620 RMD160 6ec95092d10bbe09af8c6ce350cb4de2ae05342c SHA1 9452469ead4ceea4663cab24ca6e6a544118262b SHA256 5aaa8063798e7bfc31c3aed0185c835231a799bc2b3e1cfe3667bc873bbba548
+MD5 217df18c9bbb56891946a2b16c12aa46 ChangeLog 620
+RMD160 6ec95092d10bbe09af8c6ce350cb4de2ae05342c ChangeLog 620
+SHA256 5aaa8063798e7bfc31c3aed0185c835231a799bc2b3e1cfe3667bc873bbba548 ChangeLog 620
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 755626d3a5b96bff67b22bc7c7cf13b7 files/digest-kolabd-2.1 283
+RMD160 b02331e68f959280cc2ab414f94bcf75380b2260 files/digest-kolabd-2.1 283
+SHA256 341b8ea38286025403a4171505d610999e73a52f2e95655212d5be918da8555b files/digest-kolabd-2.1 283
diff --git a/net-mail/kolabd/files/00_kolab.conf.2.1.template b/net-mail/kolabd/files/00_kolab.conf.2.1.template
new file mode 100644
index 0000000..96f600b
--- /dev/null
+++ b/net-mail/kolabd/files/00_kolab.conf.2.1.template
@@ -0,0 +1,106 @@
+KOLAB_META_START
+TARGET=/etc/apache2/modules.d/000_kolab.conf
+PERMISSIONS=0640
+OWNERSHIP=root:root
+KOLAB_META_END
+# (c) 2005 - 2007 Gunnar Wrobel <wrobel@pardus.de>
+# (c) 2003 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
+# (c) 2003 Martin Konold <martin.konold@erfrakon.de>
+# (c) 2003 Achim Frank <achim.frank@erfrakon.de>
+# This program is Free Software under the GNU General Public License (>=v2).
+# Read the file COPYING that comes with this packages for details.
+
+# this file is automatically written by the Kolab config backend
+# manual additions are lost unless made to the template in the Kolab config directory
+
+<IfDefine KOLAB>
+
+ Listen 80
+ Listen 443
+
+ <IfModule mod_rewrite.c>
+ RewriteLogLevel 3
+ RewriteLog /var/log/apache2/rewrite.log
+ </IfModule>
+
+ <IfModule authnz_ldap_module>
+
+ <AuthnProviderAlias ldap ldap-mail>
+ AuthLDAPURL ldap://@@@ldap_ip@@@:@@@ldap_port@@@/"@@@base_dn@@@"?mail
+ </AuthnProviderAlias>
+
+ <AuthnProviderAlias ldap ldap-uid>
+ AuthLDAPURL ldap://@@@ldap_ip@@@:@@@ldap_port@@@/"@@@base_dn@@@"?uid
+ </AuthnProviderAlias>
+
+ </IfModule>
+
+ <Directory "/var/www/kolab/htdocs/freebusy">
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+ # FreeBusy list handling
+ RewriteBase /freebusy
+ RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
+ RewriteRule ^([^/]+)\.ifb freebusy.php?uid=$1 [L]
+ RewriteRule ^([^/]+)\.vfb freebusy.php?uid=$1 [L]
+ RewriteRule ^([^/]+)\.xfb freebusy.php?uid=$1&extended=1 [L]
+ RewriteRule ^trigger/(.+)\.pfb pfb.php?folder=$1&cache=0 [L]
+ RewriteRule ^(.+)\.pfb pfb.php?folder=$1&cache=1 [L]
+ RewriteRule ^trigger/(.+)\.xpfb pfb.php?folder=$1&cache=0&extended=1 [L]
+ RewriteRule ^(.+)\.xpfb pfb.php?folder=$1&cache=1&extended=1 [L]
+ </IfModule>
+ AllowOverride None
+ Options FollowSymLinks
+ <IfModule mod_authz_host.c>
+ # Disallow for everyone as default
+ Order allow,deny
+ </IfModule>
+ <Limit GET PUT LOCK UNLOCK PROPFIND HEAD OPTIONS>
+ <IfModule mod_authz_host.c>
+ Allow from all
+ @@@if apache-allow-unauthenticated-fb@@@
+ @@@else@@@
+ <IfModule authnz_ldap_module>
+ AuthType Basic
+ AuthName "Kolab Freebusy"
+ AuthBasicProvider ldap-mail ldap-uid
+ Require valid-user
+ </IfModule>
+ @@@endif@@@
+ </IfModule>
+ </Limit>
+
+ <IfModule mod_dav.c>
+ DavMinTimeout 600
+ </IfModule>
+ AddDefaultCharset Off
+ </Directory>
+
+ <Directory "/var/www/kolab/htdocs/fbview">
+ AllowOverride All
+ <IfModule mod_authz_host.c>
+ Allow from all
+ </IfModule>
+ </Directory>
+
+ <Directory "/var/www/kolab/htdocs/admin">
+ AllowOverride None
+ Options None
+ <IfModule mod_authz_host.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ </Directory>
+
+ <IfDefine KOLAB-HORDE>
+ <Directory "/var/www/kolab/htdocs/horde">
+ AllowOverride None
+ Options None
+ <IfModule mod_authz_host.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ </Directory>
+ </IfDefine>
+
+</IfDefine>
diff --git a/net-mail/kolabd/files/11_kolab_domain.conf.2.1.template b/net-mail/kolabd/files/11_kolab_domain.conf.2.1.template
new file mode 100644
index 0000000..8f8028b
--- /dev/null
+++ b/net-mail/kolabd/files/11_kolab_domain.conf.2.1.template
@@ -0,0 +1,156 @@
+KOLAB_META_START
+TARGET=/etc/apache2/vhosts.d/11_kolab_domain.conf
+PERMISSIONS=0640
+OWNERSHIP=root:root
+KOLAB_META_END
+# this file is automatically written by the Kolab config backend
+# manual additions are lost unless made to the template in the Kolab config directory
+
+<IfDefine KOLAB>
+
+ # Use name-based virtual SSL hosting.
+ NameVirtualHost *:80
+
+ <Directory "/var/www/@@@fqdnhostname@@@/cgi-bin">
+ AllowOverride All
+ Options ExecCGI
+ <IfModule mod_authz_host.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ </Directory>
+
+ <Directory "/var/www/@@@fqdnhostname@@@/htdocs">
+ Options Indexes FollowSymLinks
+ AllowOverride None
+ <IfModule mod_authz_host.c>
+ Order allow,deny
+ Allow from all
+ </IfModule>
+ </Directory>
+
+ <IfDefine KOLAB-DAV>
+ <IfModule dav_module>
+ <Directory "/var/www/@@@fqdnhostname@@@/htdocs/private">
+ <IfModule mod_authz_host.c>
+ Allow from all
+ <IfModule authnz_ldap_module>
+ AuthType Basic
+ AuthName "Kolab Domain DAV"
+ AuthBasicProvider ldap-mail ldap-uid
+ Require ldap-group "cn=@@@fqdnhostname@@@,cn=domains,cn=internal"
+ </IfModule>
+ </IfModule>
+ </Directory>
+ </IfModule>
+ </IfDefine>
+
+ <VirtualHost *:80>
+ DocumentRoot "/var/www/@@@fqdnhostname@@@/htdocs"
+ ServerName @@@fqdnhostname@@@
+ ServerAlias www.@@@fqdnhostname@@@
+ ServerAdmin hostmaster@@@@fqdnhostname@@@
+ ErrorLog /var/log/apache2/@@@fqdnhostname@@@_error_log
+ CustomLog /var/log/apache2/@@@fqdnhostname@@@_access_log combined
+ <Location "/">
+ @@@if apache-http@@@
+ ErrorDocument 403 http://@@@fqdnhostname@@@/
+ @@@else@@@
+ ErrorDocument 403 https://@@@fqdnhostname@@@/
+ @@@endif@@@
+ </Location>
+ <Location "/fbview">
+ @@@if apache-http@@@
+ ErrorDocument 403 http://@@@fqdnhostname@@@/fbview/
+ @@@else@@@
+ ErrorDocument 403 https://@@@fqdnhostname@@@/fbview/
+ @@@endif@@@
+ </Location>
+ Include /etc/apache2/vhosts.d/kolab-domain-*.include
+ @@@if apache-http@@@
+ Include /etc/apache2/vhosts.d/kolab-ssl-domain-*.include
+ @@@else@@@
+ @@@endif@@@
+ Include /etc/apache2/vhosts.d/@@@fqdnhostname@@@-domain-*.include
+ </VirtualHost>
+
+ <IfModule ssl_module>
+ <IfDefine MULTIPLE_DOMAINS>
+ # Use name-based virtual SSL hosting.
+ NameVirtualHost *:443
+ </IfDefine>
+
+ @@@if apache-http@@@
+ @@@else@@@
+ <VirtualHost *:443>
+ DocumentRoot "/var/www/@@@fqdnhostname@@@/htdocs"
+ ServerName @@@fqdnhostname@@@:443
+ ServerAdmin hostmaster@@@@fqdnhostname@@@
+ ErrorLog /var/log/apache2/@@@fqdnhostname@@@_ssl_error_log
+ CustomLog /var/log/apache2/@@@fqdnhostname@@@_ssl_access_log combined
+
+ SSLEngine on
+ SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
+ SSLCertificateFile /etc/kolab/cert.pem
+ SSLCertificateKeyFile /etc/kolab/key.pem
+
+ <Files ~ "\.(cgi|shtml|phtml|php?)$">
+ SSLOptions +StdEnvVars
+ </Files>
+ <Directory "/var/www/@@@fqdnhostname@@@/cgi-bin">
+ SSLOptions +StdEnvVars
+ </Directory>
+ <IfModule mod_setenvif.c>
+ SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
+ downgrade-1.0 force-response-1.0
+ </IfModule>
+
+ <IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteOptions inherit
+ </IfModule>
+
+ Include /etc/apache2/vhosts.d/kolab-domain-*.include
+ Include /etc/apache2/vhosts.d/kolab-ssl-domain-*.include
+ Include /etc/apache2/vhosts.d/@@@fqdnhostname@@@-domain-*.include
+
+ #----------------------------------------------------------------------
+ # DAV SUPPORT
+ #
+ # Allows DAV access to the public /www and the private /dav directories
+ # If there should be no ssl host, this section needs to be added to the
+ # upper vhost on port 80
+ #----------------------------------------------------------------------
+
+ <IfDefine KOLAB-DAV>
+ <IfModule mod_dav.c>
+
+ Alias /dav /var/www/@@@fqdnhostname@@@/htdocs
+
+ DavMinTimeout 600
+
+ <Location /dav>
+
+ Dav On
+ Options None
+
+ <IfModule mod_authz_host.c>
+ Allow from all
+ <IfModule authnz_ldap_module>
+ AuthType Basic
+ AuthName "Kolab Domain DAV"
+ AuthBasicProvider ldap-mail ldap-uid
+ Require ldap-group "cn=@@@fqdnhostname@@@,cn=domains,cn=internal"
+ </IfModule>
+ </IfModule>
+
+ </Location>
+
+ </IfModule>
+ </IfDefine>
+
+ </VirtualHost>
+ @@@endif@@@
+ </IfModule>
+
+</IfDefine>
diff --git a/net-mail/kolabd/files/12_kolab_vhosts.conf.2.1.template b/net-mail/kolabd/files/12_kolab_vhosts.conf.2.1.template
new file mode 100644
index 0000000..eb21b2b
--- /dev/null
+++ b/net-mail/kolabd/files/12_kolab_vhosts.conf.2.1.template
@@ -0,0 +1,52 @@
+KOLAB_META_START
+TARGET=/etc/apache2/vhosts.d/12_kolab_vhosts.conf
+PERMISSIONS=0640
+OWNERSHIP=root:root
+KOLAB_META_END
+# this file is automatically written by the Kolab config backend
+# manual additions are lost unless made to the template in the Kolab config directory
+
+<IfDefine KOLAB>
+
+ <VirtualHost *:80>
+ DocumentRoot "/var/www/kolab/htdocs"
+ ServerName admin.@@@fqdnhostname@@@
+ ErrorLog /var/log/apache2/@@@fqdnhostname@@@_error_log
+ CustomLog /var/log/apache2/@@@fqdnhostname@@@_access_log combined
+ @@@if apache-http@@@
+ Redirect / http://@@@fqdnhostname@@@/admin
+ @@@else@@@
+ Redirect / https://@@@fqdnhostname@@@/admin
+ @@@endif@@@
+ </VirtualHost>
+
+ <VirtualHost *:80>
+ DocumentRoot "/var/www/kolab/htdocs"
+ ServerName server.@@@fqdnhostname@@@
+ ErrorLog /var/log/apache2/@@@fqdnhostname@@@_error_log
+ CustomLog /var/log/apache2/@@@fqdnhostname@@@_access_log combined
+ @@@if apache-http@@@
+ Redirect / http://@@@fqdnhostname@@@/server
+ @@@else@@@
+ Redirect / https://@@@fqdnhostname@@@/server
+ @@@endif@@@
+ </VirtualHost>
+
+ <IfDefine KOLAB-HORDE>
+ <VirtualHost *:80>
+ DocumentRoot "/var/www/kolab/htdocs"
+ ServerName mail.@@@fqdnhostname@@@
+ ErrorLog /var/log/apache2/@@@fqdnhostname@@@_error_log
+ CustomLog /var/log/apache2/@@@fqdnhostname@@@_access_log combined
+ @@@if apache-http@@@
+ Redirect / http://@@@fqdnhostname@@@/horde
+ @@@else@@@
+ Redirect / https://@@@fqdnhostname@@@/horde
+ @@@endif@@@
+ </VirtualHost>
+ </IfDefine>
+
+ Include /etc/apache2/vhosts.d/kolab-vhosts-*.include
+ Include /etc/apache2/vhosts.d/@@@fqdnhostname@@@-vhosts-*.include
+
+</IfDefine>
diff --git a/net-mail/kolabd/files/13_kolab_example.conf.2.1.template b/net-mail/kolabd/files/13_kolab_example.conf.2.1.template
new file mode 100644
index 0000000..901c331
--- /dev/null
+++ b/net-mail/kolabd/files/13_kolab_example.conf.2.1.template
@@ -0,0 +1,209 @@
+KOLAB_META_START
+TARGET=/etc/apache2/vhosts.d/13_kolab_example.conf
+PERMISSIONS=0640
+OWNERSHIP=root:root
+KOLAB_META_END
+# this file is automatically written by the Kolab config backend
+# manual additions are lost unless made to the template in the Kolab config directory
+
+# #----------------------------------------------------------------------
+# # WEBROOT FOR THE DOMAIN
+# #
+# # Install all non-kolab stuff here
+# #----------------------------------------------------------------------
+
+# <Directory "/var/www/@MYDOMAIN@/cgi-bin">
+# AllowOverride All
+# Options ExecCGI
+# <IfModule mod_authz_host.c>
+# Order allow,deny
+# Allow from all
+# </IfModule>
+# </Directory>
+
+# <Directory "/var/www/@MYDOMAIN@/htdocs">
+# Options Indexes FollowSymLinks
+# AllowOverride None
+# <IfModule mod_authz_host.c>
+# Order allow,deny
+# Allow from all
+# </IfModule>
+# </Directory>
+
+# <Directory "/var/www/@MYDOMAIN@/htdocs/private">
+# <IfModule mod_authz_host.c>
+# Allow from all
+# <IfModule authnz_ldap_module>
+# AuthType Basic
+# AuthName "Kolab Domain DAV"
+# AuthBasicProvider ldap-mail ldap-uid
+# Require ldap-group "cn=@MYDOMAIN@,cn=domains,cn=internal"
+# </IfModule>
+# </IfModule>
+# </Directory>
+
+# Include /etc/apache2/vhosts.d/@MYDOMAIN@-base-*.include
+
+# #----------------------------------------------------------------------
+# # DOMAIN VHOST AND SSL VHOST
+# #
+# #
+# #----------------------------------------------------------------------
+
+# <VirtualHost *:80>
+# DocumentRoot "/var/www/@MYDOMAIN@/htdocs"
+# ServerName @MYDOMAIN@
+# ServerAlias www.@MYDOMAIN@
+# ServerAdmin hostmaster@@MYDOMAIN@
+# ErrorLog /var/log/apache2/@MYDOMAIN@_error_log
+# CustomLog /var/log/apache2/@MYDOMAIN@_access_log combined
+# Include /etc/apache2/vhosts.d/kolab-domain-*.include
+# Include /etc/apache2/vhosts.d/@MYDOMAIN@-domain-*.include
+# </VirtualHost>
+
+# <IfDefine SSL>
+# <IfDefine MULTIPLE_DOMAINS>
+# <IfModule mod_ssl.c>
+# <VirtualHost *:443>
+# DocumentRoot "/var/www/@MYDOMAIN@/htdocs"
+# ServerName @MYDOMAIN@:443
+# ServerAdmin hostmaster@@MYDOMAIN@
+# ErrorLog /var/log/apache2/@MYDOMAIN@_ssl_error_log
+# CustomLog /var/log/apache2/@MYDOMAIN@_ssl_access_log combined
+
+# SSLEngine on
+# SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
+# SSLCertificateFile /etc/kolab/cert.pem
+# SSLCertificateKeyFile /etc/kolab/key.pem
+
+# <Files ~ "\.(cgi|shtml|phtml|php?)$">
+# SSLOptions +StdEnvVars
+# </Files>
+# <Directory "/var/www/@MYDOMAIN@/cgi-bin">
+# SSLOptions +StdEnvVars
+# </Directory>
+# <IfModule mod_setenvif.c>
+# SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
+# downgrade-1.0 force-response-1.0
+# </IfModule>
+
+# <IfModule mod_rewrite.c>
+# RewriteEngine On
+# RewriteOptions inherit
+# </IfModule>
+
+# Include /etc/apache2/vhosts.d/kolab-domain-*.include
+# Include /etc/apache2/vhosts.d/@MYDOMAIN@-domain-*.include
+# Include /etc/apache2/vhosts.d/@MYDOMAIN@-ssl-domain-*.include
+
+# #----------------------------------------------------------------------
+# # DAV SUPPORT
+# #
+# # Allows DAV access to the public /www and the private /dav directories
+# # If there should be no ssl host, this section needs to be added to the
+# # upper vhost on port 80
+# #----------------------------------------------------------------------
+
+# <IfModule mod_dav.c>
+
+# Alias /dav /var/www/@MYDOMAIN@/htdocs
+
+# DavMinTimeout 600
+# <Location /dav>
+# Dav On
+# Options None
+
+# <IfModule mod_authz_host.c>
+# Allow from all
+# <IfModule authnz_ldap_module>
+# AuthType Basic
+# AuthName "Kolab Domain DAV"
+# AuthBasicProvider ldap-mail ldap-uid
+# Require ldap-group "cn=@MYDOMAIN@,cn=domains,cn=internal"
+# </IfModule>
+# </IfModule>
+
+# </Location>
+# </IfModule>
+
+# </VirtualHost>
+# </IfModule>
+# </IfDefine>
+# </IfDefine>
+
+# #----------------------------------------------------------------------
+# # REDIRECTION VHOSTS
+# #
+# # Vhosts that can be used for conveniently redirection to subservices
+# #----------------------------------------------------------------------
+
+# ### Relocates to webadmin frontend
+
+# <VirtualHost *:80>
+# DocumentRoot "/var/www/kolab/htdocs"
+# ServerName admin.@MYDOMAIN@
+# ErrorLog /var/log/apache2/@MYDOMAIN@_error_log
+# CustomLog /var/log/apache2/@MYDOMAIN@_access_log combined
+# @@@if apache-http@@@
+# Redirect / http://@MYDOMAIN@/admin
+# @@@else@@@
+# Redirect / https://@MYDOMAIN@/admin
+# @@@endif@@@
+# </VirtualHost>
+
+# ### Relocates to server portal
+
+# <VirtualHost *:80>
+# DocumentRoot "/var/www/kolab/htdocs"
+# ServerName server.@MYDOMAIN@
+# ErrorLog /var/log/apache2/@MYDOMAIN@_error_log
+# CustomLog /var/log/apache2/@MYDOMAIN@_access_log combined
+# @@@if apache-http@@@
+# Redirect / http://@MYDOMAIN@/server
+# @@@else@@@
+# Redirect / https://@MYDOMAIN@/server
+# @@@endif@@@
+# </VirtualHost>
+
+# ### Relocates to ticket submission and ticket management
+# ### frontends
+
+# <VirtualHost *:80>
+# DocumentRoot "/var/www/kolab/htdocs"
+# ServerName support.@MYDOMAIN@
+# ErrorLog /var/log/apache2/@MYDOMAIN@_error_log
+# CustomLog /var/log/apache2/@MYDOMAIN@_access_log combined
+# @@@if apache-http@@@
+# Redirect / http://@MYDOMAIN@/otrs/customer.pl
+# @@@else@@@
+# Redirect / https://@MYDOMAIN@/otrs/customer.pl
+# @@@endif@@@
+# </VirtualHost>
+
+# <VirtualHost *:80>
+# DocumentRoot "/var/www/kolab/htdocs"
+# ServerName tickets.@MYDOMAIN@
+# ErrorLog /var/log/apache2/@MYDOMAIN@_error_log
+# CustomLog /var/log/apache2/@MYDOMAIN@_access_log combined
+# @@@if apache-http@@@
+# Redirect / http://@MYDOMAIN@/otrs/index.pl
+# @@@else@@@
+# Redirect / https://@MYDOMAIN@/otrs/index.pl
+# @@@endif@@@
+# </VirtualHost>
+
+# ### Relocates to the webmail frontend
+
+# <VirtualHost *:80>
+# DocumentRoot "/var/www/kolab/htdocs"
+# ServerName mail.@MYDOMAIN@
+# ErrorLog /var/log/apache2/@MYDOMAIN@_error_log
+# CustomLog /var/log/apache2/@MYDOMAIN@_access_log combined
+# @@@if apache-http@@@
+# Redirect / http://@MYDOMAIN@/horde
+# @@@else@@@
+# Redirect / https://@MYDOMAIN@/horde
+# @@@endif@@@
+# </VirtualHost>
+
+# Include /etc/apache2/vhosts.d/@MYDOMAIN@-vhosts-*.include
diff --git a/net-mail/kolabd/files/70_mod_php5.conf.2.1.template b/net-mail/kolabd/files/70_mod_php5.conf.2.1.template
new file mode 100644
index 0000000..c6e562f
--- /dev/null
+++ b/net-mail/kolabd/files/70_mod_php5.conf.2.1.template
@@ -0,0 +1,31 @@
+KOLAB_META_START
+TARGET=/etc/apache2/modules.d/70_mod_php5.conf
+PERMISSIONS=0640
+OWNERSHIP=root:root
+KOLAB_META_END
+<IfDefine PHP5>
+ # Load the module first
+ <IfModule !mod_php5.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
+
+
+# handler for PHP 5 scripts
+<IfDefine PHP5CGI>
+ ScriptAlias /php5-cgi /usr/lib/php5/bin/php-cgi
+ Action php5-cgi /php5-cgi
+ AddHandler php5-cgi .php5 .php
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/net-mail/kolabd/files/access.2.1.postfix b/net-mail/kolabd/files/access.2.1.postfix
new file mode 100644
index 0000000..4ac915e
--- /dev/null
+++ b/net-mail/kolabd/files/access.2.1.postfix
@@ -0,0 +1,29 @@
+##
+## @l_prefix@/etc/postfix/access -- access control for relaying
+##
+## Searched for both the client (hostname, parent domains, IP address,
+## networks obtained by stripping least significant octets from IP
+## address) and destination address (resolved destination address,
+## parent domain, or localpart@) in order to allow relaying. Rejects
+## the request if the result is REJECT or "[45]XX text". Permits the
+## request if the result is OK or RELAY or all-numerical.
+##
+
+# Syntax (see access(5)):
+# | user@domain action
+# | domain action
+# | user@ action
+# | net.work.addr.ess action
+# | net.work.addr action
+# | net.work action
+# | net action
+# where "action" is one of:
+# "[45]NN text", "REJECT", "OK", "restriction..."
+#
+# Examples:
+# | mail.example.com OK
+# | example.com REJECT
+# | 192.168.0.1 OK
+# | 192.168 REJECT
+# | postmaster@ OK
+
diff --git a/net-mail/kolabd/files/admin.service b/net-mail/kolabd/files/admin.service
new file mode 100644
index 0000000..cebd489
--- /dev/null
+++ b/net-mail/kolabd/files/admin.service
@@ -0,0 +1,2 @@
+/admin
+Server Administration
diff --git a/net-mail/kolabd/files/aliases.2.1.postfix b/net-mail/kolabd/files/aliases.2.1.postfix
new file mode 100644
index 0000000..2d2cdc2
--- /dev/null
+++ b/net-mail/kolabd/files/aliases.2.1.postfix
@@ -0,0 +1,37 @@
+#
+# Sample aliases file. Install in the location as specified by the
+# output from the command "postconf alias_maps". Typical path names
+# are /etc/aliases or /etc/mail/aliases.
+#
+# >>>>>>>>>> The program "newaliases" must be run after
+# >> NOTE >> this file is updated for any changes to
+# >>>>>>>>>> show through to Postfix.
+#
+
+# Person who should get root's mail. Don't receive mail as root!
+#root: you
+
+# Basic system aliases -- these MUST be present
+MAILER-DAEMON: postmaster
+postmaster: root
+
+# General redirections for pseudo accounts
+bin: root
+daemon: root
+named: root
+nobody: root
+uucp: root
+www: root
+ftp-bugs: root
+postfix: root
+
+# Put your local aliases here.
+
+# Well-known aliases
+manager: root
+dumper: root
+operator: root
+abuse: postmaster
+
+# trap decode to catch security attacks
+decode: root
diff --git a/net-mail/kolabd/files/canonical.2.1.postfix b/net-mail/kolabd/files/canonical.2.1.postfix
new file mode 100644
index 0000000..c89f3a3
--- /dev/null
+++ b/net-mail/kolabd/files/canonical.2.1.postfix
@@ -0,0 +1,17 @@
+##
+## @l_prefix@/etc/postfix/canonical -- address canonification
+##
+## Searched for canonical addresses for user@domain, user and @domain
+## (in this order).
+##
+
+# Syntax (see canonical(5)):
+# | user@domain address
+# | user address
+# | @domain address
+#
+# Examples:
+# | postmaster@mail.example.com postmaster@example.com
+# | john John.Doe
+# | @example.com example.com
+
diff --git a/net-mail/kolabd/files/cgi-php.ini.2.1.template b/net-mail/kolabd/files/cgi-php.ini.2.1.template
new file mode 100644
index 0000000..dc5f55b
--- /dev/null
+++ b/net-mail/kolabd/files/cgi-php.ini.2.1.template
@@ -0,0 +1,1210 @@
+KOLAB_META_START
+TARGET=/etc/php/cgi-php5/php.ini
+PERMISSIONS=0640
+OWNERSHIP=apache:apache
+KOLAB_META_END
+[PHP]
+
+;;;;;;;;;;;
+; WARNING ;
+;;;;;;;;;;;
+; This is the default settings file for new PHP installations.
+; By default, PHP installs itself with a configuration suitable for
+; development purposes, and *NOT* for production purposes.
+; For several security-oriented considerations that should be taken
+; before going online with your site, please consult php.ini-recommended
+; and http://php.net/manual/en/security.php.
+
+
+;;;;;;;;;;;;;;;;;;;
+; About php.ini ;
+;;;;;;;;;;;;;;;;;;;
+; This file controls many aspects of PHP's behavior. In order for PHP to
+; read it, it must be named 'php.ini'. PHP looks for it in the current
+; working directory, in the path designated by the environment variable
+; PHPRC, and in the path that was defined in compile time (in that order).
+; Under Windows, the compile-time path is the Windows directory. The
+; path in which the php.ini file is looked for can be overridden using
+; the -c argument in command line mode.
+;
+; The syntax of the file is extremely simple. Whitespace and Lines
+; beginning with a semicolon are silently ignored (as you probably guessed).
+; Section headers (e.g. [Foo]) are also silently ignored, even though
+; they might mean something in the future.
+;
+; Directives are specified using the following syntax:
+; directive = value
+; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
+;
+; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
+; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
+; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
+;
+; Expressions in the INI file are limited to bitwise operators and parentheses:
+; | bitwise OR
+; & bitwise AND
+; ~ bitwise NOT
+; ! boolean NOT
+;
+; Boolean flags can be turned on using the values 1, On, True or Yes.
+; They can be turned off using the values 0, Off, False or No.
+;
+; An empty string can be denoted by simply not writing anything after the equal
+; sign, or by using the None keyword:
+;
+; foo = ; sets foo to an empty string
+; foo = none ; sets foo to an empty string
+; foo = "none" ; sets foo to the string 'none'
+;
+; If you use constants in your value, and these constants belong to a
+; dynamically loaded extension (either a PHP extension or a Zend extension),
+; you may only use these constants *after* the line that loads the extension.
+;
+;
+;;;;;;;;;;;;;;;;;;;
+; About this file ;
+;;;;;;;;;;;;;;;;;;;
+; All the values in the php.ini-dist file correspond to the builtin
+; defaults (that is, if no php.ini is used, or if you delete these lines,
+; the builtin defaults will be identical).
+
+
+;;;;;;;;;;;;;;;;;;;;
+; Language Options ;
+;;;;;;;;;;;;;;;;;;;;
+
+; Enable the PHP scripting language engine under Apache.
+engine = On
+
+; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
+zend.ze1_compatibility_mode = Off
+
+; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
+; NOTE: Using short tags should be avoided when developing applications or
+; libraries that are meant for redistribution, or deployment on PHP
+; servers which are not under your control, because short tags may not
+; be supported on the target server. For portable, redistributable code,
+; be sure not to use short tags.
+short_open_tag = On
+
+; Allow ASP-style <% %> tags.
+asp_tags = Off
+
+; The number of significant digits displayed in floating point numbers.
+precision = 12
+
+; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
+y2k_compliance = On
+
+; Output buffering allows you to send header lines (including cookies) even
+; after you send body content, at the price of slowing PHP's output layer a
+; bit. You can enable output buffering during runtime by calling the output
+; buffering functions. You can also enable output buffering for all files by
+; setting this directive to On. If you wish to limit the size of the buffer
+; to a certain size - you can use a maximum number of bytes instead of 'On', as
+; a value for this directive (e.g., output_buffering=4096).
+output_buffering = Off
+
+; You can redirect all of the output of your scripts to a function. For
+; example, if you set output_handler to "mb_output_handler", character
+; encoding will be transparently converted to the specified encoding.
+; Setting any output handler automatically turns on output buffering.
+; Note: People who wrote portable scripts should not depend on this ini
+; directive. Instead, explicitly set the output handler using ob_start().
+; Using this ini directive may cause problems unless you know what script
+; is doing.
+; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
+; and you cannot use both "ob_gzhandler" and "zlib.output_compression".
+; Note: output_handler must be empty if this is set 'On' !!!!
+; Instead you must use zlib.output_handler.
+;output_handler =
+
+; Transparent output compression using the zlib library
+; Valid values for this option are 'off', 'on', or a specific buffer size
+; to be used for compression (default is 4KB)
+; Note: Resulting chunk size may vary due to nature of compression. PHP
+; outputs chunks that are few hundreds bytes each as a result of
+; compression. If you prefer a larger chunk size for better
+; performance, enable output_buffering in addition.
+; Note: You need to use zlib.output_handler instead of the standard
+; output_handler, or otherwise the output will be corrupted.
+zlib.output_compression = Off
+
+; You cannot specify additional output handlers if zlib.output_compression
+; is activated here. This setting does the same as output_handler but in
+; a different order.
+;zlib.output_handler =
+
+; Implicit flush tells PHP to tell the output layer to flush itself
+; automatically after every output block. This is equivalent to calling the
+; PHP function flush() after each and every call to print() or echo() and each
+; and every HTML block. Turning this option on has serious performance
+; implications and is generally recommended for debugging purposes only.
+implicit_flush = Off
+
+; The unserialize callback function will be called (with the undefined class'
+; name as parameter), if the unserializer finds an undefined class
+; which should be instantiated.
+; A warning appears if the specified function is not defined, or if the
+; function doesn't include/implement the missing class.
+; So only set this entry, if you really want to implement such a
+; callback-function.
+unserialize_callback_func=
+
+; When floats & doubles are serialized store serialize_precision significant
+; digits after the floating point. The default value ensures that when floats
+; are decoded with unserialize, the data will remain the same.
+serialize_precision = 100
+
+; Whether to enable the ability to force arguments to be passed by reference
+; at function call time. This method is deprecated and is likely to be
+; unsupported in future versions of PHP/Zend. The encouraged method of
+; specifying which arguments should be passed by reference is in the function
+; declaration. You're encouraged to try and turn this option Off and make
+; sure your scripts work properly with it in order to ensure they will work
+; with future versions of the language (you will receive a warning each time
+; you use this feature, and the argument will be passed by value instead of by
+; reference).
+allow_call_time_pass_reference = On
+
+;
+; Safe Mode
+;
+safe_mode = Off
+
+; By default, Safe Mode does a UID compare check when
+; opening files. If you want to relax this to a GID compare,
+; then turn on safe_mode_gid.
+safe_mode_gid = Off
+
+; When safe_mode is on, UID/GID checks are bypassed when
+; including files from this directory and its subdirectories.
+; (directory must also be in include_path or full path must
+; be used when including)
+safe_mode_include_dir =
+
+; When safe_mode is on, only executables located in the safe_mode_exec_dir
+; will be allowed to be executed via the exec family of functions.
+safe_mode_exec_dir =
+
+; Setting certain environment variables may be a potential security breach.
+; This directive contains a comma-delimited list of prefixes. In Safe Mode,
+; the user may only alter environment variables whose names begin with the
+; prefixes supplied here. By default, users will only be able to set
+; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
+;
+; Note: If this directive is empty, PHP will let the user modify ANY
+; environment variable!
+safe_mode_allowed_env_vars = PHP_
+
+; This directive contains a comma-delimited list of environment variables that
+; the end user won't be able to change using putenv(). These variables will be
+; protected even if safe_mode_allowed_env_vars is set to allow to change them.
+safe_mode_protected_env_vars = LD_LIBRARY_PATH
+
+; open_basedir, if set, limits all file operations to the defined directory
+; and below. This directive makes most sense if used in a per-directory
+; or per-virtualhost web server configuration file. This directive is
+; *NOT* affected by whether Safe Mode is turned On or Off.
+;open_basedir =
+
+; This directive allows you to disable certain functions for security reasons.
+; It receives a comma-delimited list of function names. This directive is
+; *NOT* affected by whether Safe Mode is turned On or Off.
+disable_functions =
+
+; This directive allows you to disable certain classes for security reasons.
+; It receives a comma-delimited list of class names. This directive is
+; *NOT* affected by whether Safe Mode is turned On or Off.
+disable_classes =
+
+; Colors for Syntax Highlighting mode. Anything that's acceptable in
+; <span style="color: ???????"> would work.
+;highlight.string = #DD0000
+;highlight.comment = #FF9900
+;highlight.keyword = #007700
+;highlight.bg = #FFFFFF
+;highlight.default = #0000BB
+;highlight.html = #000000
+
+; If enabled, the request will be allowed to complete even if the user aborts
+; the request. Consider enabling it if executing long request, which may end up
+; being interrupted by the user or a browser timing out.
+; ignore_user_abort = On
+
+; Determines the size of the realpath cache to be used by PHP. This value should
+; be increased on systems where PHP opens many files to reflect the quantity of
+; the file operations performed.
+; realpath_cache_size=16k
+
+; Duration of time, in seconds for which to cache realpath information for a given
+; file or directory. For systems with rarely changing files, consider increasing this
+; value.
+; realpath_cache_ttl=120
+
+;
+; Misc
+;
+; Decides whether PHP may expose the fact that it is installed on the server
+; (e.g. by adding its signature to the Web server header). It is no security
+; threat in any way, but it makes it possible to determine whether you use PHP
+; on your server or not.
+expose_php = On
+
+
+;;;;;;;;;;;;;;;;;;;
+; Resource Limits ;
+;;;;;;;;;;;;;;;;;;;
+
+max_execution_time = 30 ; Maximum execution time of each script, in seconds
+max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
+memory_limit = 128M ; Maximum amount of memory a script may consume (8MB)
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+; Error handling and logging ;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; error_reporting is a bit-field. Or each number up to get desired error
+; reporting level
+; E_ALL - All errors and warnings (doesn't include E_STRICT)
+; E_ERROR - fatal run-time errors
+; E_WARNING - run-time warnings (non-fatal errors)
+; E_PARSE - compile-time parse errors
+; E_NOTICE - run-time notices (these are warnings which often result
+; from a bug in your code, but it's possible that it was
+; intentional (e.g., using an uninitialized variable and
+; relying on the fact it's automatically initialized to an
+; empty string)
+; E_STRICT - run-time notices, enable to have PHP suggest changes
+; to your code which will ensure the best interoperability
+; and forward compatibility of your code
+; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
+; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
+; initial startup
+; E_COMPILE_ERROR - fatal compile-time errors
+; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
+; E_USER_ERROR - user-generated error message
+; E_USER_WARNING - user-generated warning message
+; E_USER_NOTICE - user-generated notice message
+;
+; Examples:
+;
+; - Show all errors, except for notices and coding standards warnings
+;
+;error_reporting = E_ALL & ~E_NOTICE
+;
+; - Show all errors, except for notices
+;
+;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
+;
+; - Show only errors
+;
+;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
+;
+; - Show all errors except for notices and coding standards warnings
+;
+error_reporting = E_ALL & ~E_NOTICE
+
+; Print out errors (as a part of the output). For production web sites,
+; you're strongly encouraged to turn this feature off, and use error logging
+; instead (see below). Keeping display_errors enabled on a production web site
+; may reveal security information to end users, such as file paths on your Web
+; server, your database schema or other information.
+display_errors = On
+
+; Even when display_errors is on, errors that occur during PHP's startup
+; sequence are not displayed. It's strongly recommended to keep
+; display_startup_errors off, except for when debugging.
+display_startup_errors = Off
+
+; Log errors into a log file (server-specific log, stderr, or error_log (below))
+; As stated above, you're strongly advised to use error logging in place of
+; error displaying on production web sites.
+log_errors = Off
+
+; Set maximum length of log_errors. In error_log information about the source is
+; added. The default is 1024 and 0 allows to not apply any maximum length at all.
+log_errors_max_len = 1024
+
+; Do not log repeated messages. Repeated errors must occur in same file on same
+; line until ignore_repeated_source is set true.
+ignore_repeated_errors = Off
+
+; Ignore source of message when ignoring repeated messages. When this setting
+; is On you will not log errors with repeated messages from different files or
+; sourcelines.
+ignore_repeated_source = Off
+
+; If this parameter is set to Off, then memory leaks will not be shown (on
+; stdout or in the log). This has only effect in a debug compile, and if
+; error reporting includes E_WARNING in the allowed list
+report_memleaks = On
+
+; Store the last error/warning message in $php_errormsg (boolean).
+track_errors = Off
+
+; Disable the inclusion of HTML tags in error messages.
+; Note: Never use this feature for production boxes.
+;html_errors = Off
+
+; If html_errors is set On PHP produces clickable error messages that direct
+; to a page describing the error or function causing the error in detail.
+; You can download a copy of the PHP manual from http://www.php.net/docs.php
+; and change docref_root to the base URL of your local copy including the
+; leading '/'. You must also specify the file extension being used including
+; the dot.
+; Note: Never use this feature for production boxes.
+;docref_root = "/phpmanual/"
+;docref_ext = .html
+
+; String to output before an error message.
+;error_prepend_string = "<font color=ff0000>"
+
+; String to output after an error message.
+;error_append_string = "</font>"
+
+; Log errors to specified file.
+;error_log = filename
+
+; Log errors to syslog (Event Log on NT, not valid in Windows 95).
+;error_log = syslog
+
+
+;;;;;;;;;;;;;;;;;
+; Data Handling ;
+;;;;;;;;;;;;;;;;;
+;
+; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
+
+; The separator used in PHP generated URLs to separate arguments.
+; Default is "&".
+;arg_separator.output = "&amp;"
+
+; List of separator(s) used by PHP to parse input URLs into variables.
+; Default is "&".
+; NOTE: Every character in this directive is considered as separator!
+;arg_separator.input = ";&"
+
+; This directive describes the order in which PHP registers GET, POST, Cookie,
+; Environment and Built-in variables (G, P, C, E & S respectively, often
+; referred to as EGPCS or GPC). Registration is done from left to right, newer
+; values override older values.
+variables_order = "EGPCS"
+
+; Whether or not to register the EGPCS variables as global variables. You may
+; want to turn this off if you don't want to clutter your scripts' global scope
+; with user data. This makes most sense when coupled with track_vars - in which
+; case you can access all of the GPC variables through the $HTTP_*_VARS[],
+; variables.
+;
+; You should do your best to write your scripts so that they do not require
+; register_globals to be on; Using form variables as globals can easily lead
+; to possible security problems, if the code is not very well thought of.
+register_globals = Off
+
+; Whether or not to register the old-style input arrays, HTTP_GET_VARS
+; and friends. If you're not using them, it's recommended to turn them off,
+; for performance reasons.
+register_long_arrays = On
+
+; This directive tells PHP whether to declare the argv&argc variables (that
+; would contain the GET information). If you don't use these variables, you
+; should turn it off for increased performance.
+register_argc_argv = On
+
+; When enabled, the SERVER and ENV variables are created when they're first
+; used (Just In Time) instead of when the script starts. If these variables
+; are not used within a script, having this directive on will result in a
+; performance gain. The PHP directives register_globals, register_long_arrays,
+; and register_argc_argv must be disabled for this directive to have any affect.
+auto_globals_jit = On
+
+; Maximum size of POST data that PHP will accept.
+post_max_size = 8M
+
+; Magic quotes
+;
+
+; Magic quotes for incoming GET/POST/Cookie data.
+magic_quotes_gpc = On
+
+; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
+magic_quotes_runtime = Off
+
+; Use Sybase-style magic quotes (escape ' with '' instead of \').
+magic_quotes_sybase = Off
+
+; Automatically add files before or after any PHP document.
+auto_prepend_file =
+auto_append_file =
+
+; As of 4.0b4, PHP always outputs a character encoding by default in
+; the Content-type: header. To disable sending of the charset, simply
+; set it to be empty.
+;
+; PHP's built-in default is text/html
+default_mimetype = "text/html"
+;default_charset = "iso-8859-1"
+
+; Always populate the $HTTP_RAW_POST_DATA variable.
+;always_populate_raw_post_data = On
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;
+; Paths and Directories ;
+;;;;;;;;;;;;;;;;;;;;;;;;;
+
+; UNIX: "/path1:/path2"
+include_path = ".:/usr/share/php5:/usr/share/php:/usr/share/php:/usr/share/php:/usr/share/php/horde"
+
+;
+; Windows: "\path1;\path2"
+;include_path = ".;c:\php\includes"
+
+; The root of the PHP pages, used only if nonempty.
+; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
+; if you are running php as a CGI under any web server (other than IIS)
+; see documentation for security issues. The alternate is to use the
+; cgi.force_redirect configuration below
+doc_root =
+
+; The directory under which PHP opens the script using /~username used only
+; if nonempty.
+user_dir =
+
+; Directory in which the loadable extensions (modules) reside.
+extension_dir = /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20050922
+
+; Whether or not to enable the dl() function. The dl() function does NOT work
+; properly in multithreaded servers, such as IIS or Zeus, and is automatically
+; disabled on them.
+enable_dl = On
+
+; cgi.force_redirect is necessary to provide security running PHP as a CGI under
+; most web servers. Left undefined, PHP turns this on by default. You can
+; turn it off here AT YOUR OWN RISK
+; **You CAN safely turn this off for IIS, in fact, you MUST.**
+; cgi.force_redirect = 1
+
+; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
+; every request.
+; cgi.nph = 1
+
+; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
+; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
+; will look for to know it is OK to continue execution. Setting this variable MAY
+; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
+; cgi.redirect_status_env = ;
+
+; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
+; security tokens of the calling client. This allows IIS to define the
+; security context that the request runs under. mod_fastcgi under Apache
+; does not currently support this feature (03/17/2002)
+; Set to 1 if running under IIS. Default is zero.
+; fastcgi.impersonate = 1;
+
+; Disable logging through FastCGI connection
+; fastcgi.log = 0
+
+; cgi.rfc2616_headers configuration option tells PHP what type of headers to
+; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
+; is supported by Apache. When this option is set to 1 PHP will send
+; RFC2616 compliant header.
+; Default is zero.
+;cgi.rfc2616_headers = 0
+
+
+;;;;;;;;;;;;;;;;
+; File Uploads ;
+;;;;;;;;;;;;;;;;
+
+; Whether to allow HTTP file uploads.
+file_uploads = On
+
+; Temporary directory for HTTP uploaded files (will use system default if not
+; specified).
+;upload_tmp_dir =
+
+; Maximum allowed size for uploaded files.
+upload_max_filesize = 2M
+
+
+;;;;;;;;;;;;;;;;;;
+; Fopen wrappers ;
+;;;;;;;;;;;;;;;;;;
+
+; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
+allow_url_fopen = Off
+
+; Define the anonymous ftp password (your email address)
+;from="john@doe.com"
+
+; Define the User-Agent string
+; user_agent="PHP"
+
+; Default timeout for socket based streams (seconds)
+default_socket_timeout = 60
+
+; If your scripts have to deal with files from Macintosh systems,
+; or you are running on a Mac and need to deal with files from
+; unix or win32 systems, setting this flag will cause PHP to
+; automatically detect the EOL character in those files so that
+; fgets() and file() will work regardless of the source of the file.
+; auto_detect_line_endings = Off
+
+
+;;;;;;;;;;;;;;;;;;;;;;
+; Dynamic Extensions ;
+;;;;;;;;;;;;;;;;;;;;;;
+;
+; If you wish to have an extension loaded automatically, use the following
+; syntax:
+;
+; extension=modulename.extension
+;
+; For example, on Windows:
+;
+; extension=msql.dll
+;
+; ... or under UNIX:
+;
+; extension=msql.so
+;
+; Note that it should be the name of the module only; no directory information
+; needs to go here. Specify the location of the extension with the
+; extension_dir directive above.
+
+
+; Windows Extensions
+; Note that ODBC support is built in, so no dll is needed for it.
+; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
+; extension folders as well as the separate PECL DLL download (PHP 5).
+; Be sure to appropriately set the extension_dir directive.
+
+;extension=php_mbstring.dll
+;extension=php_bz2.dll
+;extension=php_curl.dll
+;extension=php_dba.dll
+;extension=php_dbase.dll
+;extension=php_exif.dll
+;extension=php_fdf.dll
+;extension=php_filepro.dll
+;extension=php_gd2.dll
+;extension=php_gettext.dll
+;extension=php_ifx.dll
+;extension=php_imap.dll
+;extension=php_interbase.dll
+;extension=php_ldap.dll
+;extension=php_mcrypt.dll
+;extension=php_mhash.dll
+;extension=php_mime_magic.dll
+;extension=php_ming.dll
+;extension=php_mssql.dll
+;extension=php_msql.dll
+;extension=php_mysql.dll
+;extension=php_oci8.dll
+;extension=php_openssl.dll
+;extension=php_oracle.dll
+;extension=php_pgsql.dll
+;extension=php_shmop.dll
+;extension=php_snmp.dll
+;extension=php_sockets.dll
+;extension=php_sqlite.dll
+;extension=php_sybase_ct.dll
+;extension=php_tidy.dll
+;extension=php_xmlrpc.dll
+;extension=php_xsl.dll
+
+
+;;;;;;;;;;;;;;;;;;;
+; Module Settings ;
+;;;;;;;;;;;;;;;;;;;
+
+[Date]
+; Defines the default timezone used by the date functions
+;date.timezone =
+
+[Syslog]
+; Whether or not to define the various syslog variables (e.g. $LOG_PID,
+; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
+; runtime, you can define these variables by calling define_syslog_variables().
+define_syslog_variables = Off
+
+[mail function]
+; For Win32 only.
+SMTP = localhost
+smtp_port = 25
+
+; For Win32 only.
+;sendmail_from = me@example.com
+
+; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
+;sendmail_path =
+
+; Force the addition of the specified parameters to be passed as extra parameters
+; to the sendmail binary. These parameters will always replace the value of
+; the 5th parameter to mail(), even in safe mode.
+;mail.force_extra_parameters =
+
+[SQL]
+sql.safe_mode = Off
+
+[ODBC]
+;odbc.default_db = Not yet implemented
+;odbc.default_user = Not yet implemented
+;odbc.default_pw = Not yet implemented
+
+; Allow or prevent persistent links.
+odbc.allow_persistent = On
+
+; Check that a connection is still valid before reuse.
+odbc.check_persistent = On
+
+; Maximum number of persistent links. -1 means no limit.
+odbc.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent). -1 means no limit.
+odbc.max_links = -1
+
+; Handling of LONG fields. Returns number of bytes to variables. 0 means
+; passthru.
+odbc.defaultlrl = 4096
+
+; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
+; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
+; of uodbc.defaultlrl and uodbc.defaultbinmode
+odbc.defaultbinmode = 1
+
+[MySQL]
+; Allow or prevent persistent links.
+mysql.allow_persistent = On
+
+; Maximum number of persistent links. -1 means no limit.
+mysql.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent). -1 means no limit.
+mysql.max_links = -1
+
+; Default port number for mysql_connect(). If unset, mysql_connect() will use
+; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
+; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
+; at MYSQL_PORT.
+mysql.default_port =
+
+; Default socket name for local MySQL connects. If empty, uses the built-in
+; MySQL defaults.
+mysql.default_socket =
+
+; Default host for mysql_connect() (doesn't apply in safe mode).
+mysql.default_host =
+
+; Default user for mysql_connect() (doesn't apply in safe mode).
+mysql.default_user =
+
+; Default password for mysql_connect() (doesn't apply in safe mode).
+; Note that this is generally a *bad* idea to store passwords in this file.
+; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
+; and reveal this password! And of course, any users with read access to this
+; file will be able to reveal the password as well.
+mysql.default_password =
+
+; Maximum time (in secondes) for connect timeout. -1 means no limit
+mysql.connect_timeout = 60
+
+; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
+; SQL-Errors will be displayed.
+mysql.trace_mode = Off
+
+[MySQLi]
+
+; Maximum number of links. -1 means no limit.
+mysqli.max_links = -1
+
+; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
+; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
+; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
+; at MYSQL_PORT.
+mysqli.default_port = 3306
+
+; Default socket name for local MySQL connects. If empty, uses the built-in
+; MySQL defaults.
+mysqli.default_socket =
+
+; Default host for mysql_connect() (doesn't apply in safe mode).
+mysqli.default_host =
+
+; Default user for mysql_connect() (doesn't apply in safe mode).
+mysqli.default_user =
+
+; Default password for mysqli_connect() (doesn't apply in safe mode).
+; Note that this is generally a *bad* idea to store passwords in this file.
+; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
+; and reveal this password! And of course, any users with read access to this
+; file will be able to reveal the password as well.
+mysqli.default_pw =
+
+; Allow or prevent reconnect
+mysqli.reconnect = Off
+
+[mSQL]
+; Allow or prevent persistent links.
+msql.allow_persistent = On
+
+; Maximum number of persistent links. -1 means no limit.
+msql.max_persistent = -1
+
+; Maximum number of links (persistent+non persistent). -1 means no limit.
+msql.max_links = -1
+
+[PostgresSQL]
+; Allow or prevent persistent links.
+pgsql.allow_persistent = On
+
+; Detect broken persistent links always with pg_pconnect().
+; Auto reset feature requires a little overheads.
+pgsql.auto_reset_persistent = Off
+
+; Maximum number of persistent links. -1 means no limit.
+pgsql.max_persistent = -1
+
+; Maximum number of links (persistent+non persistent). -1 means no limit.
+pgsql.max_links = -1
+
+; Ignore PostgreSQL backends Notice message or not.
+; Notice message logging require a little overheads.
+pgsql.ignore_notice = 0
+
+; Log PostgreSQL backends Noitce message or not.
+; Unless pgsql.ignore_notice=0, module cannot log notice message.
+pgsql.log_notice = 0
+
+[Sybase]
+; Allow or prevent persistent links.
+sybase.allow_persistent = On
+
+; Maximum number of persistent links. -1 means no limit.
+sybase.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent). -1 means no limit.
+sybase.max_links = -1
+
+;sybase.interface_file = "/usr/sybase/interfaces"
+
+; Minimum error severity to display.
+sybase.min_error_severity = 10
+
+; Minimum message severity to display.
+sybase.min_message_severity = 10
+
+; Compatability mode with old versions of PHP 3.0.
+; If on, this will cause PHP to automatically assign types to results according
+; to their Sybase type, instead of treating them all as strings. This
+; compatibility mode will probably not stay around forever, so try applying
+; whatever necessary changes to your code, and turn it off.
+sybase.compatability_mode = Off
+
+[Sybase-CT]
+; Allow or prevent persistent links.
+sybct.allow_persistent = On
+
+; Maximum number of persistent links. -1 means no limit.
+sybct.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent). -1 means no limit.
+sybct.max_links = -1
+
+; Minimum server message severity to display.
+sybct.min_server_severity = 10
+
+; Minimum client message severity to display.
+sybct.min_client_severity = 10
+
+[bcmath]
+; Number of decimal digits for all bcmath functions.
+bcmath.scale = 0
+
+[browscap]
+;browscap = extra/browscap.ini
+
+[Informix]
+; Default host for ifx_connect() (doesn't apply in safe mode).
+ifx.default_host =
+
+; Default user for ifx_connect() (doesn't apply in safe mode).
+ifx.default_user =
+
+; Default password for ifx_connect() (doesn't apply in safe mode).
+ifx.default_password =
+
+; Allow or prevent persistent links.
+ifx.allow_persistent = On
+
+; Maximum number of persistent links. -1 means no limit.
+ifx.max_persistent = -1
+
+; Maximum number of links (persistent + non-persistent). -1 means no limit.
+ifx.max_links = -1
+
+; If on, select statements return the contents of a text blob instead of its id.
+ifx.textasvarchar = 0
+
+; If on, select statements return the contents of a byte blob instead of its id.
+ifx.byteasvarchar = 0
+
+; Trailing blanks are stripped from fixed-length char columns. May help the
+; life of Informix SE users.
+ifx.charasvarchar = 0
+
+; If on, the contents of text and byte blobs are dumped to a file instead of
+; keeping them in memory.
+ifx.blobinfile = 0
+
+; NULL's are returned as empty strings, unless this is set to 1. In that case,
+; NULL's are returned as string 'NULL'.
+ifx.nullformat = 0
+
+[Session]
+; Handler used to store/retrieve data.
+session.save_handler = files
+
+; Argument passed to save_handler. In the case of files, this is the path
+; where data files are stored. Note: Windows users have to change this
+; variable in order to use PHP's session functions.
+;
+; As of PHP 4.0.1, you can define the path as:
+;
+; session.save_path = "N;/path"
+;
+; where N is an integer. Instead of storing all the session files in
+; /path, what this will do is use subdirectories N-levels deep, and
+; store the session data in those directories. This is useful if you
+; or your OS have problems with lots of files in one directory, and is
+; a more efficient layout for servers that handle lots of sessions.
+;
+; NOTE 1: PHP will not create this directory structure automatically.
+; You can use the script in the ext/session dir for that purpose.
+; NOTE 2: See the section on garbage collection below if you choose to
+; use subdirectories for session storage
+;
+; The file storage module creates files using mode 600 by default.
+; You can change that by using
+;
+; session.save_path = "N;MODE;/path"
+;
+; where MODE is the octal representation of the mode. Note that this
+; does not overwrite the process's umask.
+;session.save_path = "/tmp"
+session.save_path = /var/cache/httpd_sessions
+
+; Whether to use cookies.
+session.use_cookies = 1
+
+; This option enables administrators to make their users invulnerable to
+; attacks which involve passing session ids in URLs; defaults to 0.
+; session.use_only_cookies = 1
+
+; Name of the session (used as cookie name).
+session.name = PHPSESSID
+
+; Initialize session on request startup.
+session.auto_start = 0
+
+; Lifetime in seconds of cookie or, if 0, until browser is restarted.
+session.cookie_lifetime = 0
+
+; The path for which the cookie is valid.
+session.cookie_path = /
+
+; The domain for which the cookie is valid.
+session.cookie_domain =
+
+; Handler used to serialize data. php is the standard serializer of PHP.
+session.serialize_handler = php
+
+; Define the probability that the 'garbage collection' process is started
+; on every session initialization.
+; The probability is calculated by using gc_probability/gc_divisor,
+; e.g. 1/100 means there is a 1% chance that the GC process starts
+; on each request.
+
+session.gc_probability = 1
+session.gc_divisor = 100
+
+; After this number of seconds, stored data will be seen as 'garbage' and
+; cleaned up by the garbage collection process.
+session.gc_maxlifetime = 1440
+
+; NOTE: If you are using the subdirectory option for storing session files
+; (see session.save_path above), then garbage collection does *not*
+; happen automatically. You will need to do your own garbage
+; collection through a shell script, cron entry, or some other method.
+; For example, the following script would is the equivalent of
+; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
+; cd /path/to/sessions; find -cmin +24 | xargs rm
+
+; PHP 4.2 and less have an undocumented feature/bug that allows you to
+; to initialize a session variable in the global scope, albeit register_globals
+; is disabled. PHP 4.3 and later will warn you, if this feature is used.
+; You can disable the feature and the warning separately. At this time,
+; the warning is only displayed, if bug_compat_42 is enabled.
+
+session.bug_compat_42 = 1
+session.bug_compat_warn = 1
+
+; Check HTTP Referer to invalidate externally stored URLs containing ids.
+; HTTP_REFERER has to contain this substring for the session to be
+; considered as valid.
+session.referer_check =
+
+; How many bytes to read from the file.
+session.entropy_length = 0
+
+; Specified here to create the session id.
+session.entropy_file =
+
+;session.entropy_length = 16
+
+;session.entropy_file = /dev/urandom
+
+; Set to {nocache,private,public,} to determine HTTP caching aspects
+; or leave this empty to avoid sending anti-caching headers.
+session.cache_limiter = nocache
+
+; Document expires after n minutes.
+session.cache_expire = 180
+
+; trans sid support is disabled by default.
+; Use of trans sid may risk your users security.
+; Use this option with caution.
+; - User may send URL contains active session ID
+; to other person via. email/irc/etc.
+; - URL that contains active session ID may be stored
+; in publically accessible computer.
+; - User may access your site with the same session ID
+; always using URL stored in browser's history or bookmarks.
+session.use_trans_sid = 0
+
+; Select a hash function
+; 0: MD5 (128 bits)
+; 1: SHA-1 (160 bits)
+session.hash_function = 0
+
+; Define how many bits are stored in each character when converting
+; the binary hash data to something readable.
+;
+; 4 bits: 0-9, a-f
+; 5 bits: 0-9, a-v
+; 6 bits: 0-9, a-z, A-Z, "-", ","
+session.hash_bits_per_character = 4
+
+; The URL rewriter will look for URLs in a defined set of HTML tags.
+; form/fieldset are special; if you include them here, the rewriter will
+; add a hidden <input> field with the info which is otherwise appended
+; to URLs. If you want XHTML conformity, remove the form entry.
+; Note that all valid entries require a "=", even if no value follows.
+url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
+
+[MSSQL]
+; Allow or prevent persistent links.
+mssql.allow_persistent = On
+
+; Maximum number of persistent links. -1 means no limit.
+mssql.max_persistent = -1
+
+; Maximum number of links (persistent+non persistent). -1 means no limit.
+mssql.max_links = -1
+
+; Minimum error severity to display.
+mssql.min_error_severity = 10
+
+; Minimum message severity to display.
+mssql.min_message_severity = 10
+
+; Compatability mode with old versions of PHP 3.0.
+mssql.compatability_mode = Off
+
+; Connect timeout
+;mssql.connect_timeout = 5
+
+; Query timeout
+;mssql.timeout = 60
+
+; Valid range 0 - 2147483647. Default = 4096.
+;mssql.textlimit = 4096
+
+; Valid range 0 - 2147483647. Default = 4096.
+;mssql.textsize = 4096
+
+; Limits the number of records in each batch. 0 = all records in one batch.
+;mssql.batchsize = 0
+
+; Specify how datetime and datetim4 columns are returned
+; On => Returns data converted to SQL server settings
+; Off => Returns values as YYYY-MM-DD hh:mm:ss
+;mssql.datetimeconvert = On
+
+; Use NT authentication when connecting to the server
+mssql.secure_connection = Off
+
+; Specify max number of processes. -1 = library default
+; msdlib defaults to 25
+; FreeTDS defaults to 4096
+;mssql.max_procs = -1
+
+; Specify client character set.
+; If empty or not set the client charset from freetds.comf is used
+; This is only used when compiled with FreeTDS
+;mssql.charset = "ISO-8859-1"
+
+[Assertion]
+; Assert(expr); active by default.
+;assert.active = On
+
+; Issue a PHP warning for each failed assertion.
+;assert.warning = On
+
+; Don't bail out by default.
+;assert.bail = Off
+
+; User-function to be called if an assertion fails.
+;assert.callback = 0
+
+; Eval the expression with current error_reporting(). Set to true if you want
+; error_reporting(0) around the eval().
+;assert.quiet_eval = 0
+
+[Verisign Payflow Pro]
+; Default Payflow Pro server.
+pfpro.defaulthost = "test-payflow.verisign.com"
+
+; Default port to connect to.
+pfpro.defaultport = 443
+
+; Default timeout in seconds.
+pfpro.defaulttimeout = 30
+
+; Default proxy IP address (if required).
+;pfpro.proxyaddress =
+
+; Default proxy port.
+;pfpro.proxyport =
+
+; Default proxy logon.
+;pfpro.proxylogon =
+
+; Default proxy password.
+;pfpro.proxypassword =
+
+[COM]
+; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
+;com.typelib_file =
+; allow Distributed-COM calls
+;com.allow_dcom = true
+; autoregister constants of a components typlib on com_load()
+;com.autoregister_typelib = true
+; register constants casesensitive
+;com.autoregister_casesensitive = false
+; show warnings on duplicate constat registrations
+;com.autoregister_verbose = true
+
+[mbstring]
+; language for internal character representation.
+;mbstring.language = Japanese
+
+; internal/script encoding.
+; Some encoding cannot work as internal encoding.
+; (e.g. SJIS, BIG5, ISO-2022-*)
+;mbstring.internal_encoding = EUC-JP
+
+; http input encoding.
+;mbstring.http_input = auto
+
+; http output encoding. mb_output_handler must be
+; registered as output buffer to function
+;mbstring.http_output = SJIS
+
+; enable automatic encoding translation according to
+; mbstring.internal_encoding setting. Input chars are
+; converted to internal encoding by setting this to On.
+; Note: Do _not_ use automatic encoding translation for
+; portable libs/applications.
+;mbstring.encoding_translation = Off
+
+; automatic encoding detection order.
+; auto means
+;mbstring.detect_order = auto
+
+; substitute_character used when character cannot be converted
+; one from another
+;mbstring.substitute_character = none;
+
+; overload(replace) single byte functions by mbstring functions.
+; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
+; etc. Possible values are 0,1,2,4 or combination of them.
+; For example, 7 for overload everything.
+; 0: No overload
+; 1: Overload mail() function
+; 2: Overload str*() functions
+; 4: Overload ereg*() functions
+;mbstring.func_overload = 0
+
+; enable strict encoding detection.
+;mbstring.strict_encoding = Off
+
+[FrontBase]
+;fbsql.allow_persistent = On
+;fbsql.autocommit = On
+;fbsql.show_timestamp_decimals = Off
+;fbsql.default_database =
+;fbsql.default_database_password =
+;fbsql.default_host =
+;fbsql.default_password =
+;fbsql.default_user = "_SYSTEM"
+;fbsql.generate_warnings = Off
+;fbsql.max_connections = 128
+;fbsql.max_links = 128
+;fbsql.max_persistent = -1
+;fbsql.max_results = 128
+;fbsql.batchSize = 1000
+
+[gd]
+; Tell the jpeg decode to libjpeg warnings and try to create
+; a gd image. The warning will then be displayed as notices
+; disabled by default
+;gd.jpeg_ignore_warning = 0
+
+[exif]
+; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
+; With mbstring support this will automatically be converted into the encoding
+; given by corresponding encode setting. When empty mbstring.internal_encoding
+; is used. For the decode settings you can distinguish between motorola and
+; intel byte order. A decode setting cannot be empty.
+;exif.encode_unicode = ISO-8859-15
+;exif.decode_unicode_motorola = UCS-2BE
+;exif.decode_unicode_intel = UCS-2LE
+;exif.encode_jis =
+;exif.decode_jis_motorola = JIS
+;exif.decode_jis_intel = JIS
+
+[Tidy]
+; The path to a default tidy configuration file to use when using tidy
+;tidy.default_config = /usr/local/lib/php/default.tcfg
+
+; Should tidy clean and repair output automatically?
+; WARNING: Do not use this option if you are generating non-html content
+; such as dynamic images
+tidy.clean_output = Off
+
+[soap]
+; Enables or disables WSDL caching feature.
+soap.wsdl_cache_enabled=1
+; Sets the directory name where SOAP extension will put cache files.
+soap.wsdl_cache_dir="/tmp"
+; (time to live) Sets the number of second while cached file will be used
+; instead of original one.
+soap.wsdl_cache_ttl=86400
+
+; Local Variables:
+; tab-width: 4
+; End:
diff --git a/net-mail/kolabd/files/conf.d-apache2.2.1.template b/net-mail/kolabd/files/conf.d-apache2.2.1.template
new file mode 100644
index 0000000..bbac584
--- /dev/null
+++ b/net-mail/kolabd/files/conf.d-apache2.2.1.template
@@ -0,0 +1,80 @@
+KOLAB_META_START
+TARGET=/etc/conf.d/apache2
+PERMISSIONS=0644
+OWNERSHIP=root:root
+KOLAB_META_END
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header$
+
+# Config file for /etc/init.d/apache2
+
+# When you install a module it is easy to activate or deactivate the modules
+# and other features of apache using the APACHE2_OPTS line. Every module should
+# install a configuration in /etc/apache2/modules.d. In that file will be an
+# <IfDefine NNN> where NNN is the option to enable that module.
+# Here are the options available in the default configuration:
+# USERDIR Enables /~username mapping to /home/username/public_html
+# INFO Enables mod_info, a useful module for debugging
+# PROXY Enables mod_proxy
+# DAV Enables mod_dav
+# DAV_FS Enables mod_dav_fs (you should enable this when you enable DAV
+# unless you know what you are doing)
+# SSL Enables SSL
+# SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable this
+# when you enable SSL unless you know what you are doing)
+# LDAP Enables mod_ldap
+# AUTH_LDAP Enables authentication through mod_ldap
+# DEFAULT_VHOST Enables the default virtual host in /var/www/localhost/htdocs
+#
+# Kolab specific notes:
+#
+# - KOLAB: This flag needs to be specified.
+# - KOLAB-HORDE: Activate this if you want to use the Horde webclient too.
+# - DEFAULT_VHOST: You may use this flag if you need a default unnamed host
+# - SSL_DEFAULT_VHOST: Usually not. If you want an SSL enabled kolab you should
+# use the vhosts.d directory for that
+# - MULTIPLE_DOMAINS: Currently only useful if you activate SSL and define
+# several SSL domains. You should know how to handle
+# certificates in that case:
+# http://gunnarwrobel.de/blog/english/technical/configuring_apache_for_multiple_ssl_domains_using_cacert.org.html
+# - PHP5/PHP5CGI: PHP5/PHP5CGI is needed for the kolab web frontend. The default
+# setting is PHP5CGI to have a slim (in terms of memory) apache server.
+# You may certainly preload the php processor using php5 which makes
+# script processing faster.
+# - LDAP: Activates mod_ldap. Not quite certain if this is needed for AUTH_LDAP
+# - AUTH_LDAP: Activate for authenticated free/busy access and also for DAV access
+# - KOLAB-DAV: Add this flag if you want to add DAV access to the Kolab server.
+# You'll also need DAF and DAV_FS in that case.
+# - DAV/DAV_FS: If you want to enable DAV on the fileserver. You also need
+# to activate AUTH_LDAP then.
+# - PERL: You may activate this in case you install OTRS. Without this flag otrs
+# will run as a cgi script and be more memory efficient. Adding the PERL
+# flag will preload the perl parser and make otrs faster
+#
+APACHE2_OPTS="-D SSL -D PHP5 -D LDAP -D AUTH_LDAP -D KOLAB -D KOLAB-HORDE -D KOLAB-DAV -D DAV -D DAV_FS"
+
+# Extended options for advanced uses of Apache ONLY
+# You don't need to edit these unless you are doing crazy Apache stuff
+# As not having them set correctly, or feeding in an incorrect configuration
+# via them will result in Apache failing to start
+# YOU HAVE BEEN WARNED.
+
+# ServerRoot setting
+#SERVERROOT=/usr/lib/apache2
+
+# Configuration file location
+# - If this does NOT start with a '/', then it is treated relative to
+# $SERVERROOT by Apache
+#CONFIGFILE=/etc/apache2/httpd.conf
+
+# Location to log startup errors to
+# They are normally dumped to your terminal.
+#STARTUPERRORLOG="/var/log/apache2/startuperror.log"
+
+# Environment variables to keep
+# All environment variables are cleared from apache
+# Use this to preserve some of them
+# NOTE!!! It's very important that this contains PATH
+# Also, it will fail if the _value_ of any of these variables contains a space
+KEEPENV="PATH"
diff --git a/net-mail/kolabd/files/conf.d-sasl.2.1.template b/net-mail/kolabd/files/conf.d-sasl.2.1.template
new file mode 100644
index 0000000..248e4d7
--- /dev/null
+++ b/net-mail/kolabd/files/conf.d-sasl.2.1.template
@@ -0,0 +1,18 @@
+KOLAB_META_START
+TARGET=/etc/conf.d/saslauthd
+PERMISSIONS=0644
+OWNERSHIP=root:root
+KOLAB_META_END
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd-2.1.20.conf,v 1.1 2004/10/31 06:13:48 langthang Exp $
+
+# Config file for /etc/init.d/saslauthd
+
+# Initial (empty) options.
+SASLAUTHD_OPTS=""
+
+# Specify the authentications mechanism.
+# *NOTE* For list see: saslauthd -v
+# From 2.1.19, add "-r" to options for old behavior
+# ie. reassemble user and realm to user@realm form.
+# SASLAUTHD_OPTS="${SASLAUTH_MECH} -a pam -r"
+SASLAUTHD_OPTS=" -a ldap -O /etc/sasl2/saslauthd.conf"
diff --git a/net-mail/kolabd/files/conf.d-slapd.2.1.template b/net-mail/kolabd/files/conf.d-slapd.2.1.template
new file mode 100644
index 0000000..1a07250
--- /dev/null
+++ b/net-mail/kolabd/files/conf.d-slapd.2.1.template
@@ -0,0 +1,15 @@
+KOLAB_META_START
+TARGET=/etc/conf.d/slapd
+PERMISSIONS=0644
+OWNERSHIP=root:root
+KOLAB_META_END
+# conf.d file for openldap
+#
+# To enable both the standard unciphered server and the ssl encrypted
+# one uncomment this line or set any other server starting options
+# you may desire.
+#
+# OPTS="-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
+# Uncomment the below to use the new slapd configuration for openldap 2.3
+#OPTS="-F /etc/openldap/slapd.d -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
+OPTS="-h 'ldaps:// ldap://'"
diff --git a/net-mail/kolabd/files/digest-kolabd-2.1 b/net-mail/kolabd/files/digest-kolabd-2.1
new file mode 100644
index 0000000..ab3470c
--- /dev/null
+++ b/net-mail/kolabd/files/digest-kolabd-2.1
@@ -0,0 +1,3 @@
+MD5 b330d00121339a27b3465888dafbfa3e kolabd-2.1-gentoo-20070510.tar.bz2 156622
+RMD160 589b75593436a5057c17b286e68dd9a1453df572 kolabd-2.1-gentoo-20070510.tar.bz2 156622
+SHA256 f320b597a379539ae734d6833bd957bd306cdbc784ca5de1009e68a921ec88ce kolabd-2.1-gentoo-20070510.tar.bz2 156622
diff --git a/net-mail/kolabd/files/favicon.ico b/net-mail/kolabd/files/favicon.ico
new file mode 100644
index 0000000..62d1dff
--- /dev/null
+++ b/net-mail/kolabd/files/favicon.ico
Binary files differ
diff --git a/net-mail/kolabd/files/horde.schema b/net-mail/kolabd/files/horde.schema
new file mode 100644
index 0000000..cec9b41
--- /dev/null
+++ b/net-mail/kolabd/files/horde.schema
@@ -0,0 +1,567 @@
+# $Horde: horde/scripts/ldap/horde.schema,v 1.20.10.5 2005/10/18 11:34:00 jan Exp $
+#
+# The offical horde OID assigned by IANA is 13040.
+#
+# This schema depends on:
+# - core.schema
+#
+#
+# Horde attribute branch 1.3.6.1.4.1.13040.2.1.*
+# IMP attribute branch 1.3.6.1.4.1.13040.3.1.*
+# Turba attribute branch 1.3.6.1.4.1.13040.4.1.*
+# Kronolith attribute branch 1.3.6.1.4.1.13040.5.1.*
+# Nag attribute branch 1.3.6.1.4.1.13040.6.1.*
+# Gollem attribute branch 1.3.6.1.4.1.13040.7.1.*
+# Chora attribute branch 1.3.6.1.4.1.13040.8.1.*
+# Mnemo attribute branch 1.3.6.1.4.1.13040.9.1.*
+# Troll attribute branch 1.3.6.1.4.1.13040.10.1.*
+# Klutz attribute branch 1.3.6.1.4.1.13040.11.1.*
+# Jonah attribute branch 1.3.6.1.4.1.13040.12.1.*
+# Hermes attribute branch 1.3.6.1.4.1.13040.13.1.*
+# Juno attribute branch 1.3.6.1.4.1.13040.14.1.*
+# Trean attribute branch 1.3.6.1.4.1.13040.15.1.*
+# Whups attribute branch 1.3.6.1.4.1.13040.16.1.*
+# Ingo attribute branch 1.3.6.1.4.1.13040.17.1.*
+# Ansel attribute branch 1.3.6.1.4.1.13040.18.1.*
+# Genie attribute branch 1.3.6.1.4.1.13040.19.1.*
+# Scry attribute branch 1.3.6.1.4.1.13040.20.1.*
+# Wicked attribute branch 1.3.6.1.4.1.13040.21.1.*
+# Agora attribute branch 1.3.6.1.4.1.13040.22.1.*
+# Goops attribute branch 1.3.6.1.4.1.13040.24.1.*
+# Merk attribute branch 1.3.6.1.4.1.13040.25.1.*
+# Mimp attribute branch 1.3.6.1.4.1.13040.26.1.*
+# Mottle attribute branch 1.3.6.1.4.1.13040.27.1.*
+# Nic attribute branch 1.3.6.1.4.1.13040.28.1.*
+# Occam attribute branch 1.3.6.1.4.1.13040.29.1.*
+# Odin attribute branch 1.3.6.1.4.1.13040.30.1.*
+# Rakim attribute branch 1.3.6.1.4.1.13040.31.1.*
+# Sesha attribute branch 1.3.6.1.4.1.13040.32.1.*
+# Swoosh attribute branch 1.3.6.1.4.1.13040.33.1.*
+# Thor attribute branch 1.3.6.1.4.1.13040.34.1.*
+# Ulaform attribute branch 1.3.6.1.4.1.13040.35.1.*
+# Volos attribute branch 1.3.6.1.4.1.13040.36.1.*
+#
+# Horde objectclass branch 1.3.6.1.4.1.13040.2.2.*
+# IMP objectclass branch 1.3.6.1.4.1.13040.3.2.*
+# Turba objectclass branch 1.3.6.1.4.1.13040.4.2.*
+# Kronolith objectclass branch 1.3.6.1.4.1.13040.5.2.*
+# NAG objectclass branch 1.3.6.1.4.1.13040.6.2.*
+# Gollem objectclass branch 1.3.6.1.4.1.13040.7.2.*
+# Chora objectclass branch 1.3.6.1.4.1.13040.8.2.*
+# Mnemo objectclass branch 1.3.6.1.4.1.13040.9.2.*
+# Troll objectclass branch 1.3.6.1.4.1.13040.10.2.*
+# Klutz objectclass branch 1.3.6.1.4.1.13040.11.2.*
+# Jonah objectclass branch 1.3.6.1.4.1.13040.12.2.*
+# Hermes objectclass branch 1.3.6.1.4.1.13040.13.2.*
+# Juno objectclass branch 1.3.6.1.4.1.13040.14.2.*
+# Trean objectclass branch 1.3.6.1.4.1.13040.15.2.*
+# Whups objectclass branch 1.3.6.1.4.1.13040.16.2.*
+# Ingo objectclass branch 1.3.6.1.4.1.13040.17.2.*
+# Ansel objectclass branch 1.3.6.1.4.1.13040.18.2.*
+# Genie objectclass branch 1.3.6.1.4.1.13040.19.2.*
+# Scry objectclass branch 1.3.6.1.4.1.13040.20.2.*
+# Wicked objectclass branch 1.3.6.1.4.1.13040.21.2.*
+# Agora objectclass branch 1.3.6.1.4.1.13040.22.2.*
+# Goops objectclass branch 1.3.6.1.4.1.13040.24.2.*
+# Merk objectclass branch 1.3.6.1.4.1.13040.25.2.*
+# Mimp objectclass branch 1.3.6.1.4.1.13040.26.2.*
+# Mottle objectclass branch 1.3.6.1.4.1.13040.27.2.*
+# Nic objectclass branch 1.3.6.1.4.1.13040.28.2.*
+# Occam objectclass branch 1.3.6.1.4.1.13040.29.2.*
+# Odin objectclass branch 1.3.6.1.4.1.13040.30.2.*
+# Rakim objectclass branch 1.3.6.1.4.1.13040.31.2.*
+# Sesha objectclass branch 1.3.6.1.4.1.13040.32.2.*
+# Swoosh objectclass branch 1.3.6.1.4.1.13040.33.2.*
+# Thor objectclass branch 1.3.6.1.4.1.13040.34.2.*
+# Ulaform objectclass branch 1.3.6.1.4.1.13040.35.2.*
+# Volos objectclass branch 1.3.6.1.4.1.13040.36.2.*
+
+#
+# Horde attribute branch 1.3.6.1.4.1.13040.2.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.2.1.1
+ NAME 'hordePrefs'
+ DESC 'Horde Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# IMP attribute branch 1.3.6.1.4.1.13040.3.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.3.1.1
+ NAME 'impPrefs'
+ DESC 'IMP Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Turba attribute branch 1.3.6.1.4.1.13040.4.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.4.1.1
+ NAME 'turbaPrefs'
+ DESC 'Turba Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+attributetype ( 1.3.6.1.4.1.13040.4.1.2
+ NAME 'turbaType'
+ DESC 'Turba Object Type: Contact/List'
+ EQUALITY caseIgnoreIA5Match
+ SUBSTR caseIgnoreIA5SubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{8} )
+
+attributetype ( 1.3.6.1.4.1.13040.4.1.3
+ NAME 'turbaMembers'
+ DESC 'Encoded members of a Turba list'
+ SUP name )
+
+attributetype ( 1.3.6.1.4.1.13040.4.1.4
+ NAME 'turbaPGPPublicKey'
+ DESC 'PGP/GPG Public Key'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{4000} )
+
+#
+# Kronolith attribute branch 1.3.6.1.4.1.13040.5.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.5.1.1
+ NAME 'kronolithPrefs'
+ DESC 'Kronolith Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Nag attribute branch 1.3.6.1.4.1.13040.6.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.6.1.1
+ NAME 'nagPrefs'
+ DESC 'Nag Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Gollem attribute branch 1.3.6.1.4.1.13040.7.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.7.1.1
+ NAME 'gollemPrefs'
+ DESC 'Gollem Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Chora attribute branch 1.3.6.1.4.1.13040.8.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.8.1.1
+ NAME 'choraPrefs'
+ DESC 'Chora Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Mnemo attribute branch 1.3.6.1.4.1.13040.9.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.9.1.1
+ NAME 'mnemoPrefs'
+ DESC 'Mnemo Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Troll attribute branch 1.3.6.1.4.1.13040.10.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.10.1.1
+ NAME 'trollPrefs'
+ DESC 'Troll Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Klutz attribute branch 1.3.6.1.4.1.13040.11.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.11.1.1
+ NAME 'klutzPrefs'
+ DESC 'Klutz Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Jonah attribute branch 1.3.6.1.4.1.13040.12.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.12.1.1
+ NAME 'jonahPrefs'
+ DESC 'Jonah Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Hermes attribute branch 1.3.6.1.4.1.13040.13.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.13.1.1
+ NAME 'hermesPrefs'
+ DESC 'Hermes Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Juno attribute branch 1.3.6.1.4.1.13040.14.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.14.1.1
+ NAME 'junoPrefs'
+ DESC 'Juno Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Trean attribute branch 1.3.6.1.4.1.13040.15.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.15.1.1
+ NAME 'treanPrefs'
+ DESC 'Trean Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Whups attribute branch 1.3.6.1.4.1.13040.16.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.16.1.1
+ NAME 'whupsPrefs'
+ DESC 'Whups Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Ingo attribute branch 1.3.6.1.4.1.13040.17.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.17.1.1
+ NAME 'ingoPrefs'
+ DESC 'Ingo Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Ansel attribute branch 1.3.6.1.4.1.13040.18.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.18.1.1
+ NAME 'anselPrefs'
+ DESC 'Ansel Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Genie attribute branch 1.3.6.1.4.1.13040.19.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.19.1.1
+ NAME 'geniePrefs'
+ DESC 'Genie Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Scry attribute branch 1.3.6.1.4.1.13040.20.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.20.1.1
+ NAME 'scryPrefs'
+ DESC 'Scry Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Wicked attribute branch 1.3.6.1.4.1.13040.21.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.21.1.1
+ NAME 'wickedPrefs'
+ DESC 'Wicked Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Agora attribute branch 1.3.6.1.4.1.13040.22.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.22.1.1
+ NAME 'agoraPrefs'
+ DESC 'Agora Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Goops attribute branch 1.3.6.1.4.1.13040.24.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.24.1.1
+ NAME 'goopsPrefs'
+ DESC 'Goops Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Merk attribute branch 1.3.6.1.4.1.13040.25.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.25.1.1
+ NAME 'merkPrefs'
+ DESC 'Merk Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Mimp attribute branch 1.3.6.1.4.1.13040.26.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.26.1.1
+ NAME 'mimpPrefs'
+ DESC 'MIMP Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Mottle attribute branch 1.3.6.1.4.1.13040.27.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.27.1.1
+ NAME 'mottlePrefs'
+ DESC 'Mottle Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Nic attribute branch 1.3.6.1.4.1.13040.28.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.28.1.1
+ NAME 'nicPrefs'
+ DESC 'NIC Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Occam attribute branch 1.3.6.1.4.1.13040.29.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.29.1.1
+ NAME 'occamPrefs'
+ DESC 'Occam Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Odin attribute branch 1.3.6.1.4.1.13040.30.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.30.1.1
+ NAME 'odinPrefs'
+ DESC 'Odin Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Rakim attribute branch 1.3.6.1.4.1.13040.31.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.31.1.1
+ NAME 'rakimPrefs'
+ DESC 'Rakim Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Sesha attribute branch 1.3.6.1.4.1.13040.32.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.32.1.1
+ NAME 'seshaPrefs'
+ DESC 'Sesha Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Swoosh attribute branch 1.3.6.1.4.1.13040.33.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.33.1.1
+ NAME 'swooshPrefs'
+ DESC 'Swoosh Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Thor attribute branch 1.3.6.1.4.1.13040.34.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.34.1.1
+ NAME 'thorPrefs'
+ DESC 'Thor Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Ulaform attribute branch 1.3.6.1.4.1.13040.35.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.35.1.1
+ NAME 'ulaformPrefs'
+ DESC 'Ulaform Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Volos attribute branch 1.3.6.1.4.1.13040.36.1.*
+#
+attributetype ( 1.3.6.1.4.1.13040.36.1.1
+ NAME 'volosPrefs'
+ DESC 'Volos Preferences'
+ EQUALITY caseIgnoreIA5Match
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{1024} )
+
+#
+# Horde objectclass branch 1.3.6.1.4.1.13040.2.2.*
+#
+objectclass ( 1.3.6.1.4.1.13040.2.2.1
+ NAME 'hordePerson'
+ DESC 'Horde Preferences'
+ SUP top
+ AUXILIARY
+ MAY ( mail $ hordePrefs $ impPrefs $ turbaPrefs $
+ gollemPrefs $ kronolithPrefs $ mnemoPrefs $
+ trollPrefs $ nagPrefs $ klutzPrefs $
+ jonahPrefs $ hermesPrefs $ junoPrefs $
+ treanPrefs $ whupsPrefs $ ingoPrefs $
+ geniePrefs $ scryPrefs $ anselPrefs $
+ wickedPrefs $ choraPrefs $ agoraPrefs $
+ goopsPrefs $ merkPrefs $ volosPrefs $
+ mimpPrefs $ mottlePrefs $ nicPrefs $
+ occamPrefs $ odinPrefs $ rakimPrefs $
+ seshaPrefs $ swooshPrefs $ thorPrefs $
+ ulaformPrefs
+ ) )
+
+objectclass ( 1.3.6.1.4.1.13040.2.2.2
+ NAME 'hordeGroup'
+ DESC 'Horde Group'
+ SUP top
+ AUXILIARY
+ MAY ( mail ) )
+
+#
+# IMP objectclass branch 1.3.6.1.4.1.13040.3.2.*
+#
+
+# Turba objectclass branch 1.3.6.1.4.1.13040.4.2.*
+objectclass ( 1.3.6.1.4.1.13040.4.2.1
+ NAME 'turbaContact'
+ DESC 'Turba Contact'
+ SUP top
+ AUXILIARY
+ MAY ( turbaType $ turbaMembers )
+ )
+
+#
+# Kronolith objectclass branch 1.3.6.1.4.1.13040.5.2.*
+#
+
+#
+# Nag objectclass branch 1.3.6.1.4.1.13040.6.2.*
+#
+
+#
+# Gollem objectclass branch 1.3.6.1.4.1.13040.7.2.*
+#
+
+#
+# Chora objectclass branch 1.3.6.1.4.1.13040.8.2.*
+#
+
+#
+# Mnemo objectclass branch 1.3.6.1.4.1.13040.9.2.*
+#
+
+#
+# Troll objectclass branch 1.3.6.1.4.1.13040.10.2.*
+#
+
+#
+# Klutz objectclass branch 1.3.6.1.4.1.13040.11.2.*
+#
+
+#
+# Jonah objectclass branch 1.3.6.1.4.1.13040.12.2.*
+#
+
+#
+# Hermes objectclass branch 1.3.6.1.4.1.13040.13.2.*
+#
+
+#
+# Juno objectclass branch 1.3.6.1.4.1.13040.14.2.*
+#
+
+#
+# Trean objectclass branch 1.3.6.1.4.1.13040.15.2.*
+#
+
+#
+# Whups objectclass branch 1.3.6.1.4.1.13040.16.2.*
+#
+
+#
+# Ingo objectclass branch 1.3.6.1.4.1.13040.17.2.*
+#
+
+#
+# Ansel objectclass branch 1.3.6.1.4.1.13040.18.2.*
+#
+
+#
+# Genie objectclass branch 1.3.6.1.4.1.13040.19.2.*
+#
+
+#
+# Scry objectclass branch 1.3.6.1.4.1.13040.20.2.*
+#
+
+#
+# Wicked objectclass branch 1.3.6.1.4.1.13040.21.2.*
+#
+
+#
+# Agora objectclass branch 1.3.6.1.4.1.13040.22.2.*
+#
+
+#
+# Goops objectclass branch 1.3.6.1.4.1.13040.24.2.*
+#
+
+#
+# Merk objectclass branch 1.3.6.1.4.1.13040.25.2.*
+#
+
+#
+# Mimp objectclass branch 1.3.6.1.4.1.13040.26.2.*
+#
+
+#
+# Mottle objectclass branch 1.3.6.1.4.1.13040.27.2.*
+#
+
+#
+# Nic objectclass branch 1.3.6.1.4.1.13040.28.2.*
+#
+
+#
+# Occam objectclass branch 1.3.6.1.4.1.13040.29.2.*
+#
+
+#
+# Odin objectclass branch 1.3.6.1.4.1.13040.30.2.*
+#
+
+#
+# Rakim objectclass branch 1.3.6.1.4.1.13040.31.2.*
+#
+
+#
+# Sesha objectclass branch 1.3.6.1.4.1.13040.32.2.*
+#
+
+#
+# Swoosh objectclass branch 1.3.6.1.4.1.13040.33.2.*
+#
+
+#
+# Thor objectclass branch 1.3.6.1.4.1.13040.34.2.*
+#
+
+#
+# Ulaform objectclass branch 1.3.6.1.4.1.13040.35.2.*
+#
+
+#
+# Volos objectclass branch 1.3.6.1.4.1.13040.36.2.*
+#
diff --git a/net-mail/kolabd/files/horde.service b/net-mail/kolabd/files/horde.service
new file mode 100644
index 0000000..603988b
--- /dev/null
+++ b/net-mail/kolabd/files/horde.service
@@ -0,0 +1,2 @@
+/horde
+Webmail
diff --git a/net-mail/kolabd/files/imapd.annotation_definitions.2.1.template b/net-mail/kolabd/files/imapd.annotation_definitions.2.1.template
new file mode 100644
index 0000000..ede3a42
--- /dev/null
+++ b/net-mail/kolabd/files/imapd.annotation_definitions.2.1.template
@@ -0,0 +1,10 @@
+KOLAB_META_START
+TARGET=/etc/imapd.annotation_definitions
+PERMISSIONS=0640
+OWNERSHIP=cyrus:mail
+KOLAB_META_END
+/vendor/kolab/folder-test,mailbox,string,backend,value.shared value.priv,a
+/vendor/kolab/folder-type,mailbox,string,backend,value.shared value.priv,a
+/vendor/kolab/incidences-for,mailbox,string,backend,value.shared value.priv,a
+/vendor/horde/share-params,mailbox,string,backend,value.shared value.priv,a
+/vendor/x-toltec/test,mailbox,string,backend,value.shared value.priv,a
diff --git a/net-mail/kolabd/files/index.php b/net-mail/kolabd/files/index.php
new file mode 100644
index 0000000..4cf00c0
--- /dev/null
+++ b/net-mail/kolabd/files/index.php
@@ -0,0 +1,67 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link
+ rel="icon"
+ type="image/png"
+ href="favicon.ico"
+ />
+
+ <title>
+ Powered by Kolab on Gentoo
+ </title>
+ </head>
+
+ <body>
+
+ <div>
+
+ <a style="text-decoration:none;" href="http://www.kolab.org">
+ <img style="border: 0px;" src="kolab_logo.small.png" alt="Kolab" />
+ </a>
+
+ </div>
+
+ <p style="height:30px;"/>
+
+ <div style='color:#ffffff; font-family: "bitstream vera sans", "verdana", "arial", "helvetica", sans-serif;'>
+
+ <ul>
+
+ <!-- Ugly little PP thingy to get the job done -->
+ <?php
+ $files = scandir(getcwd() . "/services");
+ $services = array();
+ foreach ($files as $file) {
+ if (preg_match("/.*\.service$/", $file)) {
+ $services[$file] = file(getcwd() . "/services/" . $file);
+ }
+ }
+ foreach ($services as $service) {
+ echo "<li><a href=\"";
+ echo $service[0];
+ echo "\">";
+ echo $service[1];
+ echo "</a></li>\n";
+ }
+ ?>
+
+ </ul>
+
+ </div>
+
+ <p style="height:30px;"/>
+
+ <div>
+
+ <a style="text-decoration:none;" href="http://www.gentoo.org">
+ <img style="border: 0px;" src="powered-by-gentoo.jpg" alt="Powered by Gentoo" />
+ </a>
+
+ </div>
+
+ </body>
+
+</html>
+
diff --git a/net-mail/kolabd/files/kolab-domain-base.include.2.1.template b/net-mail/kolabd/files/kolab-domain-base.include.2.1.template
new file mode 100644
index 0000000..8b3eaae
--- /dev/null
+++ b/net-mail/kolabd/files/kolab-domain-base.include.2.1.template
@@ -0,0 +1,61 @@
+KOLAB_META_START
+TARGET=/etc/apache2/vhosts.d/kolab-domain-base.include
+PERMISSIONS=0644
+OWNERSHIP=root:root
+KOLAB_META_END
+
+Alias /admin "/var/www/kolab/htdocs/admin/"
+Alias /freebusy "/var/www/kolab/htdocs/freebusy/"
+Alias /server "/var/www/kolab/htdocs/server/"
+
+@@@if apache-http@@@
+@@@else@@@
+<Location /server>
+<IfModule mod_ssl.c>
+ SSLRequireSSL
+</IfModule>
+</Location>
+
+<Location /admin>
+<IfModule mod_ssl.c>
+ SSLRequireSSL
+</IfModule>
+</Location>
+
+<Location /freebusy>
+<IfModule mod_ssl.c>
+ SSLRequireSSL
+</IfModule>
+</Location>
+@@@endif@@@
+
+<IfModule mod_rewrite.c>
+ # Necessary for freebusy
+ RewriteEngine On
+</IfModule>
+
+<IfDefine KOLAB-DAV>
+ <IfModule dav_module>
+ @@@if apache-http@@@
+ @@@else@@@
+ <Location /dav>
+ <IfModule mod_ssl.c>
+ SSLRequireSSL
+ </IfModule>
+ </Location>
+ @@@endif@@@
+ </IfModule>
+</IfDefine>
+
+<IfDefine KOLAB-HORDE>
+ Alias /horde "/var/www/kolab/htdocs/horde/"
+
+ @@@if apache-http@@@
+ @@@else@@@
+ <Location /horde>
+ <IfModule mod_ssl.c>
+ SSLRequireSSL
+ </IfModule>
+ </Location>
+ @@@endif@@@
+</IfDefine>
diff --git a/net-mail/kolabd/files/kolab-vhosts-mailman.include.use-mailman-2.1.template b/net-mail/kolabd/files/kolab-vhosts-mailman.include.use-mailman-2.1.template
new file mode 100644
index 0000000..99f2217
--- /dev/null
+++ b/net-mail/kolabd/files/kolab-vhosts-mailman.include.use-mailman-2.1.template
@@ -0,0 +1,19 @@
+KOLAB_META_START
+TARGET=/etc/apache2/vhosts.d/kolab-vhosts-mailman.include
+PERMISSIONS=0644
+OWNERSHIP=root:root
+KOLAB_META_END
+
+<VirtualHost *:80>
+
+ DocumentRoot "/var/www/kolab/htdocs"
+ ServerName lists.@@@fqdnhostname@@@
+ ErrorLog /var/log/apache2/@@@fqdnhostname@@@_error_log
+ CustomLog /var/log/apache2/@@@fqdnhostname@@@_access_log combined
+
+ ScriptAlias /mailman/ "/usr/share/mailman/cgi-bin/"
+ Alias /pipermail/ "/var/lib/mailman/archives/public/"
+ Alias /icons/ "/usr/share/mailman/icons/"
+
+</VirtualHost>
+
diff --git a/net-mail/kolabd/files/kolab_logo.small.png b/net-mail/kolabd/files/kolab_logo.small.png
new file mode 100644
index 0000000..386d112
--- /dev/null
+++ b/net-mail/kolabd/files/kolab_logo.small.png
Binary files differ
diff --git a/net-mail/kolabd/files/kolab_services b/net-mail/kolabd/files/kolab_services
new file mode 100755
index 0000000..9838d0c
--- /dev/null
+++ b/net-mail/kolabd/files/kolab_services
@@ -0,0 +1,93 @@
+#!/bin/bash
+##
+## Kolab Service tool
+##
+## Copyright (c) 2007 p@rdus <http://www.pardus.de>
+##
+## Permission to use, copy, modify, and distribute this software for
+## any purpose with or without fee is hereby granted, provided that
+## the above copyright notice and this permission notice appear in all
+## copies.
+##
+## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+## SUCH DAMAGE.
+##
+
+service=$1
+action=$2
+
+case "${service}" in
+ openldap)
+ case "${action}" in
+ restart)
+ /etc/init.d/slurpd --quiet restart &
+ /etc/init.d/slapd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ saslauthd)
+ case "${action}" in
+ restart)
+ /etc/init.d/saslauthd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ apache)
+ case "${action}" in
+ restart)
+ /etc/init.d/apache2 --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ postfix)
+ case "${action}" in
+ restart)
+ /etc/init.d/postfix --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ imapd)
+ case "${action}" in
+ restart)
+ /etc/init.d/cyrus --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ amavisd)
+ case "${action}" in
+ restart)
+ /etc/init.d/amavisd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ clamav)
+ case "${action}" in
+ restart)
+ /etc/init.d/clamd --quiet restart &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ proftpd)
+ case "${action}" in
+ restart)
+ [ -f /etc/init.d/proftpd ] && /etc/init.d/proftpd --quiet restart &;;
+ start)
+ [ -f /etc/init.d/proftpd ] && /etc/init.d/proftpd --quiet status || /etc/init.d/proftpd --quiet start &;;
+ stop)
+ [ -f /etc/init.d/proftpd ] && /etc/init.d/proftpd --quiet status && /etc/init.d/proftpd stop &;;
+ *)
+ echo "kolab:ERROR: Invalid action \"${action}\"." 1>&2;;
+ esac;;
+ *)
+ echo "kolab:ERROR: Invalid service \"${service}\"." 1>&2;;
+esac
diff --git a/net-mail/kolabd/files/kolabd b/net-mail/kolabd/files/kolabd
new file mode 100755
index 0000000..0f9e144
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need amavisd apache2 clamd slapd slurpd postfix cyrus saslauthd logger
+}
+
+start() {
+ ebegin "Starting kolabd"
+ start-stop-daemon -b --start --quiet --exec /usr/sbin/kolabd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping kolabd"
+ start-stop-daemon --stop --quiet --pidfile /var/lib/kolab/kolab.pid
+ eend $?
+}
diff --git a/net-mail/kolabd/files/kolabd.legacy b/net-mail/kolabd/files/kolabd.legacy
new file mode 100755
index 0000000..707cf23
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd.legacy
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+
+depend() {
+ need amavisd apache2 clamd slapd slurpd postfix cyrus saslauthd logger proftpd
+}
+
+start() {
+ ebegin "Starting kolabd"
+ start-stop-daemon -b --start --quiet --exec /usr/sbin/kolabd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping kolabd"
+ start-stop-daemon --stop --quiet --pidfile /var/lib/kolab/kolab.pid
+ eend $?
+}
diff --git a/net-mail/kolabd/files/kolabd_kolabd_kolab_bootstrap.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_kolab_bootstrap.in-2.1.patch
new file mode 100644
index 0000000..8148be1
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_kolab_bootstrap.in-2.1.patch
@@ -0,0 +1,22 @@
+--- kolabd/kolabd/kolab_bootstrap.in 2007-02-16 09:59:52.000000000 +0100
++++ kolabd/kolabd/kolab_bootstrap.in.gentoo 2007-02-28 23:46:52.000000000 +0100
+@@ -38,7 +38,7 @@
+ my($str, $metas) = @_;
+ $str =~ s/([\\"])/\\$1/g;
+ if(defined $metas) {
+- $metas = '!$`' if $metas eq ":shell";
++ $metas = '$`' if $metas eq ":shell";
+ $metas =~ s/\]/\\]/g;
+ $str =~ s/([$metas])/\\$1/g;
+ }
+@@ -937,8 +937,8 @@
+ chmod 0600, $kolab_config;
+ }
+
+-#system("@sysconfdir@/kolab/kolab_sslcert.sh $fqdn");
++#system("@kolab_scriptsdir@/kolab_sslcert.sh $fqdn");
+ print "kolab is now ready to run!\n";
+-print "please run '@KOLABRC@ rc all start'\n";
++print "please run '/etc/init.d/kolabd start'\n";
+ print ("Use login=manager and passwd=$bind_pw when you log into\n");
+ print ("the webinterface https://$fqdn@webserver_web_prefix@/admin !\n");
diff --git a/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch
new file mode 100644
index 0000000..ab83bc7
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_adduser.in-2.1.patch
@@ -0,0 +1,11 @@
+--- kolabd/kolabd/namespace/libexec/adduser.in 2006-07-20 09:49:50.000000000 +0200
++++ kolabd/kolabd/namespace/libexec/adduser.in.gentoo 2006-07-20 09:49:14.000000000 +0200
+@@ -73,7 +73,7 @@
+ echo "--"
+
+ #Check if the user already exists
+-DN=`kolab showuser $EMAIL | grep dn`
++DN=`@libexecdir@/kolab/showuser $EMAIL | grep dn`
+ if test "$DN" != ""; then
+ echo User already found! Or other error occurred.
+ exit 255
diff --git a/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch
new file mode 100644
index 0000000..7498092
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_deluser.in-2.1.patch
@@ -0,0 +1,11 @@
+--- kolabd/kolabd/namespace/libexec/deluser.in 2006-07-20 09:49:50.000000000 +0200
++++ kolabd/kolabd/namespace/libexec/deluser.in.gentoo 2006-07-20 09:49:07.000000000 +0200
+@@ -29,7 +29,7 @@
+ BASEDN=`sed -n 's;base_dn : ;;p' @sysconfdir@/kolab/kolab.conf`
+ HOMESERV=`sed -n 's;fqdnhostname : ;;p' @sysconfdir@/kolab/kolab.conf`
+
+-DN=`kolab showuser $1 | grep dn`
++DN=`@libexecdir@/kolab/showuser $1 | grep dn`
+ if test "$DN" = ""; then
+ echo User not found!
+ exit 255
diff --git a/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_start.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_start.in-2.1.patch
new file mode 100644
index 0000000..3bf1270
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_start.in-2.1.patch
@@ -0,0 +1,10 @@
+--- kolabd/kolabd/namespace/libexec/start.in 2006-07-20 09:49:50.000000000 +0200
++++ kolabd/kolabd/namespace/libexec/start.in.gentoo 2006-07-20 09:49:35.000000000 +0200
+@@ -21,6 +21,5 @@
+ HASHELP
+ fi
+
+-
+-openpkg rc all start
++/etc/init.d/kolabd restart
+
diff --git a/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_stop.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_stop.in-2.1.patch
new file mode 100644
index 0000000..b7c7170
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_namespace_libexec_stop.in-2.1.patch
@@ -0,0 +1,9 @@
+--- kolabd/kolabd/namespace/libexec/stop.in 2006-07-20 09:49:50.000000000 +0200
++++ kolabd/kolabd/namespace/libexec/stop.in.gentoo 2006-07-20 09:49:43.000000000 +0200
+@@ -21,5 +21,5 @@
+ HASHELP
+ fi
+
+-openpkg rc all stop
++/etc/init.d/kolabd stop
+
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch
new file mode 100644
index 0000000..1792a37
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_DB_CONFIG.slapd.template.in-2.1.patch
@@ -0,0 +1,11 @@
+--- kolabd/kolabd/templates/DB_CONFIG.slapd.template.in 2006-10-04 11:52:29.000000000 +0200
++++ kolabd/kolabd/templates/DB_CONFIG.slapd.template.in.gentoo 2006-10-04 11:52:29.000000000 +0200
+@@ -1,7 +1,7 @@
+ KOLAB_META_START
+ TARGET=@ldapserver_dir@/DB_CONFIG
+ PERMISSIONS=0640
+-OWNERSHIP=@kolab_musr@:@kolab_rgrp@
++OWNERSHIP=@ldapserver_rusr@:@ldapserver_grp@
+ KOLAB_META_END
+ # (c) 2005 Klaraelvdalens Datakonsult AB
+ # Written by Steffen Hansen <steffen@klaralvdalens-datakonsult.se>
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch
new file mode 100644
index 0000000..f053af0
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-2.1.patch
@@ -0,0 +1,10 @@
+--- kolabd/kolabd/templates/amavisd.conf.template.in 2007-03-12 23:52:33.000000000 +0100
++++ kolabd/kolabd/templates/amavisd.conf.template.in.gentoo 2007-03-12 23:57:07.000000000 +0100
+@@ -1515,7 +1515,6 @@
+ warnbannedrecip_maps => undef,# (defaults to false (undef))
+ warnvirussender => 1,
+ warnbannedsender => 1,
+- mynetworks => qw(0.0.0.0/0),
+ };
+
+
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch
new file mode 100644
index 0000000..7f0e7e0
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_amavisd.conf.template.in-use-spam-2.1.patch
@@ -0,0 +1,19 @@
+--- kolabd/kolabd/templates/amavisd.conf.template.in 2007-03-12 23:52:33.000000000 +0100
++++ kolabd/kolabd/templates/amavisd.conf.template.in.spam.gentoo 2007-03-12 23:57:53.000000000 +0100
+@@ -1101,7 +1101,7 @@
+ # If set to 1, SA tests are restricted to local tests only, i.e. no tests
+ # that require internet access will be performed.
+ #
+-$sa_local_tests_only = 1; # (default: false)
++$sa_local_tests_only = 0; # (default: false)
+ #$sa_auto_whitelist = 1; # turn on AWL (default: false)
+
+ $sa_timeout = 30; # timeout in seconds for a call to SpamAssassin
+@@ -1515,7 +1515,6 @@
+ warnbannedrecip_maps => undef,# (defaults to false (undef))
+ warnvirussender => 1,
+ warnbannedsender => 1,
+- mynetworks => qw(0.0.0.0/0),
+ };
+
+
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch
new file mode 100644
index 0000000..77ac3b3
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_clamd.conf.template.in-2.1.patch
@@ -0,0 +1,26 @@
+--- kolabd/kolabd/templates/clamd.conf.template.in 2007-05-02 16:55:07.000000000 +0200
++++ kolabd/kolabd/templates/clamd.conf.template.in.gentoo 2007-05-02 16:45:49.000000000 +0200
+@@ -18,7 +18,7 @@
+ # LogFile must be writable for the user running daemon.
+ # A full path is required.
+ # Default: disabled
+-LogFile @clamav_logfile@
++#LogFile @clamav_logfile@
+
+ # By default the log file is locked for writing - the lock protects against
+ # running clamd multiple times (if want to run another clamd, please
+@@ -47,12 +47,12 @@
+
+ # Use system logger (can work together with LogFile).
+ # Default: no
+-#LogSyslog yes
++LogSyslog yes
+
+ # Specify the type of syslog messages - please refer to 'man syslog'
+ # for facility names.
+ # Default: LOG_LOCAL6
+-#LogFacility LOG_MAIL
++LogFacility LOG_MAIL
+
+ # Enable verbose logging.
+ # Default: no
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch
new file mode 100644
index 0000000..e0be5fa
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_cyrus.conf.template.in-2.1.patch
@@ -0,0 +1,63 @@
+--- kolabd/kolabd/templates/cyrus.conf.template.in 2007-05-02 16:45:49.000000000 +0200
++++ kolabd/kolabd/templates/cyrus.conf.template.in.gentoo 2006-10-09 15:55:34.000000000 +0200
+@@ -12,19 +12,19 @@
+ # this file is automatically written by the Kolab config backend
+ # manual additions are lost unless made to the template in the Kolab config directory
+
++# $Header: /var/cvsroot/gentoo-x86/net-mail/cyrus-imapd/files/cyrus.conf,v 1.4 2004/07/18 04:02:23 dragonheart Exp $
++
++# Standard standalone server configuration.
+
+ START {
+- # do not delete this entry!
++ # Do not delete this entry!
+ recover cmd="ctl_cyrusdb -r"
+
+- # this is only necessary if using idled for IMAP IDLE
++ # This is only necessary if using idled for IMAP IDLE.
+ #idled cmd="idled"
+-
+- # Initial mupdate syncronisation
+- #mupdatepush cmd="ctl_mboxlist -m"
+ }
+
+-# UNIX sockets start with a slash and are put into /openpkg/var/imapd/sockets
++# UNIX sockets start with a slash and are put into /var/imap/socket.
+ SERVICES {
+ @@@cyrus-imap@@@
+ @@@cyrus-imaps@@@
+@@ -32,25 +32,26 @@
+ @@@cyrus-pop3s@@@
+ @@@cyrus-sieve@@@
+
+-#@@@if is-master@@@
+-# mupdate cmd="mupdate -m" listen=3905 prefork=1
+-#@@@endif@@@
++ #sieve cmd="timsieved" listen="sieve" prefork=0
+
+- # LMTP is required for delivery
+- lmtpunix cmd="lmtpd" listen="@emailserver_socket@" prefork=0
++ # at least one LMTP is required for delivery
+ lmtp cmd="lmtpd -a" listen="127.0.0.1:2003"
++ lmtpunix cmd="lmtpd" listen="@emailserver_socket@" prefork=0
+
+ # this is only necessary if using notifications
+ notify cmd="notifyd" listen="@imap_notify_socket@" proto="udp" prefork=1
+ }
+
+ EVENTS {
+- # this is required
++ # This is required.
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+
+- # this is only necessary if using duplicate delivery suppression
++ # This is only necessary if using duplicate delivery suppression.
+ delprune cmd="cyr_expire -E 3" period=1440
+
+- # this is only necessary if caching TLS sessions
++ # This is only necessary if caching TLS sessions.
+ tlsprune cmd="tls_prune" period=1440
++
++ # create SQUAT indexes for mailboxes
++ squatter cmd="squatter -r *" period=30
+ }
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch
new file mode 100644
index 0000000..d9b5d78
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_freshclam.conf.template.in-2.1.patch
@@ -0,0 +1,35 @@
+--- kolabd/kolabd/templates/freshclam.conf.template.in 2007-05-02 16:55:07.000000000 +0200
++++ kolabd/kolabd/templates/freshclam.conf.template.in.gentoo 2007-05-02 16:27:24.000000000 +0200
+@@ -21,7 +21,7 @@
+
+ # Path to the log file (make sure it has proper permissions)
+ # Default: disabled
+-UpdateLogFile @freshclam_logfile@
++#UpdateLogFile @freshclam_logfile@
+
+ # Enable verbose logging.
+ # Default: no
+@@ -29,12 +29,12 @@
+
+ # Use system logger (can work together with UpdateLogFile).
+ # Default: no
+-#LogSyslog yes
++LogSyslog yes
+
+ # Specify the type of syslog messages - please refer to 'man syslog'
+ # for facility names.
+ # Default: LOG_LOCAL6
+-#LogFacility LOG_MAIL
++LogFacility LOG_MAIL
+
+ # This option allows you to save the process identifier of the daemon
+ # Default: disabled
+@@ -43,7 +43,7 @@
+ # By default when started freshclam drops privileges and switches to the
+ # "clamav" user. This directive allows you to change the database owner.
+ # Default: clamav (may depend on installation options)
+-#DatabaseOwner clamav
++DatabaseOwner @clamav_rusr@
+
+ # Initialize supplementary group access (freshclam must be started by root).
+ # Default: no
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch
new file mode 100644
index 0000000..a68cbfd
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_imapd.conf.template.in-2.1.patch
@@ -0,0 +1,14 @@
+--- kolabd/kolabd/templates/imapd.conf.template.in 2007-02-16 12:39:42.000000000 +0100
++++ kolabd/kolabd/templates/imapd.conf.template.in.gentoo 2007-05-03 00:44:17.000000000 +0200
+@@ -91,3 +91,10 @@
+ # The minimum value is 1. A value of 0 will disable polling (and disable IDLE if polling is
+ # the only method available).
+ imapidlepoll: 5
++
++# This is a completely unnecessary setting, but it makes the
++# cyrus-sasl plugin loader shut up about an invalid auxprop parameter
++sasl_ldapdb_uri: ldap://localhost
++
++# Load definitions for vendor annotations
++annotation_definitions: /etc/imapd.annotation_definitions
+
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch
new file mode 100644
index 0000000..cfea892
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_ldapdistlist.cf.template.in-2.1.patch
@@ -0,0 +1,13 @@
+--- kolabd/kolabd/templates/ldapdistlist.cf.template.in 2007-03-16 10:30:40.000000000 +0100
++++ kolabd/kolabd/templates/ldapdistlist.cf.template.in.gentoo 2007-03-16 10:29:52.000000000 +0100
+@@ -20,8 +20,8 @@
+ search_base = @@@user_dn_list@@@
+ query_filter = (&(objectClass=kolabGroupOfNames)(!(kolabDeleteFlag=*))(mail=%s))
+ special_result_attribute = member
+-exclude_internal = yes
+-result_attribute = mail
++result_attribute =
++leaf_result_attribute = mail
+ result_filter = %s
+ search_timeout = 15
+ scope = sub
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-2.1.patch
new file mode 100644
index 0000000..77e9314
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-2.1.patch
@@ -0,0 +1,1137 @@
+--- kolabd/kolabd/templates/main.cf.template.in 2007-06-26 12:24:36.339282750 +0200
++++ kolabd/kolabd/templates/main.cf.template.in.gentoo 2007-07-26 09:13:02.074345750 +0200
+@@ -14,143 +14,390 @@
+ # this file is automatically written by the Kolab config backend
+ # manual additions are lost unless made to the template in the Kolab config directory
+
++# Global Postfix configuration file. This file lists only a subset
++# of all 300+ parameters. See the postconf(5) manual page for a
++# complete list.
++#
++# The general format of each line is: parameter = value. Lines
++# that begin with whitespace continue the previous line. A value can
++# contain references to other $names or ${name}s.
++#
++# NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF
++# POSTFIX STILL WORKS AFTER EVERY CHANGE.
++
++# MODIFIED by Gunnar Wrobel <wrobel@pardus.de> for Gentoo
++# (modified some parameters and added the comments back
++# in for my own reference)
++
++#######################################################################
++## Variables added by Kolab
++#######################################################################
++
++#######################################################################
++# MESSAGE SIZE
++
++#######################################################################
++# The maximal size in bytes of a message, including envelope
++# information.
++#
++# Postfix default is 10 240 000 Byte = 10.24 Megabyte,
++# We use 20 Mebibyte = 20*2^20 Byte
+
+-# postfix default is 10 240 000 Byte = 10.24 Megabyte,
+-# we use 20 Mebibyte = 20*2^20 Byte
+ message_size_limit = 20971520
+
+-# paths
+-command_directory = @sbindir@
+-daemon_directory = @libexecdir@/postfix
+-queue_directory = @emailserver_localstatedir@
++# ADDRESS EXTENSIONS (e.g., user+foo)
++#
++# The recipient_delimiter parameter specifies the separator between
++# user names and address extensions (user+foo). See canonical(5),
++# local(8), relocated(5) and virtual(5) for the effects this has on
++# aliases, canonical, virtual, relocated and .forward file lookups.
++# Basically, the software tries user+foo and .forward+foo before
++# trying user and .forward.
++#
++# COMMENT: It apparently matters where this statement occurs. See commit
++# http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/kolabd/kolabd/templates/main.cf.template.in.diff?r1=1.10&r2=1.11
++# -- Gunnar Wrobel ,03.10.2006
++#
++#recipient_delimiter = +
++recipient_delimiter = +
+
+-# users
+-mail_owner= @emailserver_mail_owner@
+-setgid_group= @emailserver_setgid_grp@
+-default_privs= @emailserver_default_privs@
++# null_sender=replacement (default: MAILER-DAEMON)
++# Replace the null sender address, which is typically
++# used for delivery status notifications, with the
++# specified text when expanding the $sender command-
++# line macro, and when generating a From_ or Return-
++# Path: message header.
++#
++# If the null sender replacement text is a non-empty
++# string then it is affected by the q flag for
++# address quoting in command-line arguments.
++#
++# The null sender replacement text may be empty; this
++# form is recommended for content filters that feed
++# mail back into Postfix. The empty sender address is
++# not affected by the q flag for address quoting in
++# command-line arguments.
++#
++# Caution: a null sender address is easily mis-parsed
++# by naive software. For example, when the [13]pipe(8)
++# daemon executes a command such as:
++#
++# command -f$sender -- $recipient (bad)
++#
++# the command will mis-parse the -f option value when
++# the sender address is a null string. For correct
++# parsing, specify $sender as an argument by itself:
++#
++# command -f $sender -- $recipient (good)
++#
++# This feature is available with Postfix 2.3 and
++# later.
++#
++# COMMENT: This feature replaces the old "allow empty sender"
++# patch
++# -- Gunnar Wrobel ,03.10.2006
++#
++null_sender =
+
+-# local host
+-myhostname = @@@fqdnhostname@@@
+-mydomain = @@@postfix-mydomain@@@
+-myorigin = $mydomain
+-@@@if postfix-relayhost@@@
++#######################################################################
++# MAPS
+
+-# Postfix Relay Host
++#######################################################################
+ #
+-# Check if there is also a relayport otherwise put the default
+-@@@if postfix-relayport@@@
+-relayhost = [@@@postfix-relayhost@@@]:@@@postfix-relayport@@@
+-@@@else@@@
+-relayhost = [@@@postfix-relayhost@@@]
+-@@@endif@@@
+-@@@endif@@@
++# Optional lookup tables with a) names of domains for which all
++# addresses are aliased to addresses in other local or remote domains,
++# and b) addresses that are aliased to addresses in other local or
++# remote domains.
++#
++# Available before Postfix version 2.0. With Postfix 2.0 and later,
++# this is replaced by separate controls:
++# virtual_alias_domains and virtual_alias_maps.
++
++virtual_maps = hash:@emailserver_confdir@/virtual,
++ ldap:@emailserver_confdir@/ldapdistlist.cf,
++ ldap:@emailserver_confdir@/ldapvirtual.cf,
++ pcre:@emailserver_confdir@/kolabvirtual
++
++#######################################################################
++#
++# Optional lookup tables with all valid addresses in the domains that
++# match $virtual_mailbox_domains.
++#
++# In a lookup table, specify a left-hand side of "@domain.tld" to match
++# any user in the specified domain that does not have a specific
++# "user@domain.tld" entry.
++#
++# The virtual(8) delivery agent uses this table to look up the
++# per-recipient mailbox or maildir pathname. If the lookup result ends
++# in a slash ("/"), maildir-style delivery is carried out, otherwise the
++# path is assumed to specify a UNIX-style mailbox file. Note
++# that $virtual_mailbox_base is unconditionally prepended to this path.
++#
++# When a recipient address has an optional address extension
++# (user+foo@domain.tld), the virtual(8) delivery agent looks up the
++# full address first, and when the lookup fails, it looks up the
++# unextended address (user@domain.tld).
++#
++# Note 1: for security reasons, the virtual(8) delivery agent disallows
++# regular expression substitution of $1 etc. in regular expression
++# lookup tables, because that would open a security hole.
++#
++# Note 2: for security reasons, the virtual(8) delivery agent will
++# silently ignore requests to use the proxymap(8) server. Instead it
++# will open the table directly. Before Postfix version 2.2, the
++# virtual(8) delivery agent will terminate with a fatal error.
++
++#virtual_mailbox_maps = $virtual_maps
++
++#######################################################################
++#
++# Optional address mapping lookup tables for message headers and
++# envelopes. The mapping is applied to both sender and recipient
++# addresses, in both envelopes and in headers, as controlled
++# with the canonical_classes parameter. This is typically used to
++# clean up dirty addresses from legacy mail systems, or to replace
++# login names by Firstname.Lastname. The table format and lookups
++# are documented in canonical(5). For an overview of Postfix address
++# manipulations see the ADDRESS_REWRITING_README document.
++#
++# If you use this feature, run "postmap /etc/postfix/canonical" to
++# build the necessary DBM or DB file after every change. The changes
++# will become visible after a minute or so. Use "postfix reload" to
++# eliminate the delay.
++#
++# Note: with Postfix version 2.2, message header address mapping
++# happens only when message header address rewriting is enabled:
++#
++# o The message is received with the Postfix sendmail(1) command,
++#
++# o The message is received from a network client that matches
++# $local_header_rewrite_clients,
++#
++# o The message is received from the network, and the
++# remote_header_rewrite_domain parameter specifies a non-empty
++# value.
++#
++# To get the behavior before Postfix 2.2, specify
++# "local_header_rewrite_clients = static:all".
++#
++# canonical_maps = dbm:/etc/postfix/canonical
++# canonical_maps = hash:/etc/postfix/canonical
++
++canonical_maps = hash:@emailserver_confdir@/canonical
++
++#######################################################################
++#
++# Optional lookup tables with new contact information for users or
++# domains that no longer exist. The table format and lookups are
++# documented in relocated(5).
++#
++# If you use this feature, run "postmap /etc/postfix/relocated" to
++# build the necessary DBM or DB file after change, then "postfix
++# reload" to make the changes visible.
++#
++# Examples:
++#
++# relocated_maps = dbm:/etc/postfix/relocated
++# relocated_maps = hash:/etc/postfix/relocated
++
++relocated_maps = hash:@emailserver_confdir@/relocated
++
++#######################################################################
++#
++# Optional lookup tables with mappings from recipient address to
++# (message delivery transport, next-hop destination). See transport(5)
++# for details.
++#
++# Specify zero or more "type:table" lookup tables. If you use this
++# feature with local files, run "postmap /etc/postfix/transport" after
++# making a change.
++#
++# Examples:
++#
++# transport_maps = dbm:/etc/postfix/transport
++# transport_maps = hash:/etc/postfix/transport
++
++transport_maps = hash:@emailserver_confdir@/transport,
++ ldap:@emailserver_confdir@/ldaptransport.cf
++
++#######################################################################
++# MASQERADING
++
++#######################################################################
++#
++# Optional list of domains whose subdomain structure will be stripped
++# off in email addresses.
++#
++# The list is processed left to right, and processing stops at the
++# first match. Thus,
++#
++# masquerade_domains = foo.example.com example.com
++#
++# strips "user@any.thing.foo.example.com" to "user@foo.example.com",
++# but strips "user@any.thing.else.example.com" to "user@example.com".
++#
++# A domain name prefixed with ! means do not masquerade this domain
++# or its subdomains. Thus,
++#
++# masquerade_domains = !foo.example.com example.com
++#
++# does not change "user@any.thing.foo.example.com" or
++# "user@foo.example.com", but strips
++# "user@any.thing.else.example.com" to "user@example.com".
++#
++# Note: with Postfix version 2.2, message header address masquerading
++# happens only when message header address rewriting is enabled:
++#
++# o The message is received with the Postfix sendmail(1) command,
++#
++# o The message is received from a network client that matches
++# $local_header_rewrite_clients,
++#
++# o The message is received from the network, and the
++# remote_header_rewrite_domain parameter specifies a non-empty value.
++#
++# To get the behavior before Postfix 2.2, specify
++# "local_header_rewrite_clients = static:all".
++#
++# Example:
++#
++# masquerade_domains = $mydomain
+
+-#
+ masquerade_domains = @@@postfix-mydestination|join( )@@@
+-# Kolab Server does _not_ want to forward to local machines by default,
+-# so we can add "envelope_recipient" to masquerade_classes:
++
++#######################################################################
++#
++# Optional list of user names that are not subjected to address
++# masquerading, even when their address matches $masquerade_domains.
++#
++# By default, address masquerading makes no exceptions.
++#
++# Specify a list of user names, "/file/name" or "type:table"
++# patterns, separated by commas and/or white-space. The list is matched
++# left to right, and the search stops on the first match. Specify
++# "!name" to exclude a name from the list. A "/file/name" pattern is
++# replaced by its contents; a "type:table" lookup table is matched when
++# a name matches a lookup key (the lookup result is ignored). Continue
++# long lines by starting the next line with whitespace.
++#
++# Examples:
++#
++# masquerade_exceptions = root, mailer-daemon
++# masquerade_exceptions = root
++
++# masquerade_exceptions = root
++
++#######################################################################
++# Kolab Server does _not_ want to forward to local machines by
++# default, so we can add "envelope_recipient" to
++# masquerade_classes:
++
+ masquerade_classes = envelope_sender, envelope_recipient,
+ header_sender, header_recipient
+
+-# smtp daemon
+-#smtpd_banner = $myhostname ESMTP $mail_name
+-#inet_interfaces = 127.0.0.1
++#######################################################################
++# TRANSPORT
+
+-# relaying
+-mynetworks = @@@postfix-mynetworks|join( )@@@
+-mydestination = @@@postfix-mydestination|join( )@@@
+-relay_domains =
+-#smtpd_recipient_restrictions = permit_mynetworks,
+-# check_client_access hash:@emailserver_confdir@/access,
+-# check_relay_domains
++#######################################################################
++#
++# The default mail delivery transport for domains that match
++# $mydestination, $inet_interfaces or $proxy_interfaces. This
++# information can be overruled with the transport(5) table.
++#
++# By default, local mail is delivered to the transport called "local",
++# which is just the name of a service that is defined the master.cf file.
++#
++# Specify a string of the form transport:nexthop, where transport is
++# the name of a mail delivery transport defined in master.cf. The
++# :nexthop part is optional. For more details see the transport(5)
++# manual page.
++#
++# Beware: if you override the default local delivery agent then
++# you need to review the LOCAL_RECIPIENT_README document, otherwise
++# the SMTP server may reject mail for local recipients.
++
++# COMMENT: only use local_transport or a higher recipent_limit if issue825 is fixed
++# http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/kolabd/kolabd/templates/main.cf.template.in.diff?r1=1.11&r2=1.12
++# -- Bernhard Reiter ,27.09.2006
+
++#local_transport = kolabmailboxfilter
+
+-recipient_delimiter = +
++#######################################################################
++# RELAYING
++##
++## Kolab Policy Server
++##
+
+-# maps
+-canonical_maps = hash:@emailserver_confdir@/canonical
+-virtual_maps = hash:@emailserver_confdir@/virtual,
+- ldap:@emailserver_confdir@/ldapdistlist.cf,
+- ldap:@emailserver_confdir@/ldapvirtual.cf
+-relocated_maps = hash:@emailserver_confdir@/relocated
+-transport_maps = hash:@emailserver_confdir@/transport, ldap:@emailserver_confdir@/ldaptransport.cf
+-alias_maps = hash:@aliases_file@
+-alias_database = hash:@aliases_file@
+-#virtual_mailbox_maps = $virtual_maps
+-local_recipient_maps = $virtual_maps, $alias_maps
++#######################################################################
++#
++# For documentation see: man 5 postconf
+
+-# Don't parse and modify headers of message/rfc822 attachments
+-disable_mime_input_processing = yes
++smtpd_recipient_restrictions = permit_mynetworks,
++ permit_sasl_authenticated,
++ reject_unauth_destination,
++ reject_unlisted_recipient,
++ check_policy_service unix:private/kolabpolicy
+
+-## only use local_transport or a higher recipent_limit if issue825 is fixed
+-# local delivery, not using postfix local(8)
+-#local_transport = kolabmailboxfilter
+-# alternatively with local(8), something like
+-mailbox_transport = kolabmailboxfilter
+-# local_destination_recipient_limit = 20
++#######################################################################
++#
++# For documentation see: man 5 postconf
++
++smtpd_sender_restrictions = permit_mynetworks,
++ check_policy_service unix:private/kolabpolicy
++
++#######################################################################
++#
++# Settings for the special kolabpolicy service
++
++kolabpolicy_time_limit = 3600
++kolabpolicy_max_idle = 20
++
++#######################################################################
++# TLS
+
+-#TLS settings
+ smtpd_use_tls = yes
+ smtpd_tls_auth_only = yes
+ smtpd_starttls_timeout = 300s
+ smtpd_timeout = 300s
++smtpd_tls_cert_file = @sysconfdir@/kolab/cert.pem
++smtpd_tls_key_file = @sysconfdir@/kolab/key.pem
++smtpd_tls_loglevel = 1
++smtpd_tls_received_header = no
++smtpd_tls_session_cache_timeout = 3600s
++
++tls_random_source = dev:/dev/urandom
++
+ #smtpd_tls_CAfile = @sysconfdir@/kolab/server.pem
+ #smtpd_tls_CApath =
+ #smtpd_tls_ask_ccert = no
+ #smtpd_tls_ccert_verifydepth = 5
+-smtpd_tls_cert_file = @sysconfdir@/kolab/cert.pem
+ #smtpd_tls_cipherlist =
+ #smtpd_tls_dcert_file =
+ #smtpd_tls_dh1024_param_file =
+ #smtpd_tls_dh512_param_file =
+ #smtpd_tls_dkey_file = $smtpd_tls_dcert_file
+ #smtpd_tls_key_file = $smtpd_tls_cert_file
+-smtpd_tls_key_file = @sysconfdir@/kolab/key.pem
+-smtpd_tls_loglevel = 1
+-smtpd_tls_received_header = no
++#smtpd_tls_loglevel = 3
+ #smtpd_tls_req_ccert = no
+ #smtpd_tls_session_cache_database =
+-smtpd_tls_session_cache_timeout = 3600s
+ #smtpd_tls_wrappermode = no
+-
+-#tls_random_bytes = 32
+-tls_random_source = dev:/dev/urandom
+-#tls_daemon_random_bytes = 32
+-#tls_daemon_random_source =
+-#tls_random_exchange_name = ${config_directory}/prng_exch
+-#tls_random_prng_update_period = 60s
+-#tls_random_reseed_period = 3600s
+-
+-#smtp_starttls_timeout = 300s
+-#smtp_tls_CAfile =
+-#smtp_tls_CApath =
+-#smtp_tls_cert_file =
+-#smtp_tls_cipherlist =
+-#smtp_tls_dcert_file =
+-#smtp_tls_dkey_file = $smtp_tls_dcert_file
+ #smtp_tls_enforce_peername = yes
+-#smtp_tls_key_file = $smtp_tls_cert_file
+-#smtp_tls_loglevel = 0
+ #smtp_tls_note_starttls_offer = no
+ #smtp_tls_per_site =
+ #smtp_tls_scert_verifydepth = 5
+ #smtp_tls_session_cache_database =
+-#smtp_tls_session_cache_timeout = 3600s
+
+-# authentication via sasl
++#tls_daemon_random_bytes = 32
++#tls_daemon_random_source =
++#tls_random_bytes = 32
++#tls_random_exchange_name = ${config_directory}/prng_exch
++#tls_random_prng_update_period = 60s
++#tls_random_reseed_period = 3600s
+
+-## Kolab Policy Server
+-smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
+- reject_unauth_destination, reject_unlisted_recipient,
+- check_policy_service unix:private/kolabpolicy
+-smtpd_sender_restrictions = permit_mynetworks,
+- check_policy_service unix:private/kolabpolicy
+-kolabpolicy_time_limit = 3600
+-kolabpolicy_max_idle = 20
++#######################################################################
++# SASL
+
+-#smtpd_restriction_classes =
+ smtpd_sasl_auth_enable = yes
+-
+ # We want to allow for uids without any realm
+ #smtpd_sasl_local_domain = $myhostname
+ smtpd_sasl_local_domain =
+@@ -160,4 +407,651 @@
+ # Support broken clients like Microsoft Outlook Express 4.x which expect AUTH=LOGIN instead of AUTH LOGIN
+ broken_sasl_auth_clients = yes
+
++# Add a sasl authenticated header so that spamassassin knows the user was checked
++smtpd_sasl_authenticated_header = yes
++
++#######################################################################
++# CONTENT FILTERING
++
+ content_filter = kolabfilter
++
++#######################################################################
++## Variables from the standard postfix config file
++#######################################################################
++
++# SOFT BOUNCE
++#
++# The soft_bounce parameter provides a limited safety net for
++# testing. When soft_bounce is enabled, mail will remain queued that
++# would otherwise bounce. This parameter disables locally-generated
++# bounces, and prevents the SMTP server from rejecting mail permanently
++# (by changing 5xx replies into 4xx replies). However, soft_bounce
++# is no cure for address rewriting mistakes or mail routing mistakes.
++#
++#soft_bounce = no
++
++# LOCAL PATHNAME INFORMATION
++#
++# The queue_directory specifies the location of the Postfix queue.
++# This is also the root directory of Postfix daemons that run chrooted.
++# See the files in examples/chroot-setup for setting up Postfix chroot
++# environments on different UNIX systems.
++#
++queue_directory = @emailserver_localstatedir@
++
++# The command_directory parameter specifies the location of all
++# postXXX commands.
++#
++command_directory = @sbindir@
++
++# The daemon_directory parameter specifies the location of all Postfix
++# daemon programs (i.e. programs listed in the master.cf file). This
++# directory must be owned by root.
++#
++daemon_directory = @libdir@/postfix
++
++# QUEUE AND PROCESS OWNERSHIP
++#
++# The mail_owner parameter specifies the owner of the Postfix queue
++# and of most Postfix daemon processes. Specify the name of a user
++# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
++# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
++# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
++# USER.
++#
++mail_owner = @emailserver_mail_owner@
++
++# The default_privs parameter specifies the default rights used by
++# the local delivery agent for delivery to external file or command.
++# These rights are used in the absence of a recipient user context.
++# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
++#
++default_privs = @emailserver_default_privs@
++
++# INTERNET HOST AND DOMAIN NAMES
++#
++# The myhostname parameter specifies the internet hostname of this
++# mail system. The default is to use the fully-qualified domain name
++# from gethostname(). $myhostname is used as a default value for many
++# other configuration parameters.
++#
++myhostname = @@@fqdnhostname@@@
++#myhostname = virtual.domain.tld
++
++# The mydomain parameter specifies the local internet domain name.
++# The default is to use $myhostname minus the first component.
++# $mydomain is used as a default value for many other configuration
++# parameters.
++#
++mydomain = @@@postfix-mydomain@@@
++
++# SENDING MAIL
++#
++# The myorigin parameter specifies the domain that locally-posted
++# mail appears to come from. The default is to append $myhostname,
++# which is fine for small sites. If you run a domain with multiple
++# machines, you should (1) change this to $mydomain and (2) set up
++# a domain-wide alias database that aliases each user to
++# user@that.users.mailhost.
++#
++# For the sake of consistency between sender and recipient addresses,
++# myorigin also specifies the default domain name that is appended
++# to recipient addresses that have no @domain part.
++#
++#myorigin = $myhostname
++myorigin = $mydomain
++
++# RECEIVING MAIL
++
++# The inet_interfaces parameter specifies the network interface
++# addresses that this mail system receives mail on. By default,
++# the software claims all active interfaces on the machine. The
++# parameter also controls delivery of mail to user@[ip.address].
++#
++# See also the proxy_interfaces parameter, for network addresses that
++# are forwarded to us via a proxy or network address translator.
++#
++# Note: you need to stop/start Postfix when this parameter changes.
++#
++#inet_interfaces = all
++#inet_interfaces = $myhostname
++#inet_interfaces = $myhostname, localhost
++
++# The proxy_interfaces parameter specifies the network interface
++# addresses that this mail system receives mail on by way of a
++# proxy or network address translation unit. This setting extends
++# the address list specified with the inet_interfaces parameter.
++#
++# You must specify your proxy/NAT addresses when your system is a
++# backup MX host for other domains, otherwise mail delivery loops
++# will happen when the primary MX host is down.
++#
++#proxy_interfaces =
++#proxy_interfaces = 1.2.3.4
++
++# The mydestination parameter specifies the list of domains that this
++# machine considers itself the final destination for.
++#
++# These domains are routed to the delivery agent specified with the
++# local_transport parameter setting. By default, that is the UNIX
++# compatible delivery agent that lookups all recipients in /etc/passwd
++# and /etc/aliases or their equivalent.
++#
++# The default is $myhostname + localhost.$mydomain. On a mail domain
++# gateway, you should also include $mydomain.
++#
++# Do not specify the names of virtual domains - those domains are
++# specified elsewhere (see VIRTUAL_README).
++#
++# Do not specify the names of domains that this machine is backup MX
++# host for. Specify those names via the relay_domains settings for
++# the SMTP server, or use permit_mx_backup if you are lazy (see
++# STANDARD_CONFIGURATION_README).
++#
++# The local machine is always the final destination for mail addressed
++# to user@[the.net.work.address] of an interface that the mail system
++# receives mail on (see the inet_interfaces parameter).
++#
++# Specify a list of host or domain names, /file/name or type:table
++# patterns, separated by commas and/or whitespace. A /file/name
++# pattern is replaced by its contents; a type:table is matched when
++# a name matches a lookup key (the right-hand side is ignored).
++# Continue long lines by starting the next line with whitespace.
++#
++# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
++#
++#mydestination = $myhostname, localhost.$mydomain, localhost
++#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
++#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
++# mail.$mydomain, www.$mydomain, ftp.$mydomain
++mydestination = @@@postfix-mydestination|join( )@@@
++
++# REJECTING MAIL FOR UNKNOWN LOCAL USERS
++#
++# The local_recipient_maps parameter specifies optional lookup tables
++# with all names or addresses of users that are local with respect
++# to $mydestination, $inet_interfaces or $proxy_interfaces.
++#
++# If this parameter is defined, then the SMTP server will reject
++# mail for unknown local users. This parameter is defined by default.
++#
++# To turn off local recipient checking in the SMTP server, specify
++# local_recipient_maps = (i.e. empty).
++#
++# The default setting assumes that you use the default Postfix local
++# delivery agent for local delivery. You need to update the
++# local_recipient_maps setting if:
++#
++# - You define $mydestination domain recipients in files other than
++# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
++# For example, you define $mydestination domain recipients in
++# the $virtual_mailbox_maps files.
++#
++# - You redefine the local delivery agent in master.cf.
++#
++# - You redefine the "local_transport" setting in main.cf.
++#
++# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
++# feature of the Postfix local delivery agent (see local(8)).
++#
++# Details are described in the LOCAL_RECIPIENT_README file.
++#
++# Beware: if the Postfix SMTP server runs chrooted, you probably have
++# to access the passwd file via the proxymap service, in order to
++# overcome chroot restrictions. The alternative, having a copy of
++# the system passwd file in the chroot jail is just not practical.
++#
++# The right-hand side of the lookup tables is conveniently ignored.
++# In the left-hand side, specify a bare username, an @domain.tld
++# wild-card, or specify a user@domain.tld address.
++#
++#local_recipient_maps = unix:passwd.byname $alias_maps
++#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
++#local_recipient_maps =
++local_recipient_maps = $virtual_maps, $alias_maps
++
++# The unknown_local_recipient_reject_code specifies the SMTP server
++# response code when a recipient domain matches $mydestination or
++# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
++# and the recipient address or address local-part is not found.
++#
++# The default setting is 550 (reject mail) but it is safer to start
++# with 450 (try again later) until you are certain that your
++# local_recipient_maps settings are OK.
++#
++unknown_local_recipient_reject_code = 550
++
++# TRUST AND RELAY CONTROL
++
++# The mynetworks parameter specifies the list of "trusted" SMTP
++# clients that have more privileges than "strangers".
++#
++# In particular, "trusted" SMTP clients are allowed to relay mail
++# through Postfix. See the smtpd_recipient_restrictions parameter
++# in postconf(5).
++#
++# You can specify the list of "trusted" network addresses by hand
++# or you can let Postfix do it for you (which is the default).
++#
++# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
++# clients in the same IP subnetworks as the local machine.
++# On Linux, this does works correctly only with interfaces specified
++# with the "ifconfig" command.
++#
++# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
++# clients in the same IP class A/B/C networks as the local machine.
++# Don't do this with a dialup site - it would cause Postfix to "trust"
++# your entire provider's network. Instead, specify an explicit
++# mynetworks list by hand, as described below.
++#
++# Specify "mynetworks_style = host" when Postfix should "trust"
++# only the local machine.
++#
++#mynetworks_style = class
++#mynetworks_style = subnet
++#mynetworks_style = host
++mynetworks = @@@postfix-mynetworks|join( )@@@
++
++# Alternatively, you can specify the mynetworks list by hand, in
++# which case Postfix ignores the mynetworks_style setting.
++#
++# Specify an explicit list of network/netmask patterns, where the
++# mask specifies the number of bits in the network part of a host
++# address.
++#
++# You can also specify the absolute pathname of a pattern file instead
++# of listing the patterns here. Specify type:table for table-based lookups
++# (the value on the table right-hand side is not used).
++#
++#mynetworks = 168.100.189.0/28, 127.0.0.0/8
++#mynetworks = $config_directory/mynetworks
++#mynetworks = hash:/etc/postfix/network_table
++
++# The relay_domains parameter restricts what destinations this system will
++# relay mail to. See the smtpd_recipient_restrictions description in
++# postconf(5) for detailed information.
++#
++# By default, Postfix relays mail
++# - from "trusted" clients (IP address matches $mynetworks) to any destination,
++# - from "untrusted" clients to destinations that match $relay_domains or
++# subdomains thereof, except addresses with sender-specified routing.
++# The default relay_domains value is $mydestination.
++#
++# In addition to the above, the Postfix SMTP server by default accepts mail
++# that Postfix is final destination for:
++# - destinations that match $inet_interfaces or $proxy_interfaces,
++# - destinations that match $mydestination
++# - destinations that match $virtual_alias_domains,
++# - destinations that match $virtual_mailbox_domains.
++# These destinations do not need to be listed in $relay_domains.
++#
++# Specify a list of hosts or domains, /file/name patterns or type:name
++# lookup tables, separated by commas and/or whitespace. Continue
++# long lines by starting the next line with whitespace. A file name
++# is replaced by its contents; a type:name table is matched when a
++# (parent) domain appears as lookup key.
++#
++# NOTE: Postfix will not automatically forward mail for domains that
++# list this system as their primary or backup MX host. See the
++# permit_mx_backup restriction description in postconf(5).
++#
++#relay_domains = $mydestination
++relay_domains =
++
++# INTERNET OR INTRANET
++
++# The relayhost parameter specifies the default host to send mail to
++# when no entry is matched in the optional transport(5) table. When
++# no relayhost is given, mail is routed directly to the destination.
++#
++# On an intranet, specify the organizational domain name. If your
++# internal DNS uses no MX records, specify the name of the intranet
++# gateway host instead.
++#
++# In the case of SMTP, specify a domain, host, host:port, [host]:port,
++# [address] or [address]:port; the form [host] turns off MX lookups.
++#
++# If you're connected via UUCP, see also the default_transport parameter.
++#
++#relayhost = $mydomain
++#relayhost = [gateway.my.domain]
++#relayhost = [mailserver.isp.tld]
++#relayhost = uucphost
++#relayhost = [an.ip.add.ress]
++@@@if postfix-relayhost@@@
++@@@if postfix-relayport@@@
++relayhost = [@@@postfix-relayhost@@@]:@@@postfix-relayport@@@
++@@@else@@@
++relayhost = [@@@postfix-relayhost@@@]
++@@@endif@@@
++@@@endif@@@
++
++
++# REJECTING UNKNOWN RELAY USERS
++#
++# The relay_recipient_maps parameter specifies optional lookup tables
++# with all addresses in the domains that match $relay_domains.
++#
++# If this parameter is defined, then the SMTP server will reject
++# mail for unknown relay users. This feature is off by default.
++#
++# The right-hand side of the lookup tables is conveniently ignored.
++# In the left-hand side, specify an @domain.tld wild-card, or specify
++# a user@domain.tld address.
++#
++#relay_recipient_maps = hash:/etc/postfix/relay_recipients
++
++# INPUT RATE CONTROL
++#
++# The in_flow_delay configuration parameter implements mail input
++# flow control. This feature is turned on by default, although it
++# still needs further development (it's disabled on SCO UNIX due
++# to an SCO bug).
++#
++# A Postfix process will pause for $in_flow_delay seconds before
++# accepting a new message, when the message arrival rate exceeds the
++# message delivery rate. With the default 100 SMTP server process
++# limit, this limits the mail inflow to 100 messages a second more
++# than the number of messages delivered per second.
++#
++# Specify 0 to disable the feature. Valid delays are 0..10.
++#
++#in_flow_delay = 1s
++
++# ADDRESS REWRITING
++#
++# The ADDRESS_REWRITING_README document gives information about
++# address masquerading or other forms of address rewriting including
++# username->Firstname.Lastname mapping.
++
++# ADDRESS REDIRECTION (VIRTUAL DOMAIN)
++#
++# The VIRTUAL_README document gives information about the many forms
++# of domain hosting that Postfix supports.
++
++# "USER HAS MOVED" BOUNCE MESSAGES
++#
++# See the discussion in the ADDRESS_REWRITING_README document.
++
++# TRANSPORT MAP
++#
++# See the discussion in the ADDRESS_REWRITING_README document.
++
++# ALIAS DATABASE
++#
++# The alias_maps parameter specifies the list of alias databases used
++# by the local delivery agent. The default list is system dependent.
++#
++# On systems with NIS, the default is to search the local alias
++# database, then the NIS alias database. See aliases(5) for syntax
++# details.
++#
++# If you change the alias database, run "postalias /etc/aliases" (or
++# wherever your system stores the mail alias file), or simply run
++# "newaliases" to build the necessary DBM or DB file.
++#
++# It will take a minute or so before changes become visible. Use
++# "postfix reload" to eliminate the delay.
++#
++#alias_maps = dbm:/etc/aliases
++#alias_maps = hash:/etc/aliases
++#alias_maps = hash:/etc/aliases, nis:mail.aliases
++#alias_maps = netinfo:/aliases
++alias_maps = hash:@aliases_file@
++
++# The alias_database parameter specifies the alias database(s) that
++# are built with "newaliases" or "sendmail -bi". This is a separate
++# configuration parameter, because alias_maps (see above) may specify
++# tables that are not necessarily all under control by Postfix.
++#
++#alias_database = dbm:/etc/aliases
++#alias_database = dbm:/etc/mail/aliases
++#alias_database = hash:/etc/aliases
++#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
++alias_database = hash:@aliases_file@
++
++# DELIVERY TO MAILBOX
++#
++# The home_mailbox parameter specifies the optional pathname of a
++# mailbox file relative to a user's home directory. The default
++# mailbox file is /var/spool/mail/user or /var/mail/user. Specify
++# "Maildir/" for qmail-style delivery (the / is required).
++#
++#home_mailbox = Mailbox
++#home_mailbox = Maildir/
++
++# The mail_spool_directory parameter specifies the directory where
++# UNIX-style mailboxes are kept. The default setting depends on the
++# system type.
++#
++#mail_spool_directory = /var/mail
++#mail_spool_directory = /var/spool/mail
++
++# The mailbox_command parameter specifies the optional external
++# command to use instead of mailbox delivery. The command is run as
++# the recipient with proper HOME, SHELL and LOGNAME environment settings.
++# Exception: delivery for root is done as $default_user.
++#
++# Other environment variables of interest: USER (recipient username),
++# EXTENSION (address extension), DOMAIN (domain part of address),
++# and LOCAL (the address localpart).
++#
++# Unlike other Postfix configuration parameters, the mailbox_command
++# parameter is not subjected to $parameter substitutions. This is to
++# make it easier to specify shell syntax (see example below).
++#
++# Avoid shell meta characters because they will force Postfix to run
++# an expensive shell process. Procmail alone is expensive enough.
++#
++# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
++# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
++#
++#mailbox_command = /some/where/procmail
++#mailbox_command = /some/where/procmail -a "$EXTENSION"
++
++# The mailbox_transport specifies the optional transport in master.cf
++# to use after processing aliases and .forward files. This parameter
++# has precedence over the mailbox_command, fallback_transport and
++# luser_relay parameters.
++#
++# Specify a string of the form transport:nexthop, where transport is
++# the name of a mail delivery transport defined in master.cf. The
++# :nexthop part is optional. For more details see the sample transport
++# configuration file.
++#
++# NOTE: if you use this feature for accounts not in the UNIX password
++# file, then you must update the "local_recipient_maps" setting in
++# the main.cf file, otherwise the SMTP server will reject mail for
++# non-UNIX accounts with "User unknown in local recipient table".
++#
++#mailbox_transport = lmtp:unix:/file/name
++#mailbox_transport = cyrus
++mailbox_transport = kolabmailboxfilter
++
++# The fallback_transport specifies the optional transport in master.cf
++# to use for recipients that are not found in the UNIX passwd database.
++# This parameter has precedence over the luser_relay parameter.
++#
++# Specify a string of the form transport:nexthop, where transport is
++# the name of a mail delivery transport defined in master.cf. The
++# :nexthop part is optional. For more details see the sample transport
++# configuration file.
++#
++# NOTE: if you use this feature for accounts not in the UNIX password
++# file, then you must update the "local_recipient_maps" setting in
++# the main.cf file, otherwise the SMTP server will reject mail for
++# non-UNIX accounts with "User unknown in local recipient table".
++#
++#fallback_transport = lmtp:unix:/file/name
++#fallback_transport = cyrus
++#fallback_transport =
++
++# The luser_relay parameter specifies an optional destination address
++# for unknown recipients. By default, mail for unknown@$mydestination,
++# unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
++# as undeliverable.
++#
++# The following expansions are done on luser_relay: $user (recipient
++# username), $shell (recipient shell), $home (recipient home directory),
++# $recipient (full recipient address), $extension (recipient address
++# extension), $domain (recipient domain), $local (entire recipient
++# localpart), $recipient_delimiter. Specify ${name?value} or
++# ${name:value} to expand value only when $name does (does not) exist.
++#
++# luser_relay works only for the default Postfix local delivery agent.
++#
++# NOTE: if you use this feature for accounts not in the UNIX password
++# file, then you must specify "local_recipient_maps =" (i.e. empty) in
++# the main.cf file, otherwise the SMTP server will reject mail for
++# non-UNIX accounts with "User unknown in local recipient table".
++#
++#luser_relay = $user@other.host
++#luser_relay = $local@other.host
++#luser_relay = admin+$local
++
++# JUNK MAIL CONTROLS
++#
++# The controls listed here are only a very small subset. The file
++# SMTPD_ACCESS_README provides an overview.
++
++# The header_checks parameter specifies an optional table with patterns
++# that each logical message header is matched against, including
++# headers that span multiple physical lines.
++#
++# By default, these patterns also apply to MIME headers and to the
++# headers of attached messages. With older Postfix versions, MIME and
++# attached message headers were treated as body text.
++#
++# For details, see "man header_checks".
++#
++#header_checks = regexp:/etc/postfix/header_checks
++
++# Don't parse and modify headers of message/rfc822 attachments
++disable_mime_input_processing = yes
++
++# FAST ETRN SERVICE
++#
++# Postfix maintains per-destination logfiles with information about
++# deferred mail, so that mail can be flushed quickly with the SMTP
++# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
++# See the ETRN_README document for a detailed description.
++#
++# The fast_flush_domains parameter controls what destinations are
++# eligible for this service. By default, they are all domains that
++# this server is willing to relay mail to.
++#
++#fast_flush_domains = $relay_domains
++
++# SHOW SOFTWARE VERSION OR NOT
++#
++# The smtpd_banner parameter specifies the text that follows the 220
++# code in the SMTP server's greeting banner. Some people like to see
++# the mail version advertised. By default, Postfix shows no version.
++#
++# You MUST specify $myhostname at the start of the text. That is an
++# RFC requirement. Postfix itself does not care.
++#
++#smtpd_banner = $myhostname ESMTP $mail_name
++#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
++
++# PARALLEL DELIVERY TO THE SAME DESTINATION
++#
++# How many parallel deliveries to the same user or domain? With local
++# delivery, it does not make sense to do massively parallel delivery
++# to the same user, because mailbox updates must happen sequentially,
++# and expensive pipelines in .forward files can cause disasters when
++# too many are run at the same time. With SMTP deliveries, 10
++# simultaneous connections to the same domain could be sufficient to
++# raise eyebrows.
++#
++# Each message delivery transport has its XXX_destination_concurrency_limit
++# parameter. The default is $default_destination_concurrency_limit for
++# most delivery transports. For the local delivery agent the default is 2.
++
++#local_destination_concurrency_limit = 2
++#default_destination_concurrency_limit = 20
++
++# DEBUGGING CONTROL
++#
++# The debug_peer_level parameter specifies the increment in verbose
++# logging level when an SMTP client or server host name or address
++# matches a pattern in the debug_peer_list parameter.
++#
++debug_peer_level = 2
++
++# The debug_peer_list parameter specifies an optional list of domain
++# or network patterns, /file/name patterns or type:name tables. When
++# an SMTP client or server host name or address matches a pattern,
++# increase the verbose logging level by the amount specified in the
++# debug_peer_level parameter.
++#
++#debug_peer_list = 127.0.0.1
++#debug_peer_list = some.domain
++
++# The debugger_command specifies the external command that is executed
++# when a Postfix daemon program is run with the -D option.
++#
++# Use "command .. & sleep 5" so that the debugger can attach before
++# the process marches on. If you use an X-based debugger, be sure to
++# set up your XAUTHORITY environment variable before starting Postfix.
++#
++debugger_command =
++ PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
++ xxgdb $daemon_directory/$process_name $process_id & sleep 5
++
++# If you can't use X, use this to capture the call stack when a
++# daemon crashes. The result is in a file in the configuration
++# directory, and is named after the process name and the process ID.
++#
++# debugger_command =
++# PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
++# echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
++# >$config_directory/$process_name.$process_id.log & sleep 5
++#
++# Another possibility is to run gdb under a detached screen session.
++# To attach to the screen sesssion, su root and run "screen -r
++# <id_string>" where <id_string> uniquely matches one of the detached
++# sessions (from "screen -list").
++#
++# debugger_command =
++# PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
++# -dmS $process_name gdb $daemon_directory/$process_name
++# $process_id & sleep 1
++
++# INSTALL-TIME CONFIGURATION INFORMATION
++#
++# The following parameters are used when installing a new Postfix version.
++#
++# sendmail_path: The full pathname of the Postfix sendmail command.
++# This is the Sendmail-compatible mail posting interface.
++#
++sendmail_path = /usr/sbin/sendmail
++
++# newaliases_path: The full pathname of the Postfix newaliases command.
++# This is the Sendmail-compatible command to build alias databases.
++#
++newaliases_path = /usr/bin/newaliases
++
++# mailq_path: The full pathname of the Postfix mailq command. This
++# is the Sendmail-compatible mail queue listing command.
++#
++mailq_path = /usr/bin/mailq
++
++# setgid_group: The group for mail submission and queue management
++# commands. This must be a group name with a numerical group ID that
++# is not shared with other accounts, not even with the Postfix account.
++#
++setgid_group = @emailserver_setgid_grp@
++
++# html_directory: The location of the Postfix HTML documentation.
++#
++html_directory = /usr/share/doc/postfix-2.4.3/html
++
++# manpage_directory: The location of the Postfix on-line manual pages.
++#
++manpage_directory = /usr/share/man
++
++# readme_directory: The location of the Postfix README files.
++#
++readme_directory = /usr/share/doc/postfix-2.4.3/readme
++home_mailbox = .maildir/
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch
new file mode 100644
index 0000000..ccec368
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_main.cf.template.in-use-mailman-2.1.patch
@@ -0,0 +1,1142 @@
+--- kolabd/kolabd/templates/main.cf.template.in 2007-06-26 12:24:36.339282750 +0200
++++ kolabd/kolabd/templates/main.cf.template.in.mailman.gentoo 2007-07-26 09:45:20.454688750 +0200
+@@ -14,143 +14,392 @@
+ # this file is automatically written by the Kolab config backend
+ # manual additions are lost unless made to the template in the Kolab config directory
+
++# Global Postfix configuration file. This file lists only a subset
++# of all 300+ parameters. See the postconf(5) manual page for a
++# complete list.
++#
++# The general format of each line is: parameter = value. Lines
++# that begin with whitespace continue the previous line. A value can
++# contain references to other $names or ${name}s.
++#
++# NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF
++# POSTFIX STILL WORKS AFTER EVERY CHANGE.
++
++# MODIFIED by Gunnar Wrobel <wrobel@pardus.de> for Gentoo
++# (modified some parameters and added the comments back
++# in for my own reference)
++
++#######################################################################
++## Variables added by Kolab
++#######################################################################
++
++#######################################################################
++# MESSAGE SIZE
++
++#######################################################################
++# The maximal size in bytes of a message, including envelope
++# information.
++#
++# Postfix default is 10 240 000 Byte = 10.24 Megabyte,
++# We use 20 Mebibyte = 20*2^20 Byte
+
+-# postfix default is 10 240 000 Byte = 10.24 Megabyte,
+-# we use 20 Mebibyte = 20*2^20 Byte
+ message_size_limit = 20971520
+
+-# paths
+-command_directory = @sbindir@
+-daemon_directory = @libexecdir@/postfix
+-queue_directory = @emailserver_localstatedir@
++# ADDRESS EXTENSIONS (e.g., user+foo)
++#
++# The recipient_delimiter parameter specifies the separator between
++# user names and address extensions (user+foo). See canonical(5),
++# local(8), relocated(5) and virtual(5) for the effects this has on
++# aliases, canonical, virtual, relocated and .forward file lookups.
++# Basically, the software tries user+foo and .forward+foo before
++# trying user and .forward.
++#
++# COMMENT: It apparently matters where this statement occurs. See commit
++# http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/kolabd/kolabd/templates/main.cf.template.in.diff?r1=1.10&r2=1.11
++# -- Gunnar Wrobel ,03.10.2006
++#
++#recipient_delimiter = +
++recipient_delimiter = +
+
+-# users
+-mail_owner= @emailserver_mail_owner@
+-setgid_group= @emailserver_setgid_grp@
+-default_privs= @emailserver_default_privs@
++# null_sender=replacement (default: MAILER-DAEMON)
++# Replace the null sender address, which is typically
++# used for delivery status notifications, with the
++# specified text when expanding the $sender command-
++# line macro, and when generating a From_ or Return-
++# Path: message header.
++#
++# If the null sender replacement text is a non-empty
++# string then it is affected by the q flag for
++# address quoting in command-line arguments.
++#
++# The null sender replacement text may be empty; this
++# form is recommended for content filters that feed
++# mail back into Postfix. The empty sender address is
++# not affected by the q flag for address quoting in
++# command-line arguments.
++#
++# Caution: a null sender address is easily mis-parsed
++# by naive software. For example, when the [13]pipe(8)
++# daemon executes a command such as:
++#
++# command -f$sender -- $recipient (bad)
++#
++# the command will mis-parse the -f option value when
++# the sender address is a null string. For correct
++# parsing, specify $sender as an argument by itself:
++#
++# command -f $sender -- $recipient (good)
++#
++# This feature is available with Postfix 2.3 and
++# later.
++#
++# COMMENT: This feature replaces the old "allow empty sender"
++# patch
++# -- Gunnar Wrobel ,03.10.2006
++#
++null_sender =
+
+-# local host
+-myhostname = @@@fqdnhostname@@@
+-mydomain = @@@postfix-mydomain@@@
+-myorigin = $mydomain
+-@@@if postfix-relayhost@@@
++#######################################################################
++# MAPS
+
+-# Postfix Relay Host
++#######################################################################
+ #
+-# Check if there is also a relayport otherwise put the default
+-@@@if postfix-relayport@@@
+-relayhost = [@@@postfix-relayhost@@@]:@@@postfix-relayport@@@
+-@@@else@@@
+-relayhost = [@@@postfix-relayhost@@@]
+-@@@endif@@@
+-@@@endif@@@
+-
+-#
+-masquerade_domains = @@@postfix-mydestination|join( )@@@
+-# Kolab Server does _not_ want to forward to local machines by default,
+-# so we can add "envelope_recipient" to masquerade_classes:
+-masquerade_classes = envelope_sender, envelope_recipient,
+- header_sender, header_recipient
++# Optional lookup tables with a) names of domains for which all
++# addresses are aliased to addresses in other local or remote domains,
++# and b) addresses that are aliased to addresses in other local or
++# remote domains.
++#
++# Available before Postfix version 2.0. With Postfix 2.0 and later,
++# this is replaced by separate controls:
++# virtual_alias_domains and virtual_alias_maps.
+
+-# smtp daemon
+-#smtpd_banner = $myhostname ESMTP $mail_name
+-#inet_interfaces = 127.0.0.1
++virtual_maps = hash:@emailserver_confdir@/virtual,
++ ldap:@emailserver_confdir@/ldapdistlist.cf,
++ ldap:@emailserver_confdir@/ldapvirtual.cf,
++ pcre:@emailserver_confdir@/kolabvirtual,
++ regexp:@emailserver_confdir@/mailman-regexp
+
+-# relaying
+-mynetworks = @@@postfix-mynetworks|join( )@@@
+-mydestination = @@@postfix-mydestination|join( )@@@
+-relay_domains =
+-#smtpd_recipient_restrictions = permit_mynetworks,
+-# check_client_access hash:@emailserver_confdir@/access,
+-# check_relay_domains
++#######################################################################
++#
++# Optional lookup tables with all valid addresses in the domains that
++# match $virtual_mailbox_domains.
++#
++# In a lookup table, specify a left-hand side of "@domain.tld" to match
++# any user in the specified domain that does not have a specific
++# "user@domain.tld" entry.
++#
++# The virtual(8) delivery agent uses this table to look up the
++# per-recipient mailbox or maildir pathname. If the lookup result ends
++# in a slash ("/"), maildir-style delivery is carried out, otherwise the
++# path is assumed to specify a UNIX-style mailbox file. Note
++# that $virtual_mailbox_base is unconditionally prepended to this path.
++#
++# When a recipient address has an optional address extension
++# (user+foo@domain.tld), the virtual(8) delivery agent looks up the
++# full address first, and when the lookup fails, it looks up the
++# unextended address (user@domain.tld).
++#
++# Note 1: for security reasons, the virtual(8) delivery agent disallows
++# regular expression substitution of $1 etc. in regular expression
++# lookup tables, because that would open a security hole.
++#
++# Note 2: for security reasons, the virtual(8) delivery agent will
++# silently ignore requests to use the proxymap(8) server. Instead it
++# will open the table directly. Before Postfix version 2.2, the
++# virtual(8) delivery agent will terminate with a fatal error.
+
++#virtual_mailbox_maps = $virtual_maps
+
+-recipient_delimiter = +
++#######################################################################
++#
++# Optional address mapping lookup tables for message headers and
++# envelopes. The mapping is applied to both sender and recipient
++# addresses, in both envelopes and in headers, as controlled
++# with the canonical_classes parameter. This is typically used to
++# clean up dirty addresses from legacy mail systems, or to replace
++# login names by Firstname.Lastname. The table format and lookups
++# are documented in canonical(5). For an overview of Postfix address
++# manipulations see the ADDRESS_REWRITING_README document.
++#
++# If you use this feature, run "postmap /etc/postfix/canonical" to
++# build the necessary DBM or DB file after every change. The changes
++# will become visible after a minute or so. Use "postfix reload" to
++# eliminate the delay.
++#
++# Note: with Postfix version 2.2, message header address mapping
++# happens only when message header address rewriting is enabled:
++#
++# o The message is received with the Postfix sendmail(1) command,
++#
++# o The message is received from a network client that matches
++# $local_header_rewrite_clients,
++#
++# o The message is received from the network, and the
++# remote_header_rewrite_domain parameter specifies a non-empty
++# value.
++#
++# To get the behavior before Postfix 2.2, specify
++# "local_header_rewrite_clients = static:all".
++#
++# canonical_maps = dbm:/etc/postfix/canonical
++# canonical_maps = hash:/etc/postfix/canonical
+
+-# maps
+ canonical_maps = hash:@emailserver_confdir@/canonical
+-virtual_maps = hash:@emailserver_confdir@/virtual,
+- ldap:@emailserver_confdir@/ldapdistlist.cf,
+- ldap:@emailserver_confdir@/ldapvirtual.cf
++
++#######################################################################
++#
++# Optional lookup tables with new contact information for users or
++# domains that no longer exist. The table format and lookups are
++# documented in relocated(5).
++#
++# If you use this feature, run "postmap /etc/postfix/relocated" to
++# build the necessary DBM or DB file after change, then "postfix
++# reload" to make the changes visible.
++#
++# Examples:
++#
++# relocated_maps = dbm:/etc/postfix/relocated
++# relocated_maps = hash:/etc/postfix/relocated
++
+ relocated_maps = hash:@emailserver_confdir@/relocated
+-transport_maps = hash:@emailserver_confdir@/transport, ldap:@emailserver_confdir@/ldaptransport.cf
+-alias_maps = hash:@aliases_file@
+-alias_database = hash:@aliases_file@
+-#virtual_mailbox_maps = $virtual_maps
+-local_recipient_maps = $virtual_maps, $alias_maps
+
+-# Don't parse and modify headers of message/rfc822 attachments
+-disable_mime_input_processing = yes
++#######################################################################
++#
++# Optional lookup tables with mappings from recipient address to
++# (message delivery transport, next-hop destination). See transport(5)
++# for details.
++#
++# Specify zero or more "type:table" lookup tables. If you use this
++# feature with local files, run "postmap /etc/postfix/transport" after
++# making a change.
++#
++# Examples:
++#
++# transport_maps = dbm:/etc/postfix/transport
++# transport_maps = hash:/etc/postfix/transport
++
++transport_maps = hash:@emailserver_confdir@/transport,
++ ldap:@emailserver_confdir@/ldaptransport.cf
++
++#######################################################################
++# MASQERADING
++
++#######################################################################
++#
++# Optional list of domains whose subdomain structure will be stripped
++# off in email addresses.
++#
++# The list is processed left to right, and processing stops at the
++# first match. Thus,
++#
++# masquerade_domains = foo.example.com example.com
++#
++# strips "user@any.thing.foo.example.com" to "user@foo.example.com",
++# but strips "user@any.thing.else.example.com" to "user@example.com".
++#
++# A domain name prefixed with ! means do not masquerade this domain
++# or its subdomains. Thus,
++#
++# masquerade_domains = !foo.example.com example.com
++#
++# does not change "user@any.thing.foo.example.com" or
++# "user@foo.example.com", but strips
++# "user@any.thing.else.example.com" to "user@example.com".
++#
++# Note: with Postfix version 2.2, message header address masquerading
++# happens only when message header address rewriting is enabled:
++#
++# o The message is received with the Postfix sendmail(1) command,
++#
++# o The message is received from a network client that matches
++# $local_header_rewrite_clients,
++#
++# o The message is received from the network, and the
++# remote_header_rewrite_domain parameter specifies a non-empty value.
++#
++# To get the behavior before Postfix 2.2, specify
++# "local_header_rewrite_clients = static:all".
++#
++# Example:
++#
++# masquerade_domains = $mydomain
++
++masquerade_domains = lists.@@@postfix-mydestination|join( lists.)@@@
++ @@@postfix-mydestination|join( )@@@
++
++#######################################################################
++#
++# Optional list of user names that are not subjected to address
++# masquerading, even when their address matches $masquerade_domains.
++#
++# By default, address masquerading makes no exceptions.
++#
++# Specify a list of user names, "/file/name" or "type:table"
++# patterns, separated by commas and/or white-space. The list is matched
++# left to right, and the search stops on the first match. Specify
++# "!name" to exclude a name from the list. A "/file/name" pattern is
++# replaced by its contents; a "type:table" lookup table is matched when
++# a name matches a lookup key (the lookup result is ignored). Continue
++# long lines by starting the next line with whitespace.
++#
++# Examples:
++#
++# masquerade_exceptions = root, mailer-daemon
++# masquerade_exceptions = root
++
++# masquerade_exceptions = root
++
++#######################################################################
++# Kolab Server does _not_ want to forward to local machines by
++# default, so we can add "envelope_recipient" to
++# masquerade_classes:
++
++masquerade_classes = envelope_sender, envelope_recipient,
++ header_sender, header_recipient
++
++#######################################################################
++# TRANSPORT
++
++#######################################################################
++#
++# The default mail delivery transport for domains that match
++# $mydestination, $inet_interfaces or $proxy_interfaces. This
++# information can be overruled with the transport(5) table.
++#
++# By default, local mail is delivered to the transport called "local",
++# which is just the name of a service that is defined the master.cf file.
++#
++# Specify a string of the form transport:nexthop, where transport is
++# the name of a mail delivery transport defined in master.cf. The
++# :nexthop part is optional. For more details see the transport(5)
++# manual page.
++#
++# Beware: if you override the default local delivery agent then
++# you need to review the LOCAL_RECIPIENT_README document, otherwise
++# the SMTP server may reject mail for local recipients.
++
++# COMMENT: only use local_transport or a higher recipent_limit if issue825 is fixed
++# http://kolab.org/cgi-bin/viewcvs-kolab.cgi/server/kolabd/kolabd/templates/main.cf.template.in.diff?r1=1.11&r2=1.12
++# -- Bernhard Reiter ,27.09.2006
+
+-## only use local_transport or a higher recipent_limit if issue825 is fixed
+-# local delivery, not using postfix local(8)
+ #local_transport = kolabmailboxfilter
+-# alternatively with local(8), something like
+-mailbox_transport = kolabmailboxfilter
+-# local_destination_recipient_limit = 20
+
+-#TLS settings
++#######################################################################
++# RELAYING
++##
++## Kolab Policy Server
++##
++
++#######################################################################
++#
++# For documentation see: man 5 postconf
++
++smtpd_recipient_restrictions = permit_mynetworks,
++ permit_sasl_authenticated,
++ reject_unauth_destination,
++ reject_unlisted_recipient,
++ check_policy_service unix:private/kolabpolicy
++
++#######################################################################
++#
++# For documentation see: man 5 postconf
++
++smtpd_sender_restrictions = permit_mynetworks,
++ check_policy_service unix:private/kolabpolicy
++
++#######################################################################
++#
++# Settings for the special kolabpolicy service
++
++kolabpolicy_time_limit = 3600
++kolabpolicy_max_idle = 20
++
++#######################################################################
++# TLS
++
+ smtpd_use_tls = yes
+ smtpd_tls_auth_only = yes
+ smtpd_starttls_timeout = 300s
+ smtpd_timeout = 300s
++smtpd_tls_cert_file = @sysconfdir@/kolab/cert.pem
++smtpd_tls_key_file = @sysconfdir@/kolab/key.pem
++smtpd_tls_loglevel = 1
++smtpd_tls_received_header = no
++smtpd_tls_session_cache_timeout = 3600s
++
++tls_random_source = dev:/dev/urandom
++
+ #smtpd_tls_CAfile = @sysconfdir@/kolab/server.pem
+ #smtpd_tls_CApath =
+ #smtpd_tls_ask_ccert = no
+ #smtpd_tls_ccert_verifydepth = 5
+-smtpd_tls_cert_file = @sysconfdir@/kolab/cert.pem
+ #smtpd_tls_cipherlist =
+ #smtpd_tls_dcert_file =
+ #smtpd_tls_dh1024_param_file =
+ #smtpd_tls_dh512_param_file =
+ #smtpd_tls_dkey_file = $smtpd_tls_dcert_file
+ #smtpd_tls_key_file = $smtpd_tls_cert_file
+-smtpd_tls_key_file = @sysconfdir@/kolab/key.pem
+-smtpd_tls_loglevel = 1
+-smtpd_tls_received_header = no
++#smtpd_tls_loglevel = 3
+ #smtpd_tls_req_ccert = no
+ #smtpd_tls_session_cache_database =
+-smtpd_tls_session_cache_timeout = 3600s
+ #smtpd_tls_wrappermode = no
+-
+-#tls_random_bytes = 32
+-tls_random_source = dev:/dev/urandom
+-#tls_daemon_random_bytes = 32
+-#tls_daemon_random_source =
+-#tls_random_exchange_name = ${config_directory}/prng_exch
+-#tls_random_prng_update_period = 60s
+-#tls_random_reseed_period = 3600s
+-
+-#smtp_starttls_timeout = 300s
+-#smtp_tls_CAfile =
+-#smtp_tls_CApath =
+-#smtp_tls_cert_file =
+-#smtp_tls_cipherlist =
+-#smtp_tls_dcert_file =
+-#smtp_tls_dkey_file = $smtp_tls_dcert_file
+ #smtp_tls_enforce_peername = yes
+-#smtp_tls_key_file = $smtp_tls_cert_file
+-#smtp_tls_loglevel = 0
+ #smtp_tls_note_starttls_offer = no
+ #smtp_tls_per_site =
+ #smtp_tls_scert_verifydepth = 5
+ #smtp_tls_session_cache_database =
+-#smtp_tls_session_cache_timeout = 3600s
+
+-# authentication via sasl
++#tls_daemon_random_bytes = 32
++#tls_daemon_random_source =
++#tls_random_bytes = 32
++#tls_random_exchange_name = ${config_directory}/prng_exch
++#tls_random_prng_update_period = 60s
++#tls_random_reseed_period = 3600s
+
+-## Kolab Policy Server
+-smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
+- reject_unauth_destination, reject_unlisted_recipient,
+- check_policy_service unix:private/kolabpolicy
+-smtpd_sender_restrictions = permit_mynetworks,
+- check_policy_service unix:private/kolabpolicy
+-kolabpolicy_time_limit = 3600
+-kolabpolicy_max_idle = 20
++#######################################################################
++# SASL
+
+-#smtpd_restriction_classes =
+ smtpd_sasl_auth_enable = yes
+-
+ # We want to allow for uids without any realm
+ #smtpd_sasl_local_domain = $myhostname
+ smtpd_sasl_local_domain =
+@@ -160,4 +409,653 @@
+ # Support broken clients like Microsoft Outlook Express 4.x which expect AUTH=LOGIN instead of AUTH LOGIN
+ broken_sasl_auth_clients = yes
+
++# Add a sasl authenticated header so that spamassassin knows the user was checked
++smtpd_sasl_authenticated_header = yes
++
++#######################################################################
++# CONTENT FILTERING
++
+ content_filter = kolabfilter
++
++#######################################################################
++## Variables from the standard postfix config file
++#######################################################################
++
++# SOFT BOUNCE
++#
++# The soft_bounce parameter provides a limited safety net for
++# testing. When soft_bounce is enabled, mail will remain queued that
++# would otherwise bounce. This parameter disables locally-generated
++# bounces, and prevents the SMTP server from rejecting mail permanently
++# (by changing 5xx replies into 4xx replies). However, soft_bounce
++# is no cure for address rewriting mistakes or mail routing mistakes.
++#
++#soft_bounce = no
++
++# LOCAL PATHNAME INFORMATION
++#
++# The queue_directory specifies the location of the Postfix queue.
++# This is also the root directory of Postfix daemons that run chrooted.
++# See the files in examples/chroot-setup for setting up Postfix chroot
++# environments on different UNIX systems.
++#
++queue_directory = @emailserver_localstatedir@
++
++# The command_directory parameter specifies the location of all
++# postXXX commands.
++#
++command_directory = @sbindir@
++
++# The daemon_directory parameter specifies the location of all Postfix
++# daemon programs (i.e. programs listed in the master.cf file). This
++# directory must be owned by root.
++#
++daemon_directory = @libdir@/postfix
++
++# QUEUE AND PROCESS OWNERSHIP
++#
++# The mail_owner parameter specifies the owner of the Postfix queue
++# and of most Postfix daemon processes. Specify the name of a user
++# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
++# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In
++# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
++# USER.
++#
++mail_owner = @emailserver_mail_owner@
++
++# The default_privs parameter specifies the default rights used by
++# the local delivery agent for delivery to external file or command.
++# These rights are used in the absence of a recipient user context.
++# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
++#
++default_privs = @emailserver_default_privs@
++
++# INTERNET HOST AND DOMAIN NAMES
++#
++# The myhostname parameter specifies the internet hostname of this
++# mail system. The default is to use the fully-qualified domain name
++# from gethostname(). $myhostname is used as a default value for many
++# other configuration parameters.
++#
++myhostname = @@@fqdnhostname@@@
++#myhostname = virtual.domain.tld
++
++# The mydomain parameter specifies the local internet domain name.
++# The default is to use $myhostname minus the first component.
++# $mydomain is used as a default value for many other configuration
++# parameters.
++#
++mydomain = @@@postfix-mydomain@@@
++
++# SENDING MAIL
++#
++# The myorigin parameter specifies the domain that locally-posted
++# mail appears to come from. The default is to append $myhostname,
++# which is fine for small sites. If you run a domain with multiple
++# machines, you should (1) change this to $mydomain and (2) set up
++# a domain-wide alias database that aliases each user to
++# user@that.users.mailhost.
++#
++# For the sake of consistency between sender and recipient addresses,
++# myorigin also specifies the default domain name that is appended
++# to recipient addresses that have no @domain part.
++#
++#myorigin = $myhostname
++myorigin = $mydomain
++
++# RECEIVING MAIL
++
++# The inet_interfaces parameter specifies the network interface
++# addresses that this mail system receives mail on. By default,
++# the software claims all active interfaces on the machine. The
++# parameter also controls delivery of mail to user@[ip.address].
++#
++# See also the proxy_interfaces parameter, for network addresses that
++# are forwarded to us via a proxy or network address translator.
++#
++# Note: you need to stop/start Postfix when this parameter changes.
++#
++#inet_interfaces = all
++#inet_interfaces = $myhostname
++#inet_interfaces = $myhostname, localhost
++
++# The proxy_interfaces parameter specifies the network interface
++# addresses that this mail system receives mail on by way of a
++# proxy or network address translation unit. This setting extends
++# the address list specified with the inet_interfaces parameter.
++#
++# You must specify your proxy/NAT addresses when your system is a
++# backup MX host for other domains, otherwise mail delivery loops
++# will happen when the primary MX host is down.
++#
++#proxy_interfaces =
++#proxy_interfaces = 1.2.3.4
++
++# The mydestination parameter specifies the list of domains that this
++# machine considers itself the final destination for.
++#
++# These domains are routed to the delivery agent specified with the
++# local_transport parameter setting. By default, that is the UNIX
++# compatible delivery agent that lookups all recipients in /etc/passwd
++# and /etc/aliases or their equivalent.
++#
++# The default is $myhostname + localhost.$mydomain. On a mail domain
++# gateway, you should also include $mydomain.
++#
++# Do not specify the names of virtual domains - those domains are
++# specified elsewhere (see VIRTUAL_README).
++#
++# Do not specify the names of domains that this machine is backup MX
++# host for. Specify those names via the relay_domains settings for
++# the SMTP server, or use permit_mx_backup if you are lazy (see
++# STANDARD_CONFIGURATION_README).
++#
++# The local machine is always the final destination for mail addressed
++# to user@[the.net.work.address] of an interface that the mail system
++# receives mail on (see the inet_interfaces parameter).
++#
++# Specify a list of host or domain names, /file/name or type:table
++# patterns, separated by commas and/or whitespace. A /file/name
++# pattern is replaced by its contents; a type:table is matched when
++# a name matches a lookup key (the right-hand side is ignored).
++# Continue long lines by starting the next line with whitespace.
++#
++# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
++#
++#mydestination = $myhostname, localhost.$mydomain, localhost
++#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
++#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
++# mail.$mydomain, www.$mydomain, ftp.$mydomain
++mydestination = @@@postfix-mydestination|join(, )@@@,
++ lists.@@@postfix-mydestination|join(, lists.)@@@
++
++# REJECTING MAIL FOR UNKNOWN LOCAL USERS
++#
++# The local_recipient_maps parameter specifies optional lookup tables
++# with all names or addresses of users that are local with respect
++# to $mydestination, $inet_interfaces or $proxy_interfaces.
++#
++# If this parameter is defined, then the SMTP server will reject
++# mail for unknown local users. This parameter is defined by default.
++#
++# To turn off local recipient checking in the SMTP server, specify
++# local_recipient_maps = (i.e. empty).
++#
++# The default setting assumes that you use the default Postfix local
++# delivery agent for local delivery. You need to update the
++# local_recipient_maps setting if:
++#
++# - You define $mydestination domain recipients in files other than
++# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
++# For example, you define $mydestination domain recipients in
++# the $virtual_mailbox_maps files.
++#
++# - You redefine the local delivery agent in master.cf.
++#
++# - You redefine the "local_transport" setting in main.cf.
++#
++# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
++# feature of the Postfix local delivery agent (see local(8)).
++#
++# Details are described in the LOCAL_RECIPIENT_README file.
++#
++# Beware: if the Postfix SMTP server runs chrooted, you probably have
++# to access the passwd file via the proxymap service, in order to
++# overcome chroot restrictions. The alternative, having a copy of
++# the system passwd file in the chroot jail is just not practical.
++#
++# The right-hand side of the lookup tables is conveniently ignored.
++# In the left-hand side, specify a bare username, an @domain.tld
++# wild-card, or specify a user@domain.tld address.
++#
++#local_recipient_maps = unix:passwd.byname $alias_maps
++#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
++#local_recipient_maps =
++local_recipient_maps = $virtual_maps, $alias_maps
++
++# The unknown_local_recipient_reject_code specifies the SMTP server
++# response code when a recipient domain matches $mydestination or
++# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty
++# and the recipient address or address local-part is not found.
++#
++# The default setting is 550 (reject mail) but it is safer to start
++# with 450 (try again later) until you are certain that your
++# local_recipient_maps settings are OK.
++#
++unknown_local_recipient_reject_code = 550
++
++# TRUST AND RELAY CONTROL
++
++# The mynetworks parameter specifies the list of "trusted" SMTP
++# clients that have more privileges than "strangers".
++#
++# In particular, "trusted" SMTP clients are allowed to relay mail
++# through Postfix. See the smtpd_recipient_restrictions parameter
++# in postconf(5).
++#
++# You can specify the list of "trusted" network addresses by hand
++# or you can let Postfix do it for you (which is the default).
++#
++# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
++# clients in the same IP subnetworks as the local machine.
++# On Linux, this does works correctly only with interfaces specified
++# with the "ifconfig" command.
++#
++# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
++# clients in the same IP class A/B/C networks as the local machine.
++# Don't do this with a dialup site - it would cause Postfix to "trust"
++# your entire provider's network. Instead, specify an explicit
++# mynetworks list by hand, as described below.
++#
++# Specify "mynetworks_style = host" when Postfix should "trust"
++# only the local machine.
++#
++#mynetworks_style = class
++#mynetworks_style = subnet
++#mynetworks_style = host
++mynetworks = @@@postfix-mynetworks|join( )@@@
++
++# Alternatively, you can specify the mynetworks list by hand, in
++# which case Postfix ignores the mynetworks_style setting.
++#
++# Specify an explicit list of network/netmask patterns, where the
++# mask specifies the number of bits in the network part of a host
++# address.
++#
++# You can also specify the absolute pathname of a pattern file instead
++# of listing the patterns here. Specify type:table for table-based lookups
++# (the value on the table right-hand side is not used).
++#
++#mynetworks = 168.100.189.0/28, 127.0.0.0/8
++#mynetworks = $config_directory/mynetworks
++#mynetworks = hash:/etc/postfix/network_table
++
++# The relay_domains parameter restricts what destinations this system will
++# relay mail to. See the smtpd_recipient_restrictions description in
++# postconf(5) for detailed information.
++#
++# By default, Postfix relays mail
++# - from "trusted" clients (IP address matches $mynetworks) to any destination,
++# - from "untrusted" clients to destinations that match $relay_domains or
++# subdomains thereof, except addresses with sender-specified routing.
++# The default relay_domains value is $mydestination.
++#
++# In addition to the above, the Postfix SMTP server by default accepts mail
++# that Postfix is final destination for:
++# - destinations that match $inet_interfaces or $proxy_interfaces,
++# - destinations that match $mydestination
++# - destinations that match $virtual_alias_domains,
++# - destinations that match $virtual_mailbox_domains.
++# These destinations do not need to be listed in $relay_domains.
++#
++# Specify a list of hosts or domains, /file/name patterns or type:name
++# lookup tables, separated by commas and/or whitespace. Continue
++# long lines by starting the next line with whitespace. A file name
++# is replaced by its contents; a type:name table is matched when a
++# (parent) domain appears as lookup key.
++#
++# NOTE: Postfix will not automatically forward mail for domains that
++# list this system as their primary or backup MX host. See the
++# permit_mx_backup restriction description in postconf(5).
++#
++#relay_domains = $mydestination
++relay_domains =
++
++# INTERNET OR INTRANET
++
++# The relayhost parameter specifies the default host to send mail to
++# when no entry is matched in the optional transport(5) table. When
++# no relayhost is given, mail is routed directly to the destination.
++#
++# On an intranet, specify the organizational domain name. If your
++# internal DNS uses no MX records, specify the name of the intranet
++# gateway host instead.
++#
++# In the case of SMTP, specify a domain, host, host:port, [host]:port,
++# [address] or [address]:port; the form [host] turns off MX lookups.
++#
++# If you're connected via UUCP, see also the default_transport parameter.
++#
++#relayhost = $mydomain
++#relayhost = [gateway.my.domain]
++#relayhost = [mailserver.isp.tld]
++#relayhost = uucphost
++#relayhost = [an.ip.add.ress]
++@@@if postfix-relayhost@@@
++@@@if postfix-relayport@@@
++relayhost = [@@@postfix-relayhost@@@]:@@@postfix-relayport@@@
++@@@else@@@
++relayhost = [@@@postfix-relayhost@@@]
++@@@endif@@@
++@@@endif@@@
++
++
++# REJECTING UNKNOWN RELAY USERS
++#
++# The relay_recipient_maps parameter specifies optional lookup tables
++# with all addresses in the domains that match $relay_domains.
++#
++# If this parameter is defined, then the SMTP server will reject
++# mail for unknown relay users. This feature is off by default.
++#
++# The right-hand side of the lookup tables is conveniently ignored.
++# In the left-hand side, specify an @domain.tld wild-card, or specify
++# a user@domain.tld address.
++#
++#relay_recipient_maps = hash:/etc/postfix/relay_recipients
++
++# INPUT RATE CONTROL
++#
++# The in_flow_delay configuration parameter implements mail input
++# flow control. This feature is turned on by default, although it
++# still needs further development (it's disabled on SCO UNIX due
++# to an SCO bug).
++#
++# A Postfix process will pause for $in_flow_delay seconds before
++# accepting a new message, when the message arrival rate exceeds the
++# message delivery rate. With the default 100 SMTP server process
++# limit, this limits the mail inflow to 100 messages a second more
++# than the number of messages delivered per second.
++#
++# Specify 0 to disable the feature. Valid delays are 0..10.
++#
++#in_flow_delay = 1s
++
++# ADDRESS REWRITING
++#
++# The ADDRESS_REWRITING_README document gives information about
++# address masquerading or other forms of address rewriting including
++# username->Firstname.Lastname mapping.
++
++# ADDRESS REDIRECTION (VIRTUAL DOMAIN)
++#
++# The VIRTUAL_README document gives information about the many forms
++# of domain hosting that Postfix supports.
++
++# "USER HAS MOVED" BOUNCE MESSAGES
++#
++# See the discussion in the ADDRESS_REWRITING_README document.
++
++# TRANSPORT MAP
++#
++# See the discussion in the ADDRESS_REWRITING_README document.
++
++# ALIAS DATABASE
++#
++# The alias_maps parameter specifies the list of alias databases used
++# by the local delivery agent. The default list is system dependent.
++#
++# On systems with NIS, the default is to search the local alias
++# database, then the NIS alias database. See aliases(5) for syntax
++# details.
++#
++# If you change the alias database, run "postalias /etc/aliases" (or
++# wherever your system stores the mail alias file), or simply run
++# "newaliases" to build the necessary DBM or DB file.
++#
++# It will take a minute or so before changes become visible. Use
++# "postfix reload" to eliminate the delay.
++#
++#alias_maps = dbm:/etc/aliases
++#alias_maps = hash:/etc/aliases
++#alias_maps = hash:/etc/aliases, nis:mail.aliases
++#alias_maps = netinfo:/aliases
++alias_maps = hash:@aliases_file@,
++ hash:/etc/mail/mailman-aliases
++
++# The alias_database parameter specifies the alias database(s) that
++# are built with "newaliases" or "sendmail -bi". This is a separate
++# configuration parameter, because alias_maps (see above) may specify
++# tables that are not necessarily all under control by Postfix.
++#
++#alias_database = dbm:/etc/aliases
++#alias_database = dbm:/etc/mail/aliases
++#alias_database = hash:/etc/aliases
++#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
++alias_database = hash:@aliases_file@
++
++# DELIVERY TO MAILBOX
++#
++# The home_mailbox parameter specifies the optional pathname of a
++# mailbox file relative to a user's home directory. The default
++# mailbox file is /var/spool/mail/user or /var/mail/user. Specify
++# "Maildir/" for qmail-style delivery (the / is required).
++#
++#home_mailbox = Mailbox
++#home_mailbox = Maildir/
++
++# The mail_spool_directory parameter specifies the directory where
++# UNIX-style mailboxes are kept. The default setting depends on the
++# system type.
++#
++#mail_spool_directory = /var/mail
++#mail_spool_directory = /var/spool/mail
++
++# The mailbox_command parameter specifies the optional external
++# command to use instead of mailbox delivery. The command is run as
++# the recipient with proper HOME, SHELL and LOGNAME environment settings.
++# Exception: delivery for root is done as $default_user.
++#
++# Other environment variables of interest: USER (recipient username),
++# EXTENSION (address extension), DOMAIN (domain part of address),
++# and LOCAL (the address localpart).
++#
++# Unlike other Postfix configuration parameters, the mailbox_command
++# parameter is not subjected to $parameter substitutions. This is to
++# make it easier to specify shell syntax (see example below).
++#
++# Avoid shell meta characters because they will force Postfix to run
++# an expensive shell process. Procmail alone is expensive enough.
++#
++# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
++# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
++#
++#mailbox_command = /some/where/procmail
++#mailbox_command = /some/where/procmail -a "$EXTENSION"
++
++# The mailbox_transport specifies the optional transport in master.cf
++# to use after processing aliases and .forward files. This parameter
++# has precedence over the mailbox_command, fallback_transport and
++# luser_relay parameters.
++#
++# Specify a string of the form transport:nexthop, where transport is
++# the name of a mail delivery transport defined in master.cf. The
++# :nexthop part is optional. For more details see the sample transport
++# configuration file.
++#
++# NOTE: if you use this feature for accounts not in the UNIX password
++# file, then you must update the "local_recipient_maps" setting in
++# the main.cf file, otherwise the SMTP server will reject mail for
++# non-UNIX accounts with "User unknown in local recipient table".
++#
++#mailbox_transport = lmtp:unix:/file/name
++#mailbox_transport = cyrus
++mailbox_transport = kolabmailboxfilter
++
++# The fallback_transport specifies the optional transport in master.cf
++# to use for recipients that are not found in the UNIX passwd database.
++# This parameter has precedence over the luser_relay parameter.
++#
++# Specify a string of the form transport:nexthop, where transport is
++# the name of a mail delivery transport defined in master.cf. The
++# :nexthop part is optional. For more details see the sample transport
++# configuration file.
++#
++# NOTE: if you use this feature for accounts not in the UNIX password
++# file, then you must update the "local_recipient_maps" setting in
++# the main.cf file, otherwise the SMTP server will reject mail for
++# non-UNIX accounts with "User unknown in local recipient table".
++#
++#fallback_transport = lmtp:unix:/file/name
++#fallback_transport = cyrus
++#fallback_transport =
++
++# The luser_relay parameter specifies an optional destination address
++# for unknown recipients. By default, mail for unknown@$mydestination,
++# unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned
++# as undeliverable.
++#
++# The following expansions are done on luser_relay: $user (recipient
++# username), $shell (recipient shell), $home (recipient home directory),
++# $recipient (full recipient address), $extension (recipient address
++# extension), $domain (recipient domain), $local (entire recipient
++# localpart), $recipient_delimiter. Specify ${name?value} or
++# ${name:value} to expand value only when $name does (does not) exist.
++#
++# luser_relay works only for the default Postfix local delivery agent.
++#
++# NOTE: if you use this feature for accounts not in the UNIX password
++# file, then you must specify "local_recipient_maps =" (i.e. empty) in
++# the main.cf file, otherwise the SMTP server will reject mail for
++# non-UNIX accounts with "User unknown in local recipient table".
++#
++#luser_relay = $user@other.host
++#luser_relay = $local@other.host
++#luser_relay = admin+$local
++
++# JUNK MAIL CONTROLS
++#
++# The controls listed here are only a very small subset. The file
++# SMTPD_ACCESS_README provides an overview.
++
++# The header_checks parameter specifies an optional table with patterns
++# that each logical message header is matched against, including
++# headers that span multiple physical lines.
++#
++# By default, these patterns also apply to MIME headers and to the
++# headers of attached messages. With older Postfix versions, MIME and
++# attached message headers were treated as body text.
++#
++# For details, see "man header_checks".
++#
++#header_checks = regexp:/etc/postfix/header_checks
++
++# Don't parse and modify headers of message/rfc822 attachments
++disable_mime_input_processing = yes
++
++# FAST ETRN SERVICE
++#
++# Postfix maintains per-destination logfiles with information about
++# deferred mail, so that mail can be flushed quickly with the SMTP
++# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
++# See the ETRN_README document for a detailed description.
++#
++# The fast_flush_domains parameter controls what destinations are
++# eligible for this service. By default, they are all domains that
++# this server is willing to relay mail to.
++#
++#fast_flush_domains = $relay_domains
++
++# SHOW SOFTWARE VERSION OR NOT
++#
++# The smtpd_banner parameter specifies the text that follows the 220
++# code in the SMTP server's greeting banner. Some people like to see
++# the mail version advertised. By default, Postfix shows no version.
++#
++# You MUST specify $myhostname at the start of the text. That is an
++# RFC requirement. Postfix itself does not care.
++#
++#smtpd_banner = $myhostname ESMTP $mail_name
++#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
++
++# PARALLEL DELIVERY TO THE SAME DESTINATION
++#
++# How many parallel deliveries to the same user or domain? With local
++# delivery, it does not make sense to do massively parallel delivery
++# to the same user, because mailbox updates must happen sequentially,
++# and expensive pipelines in .forward files can cause disasters when
++# too many are run at the same time. With SMTP deliveries, 10
++# simultaneous connections to the same domain could be sufficient to
++# raise eyebrows.
++#
++# Each message delivery transport has its XXX_destination_concurrency_limit
++# parameter. The default is $default_destination_concurrency_limit for
++# most delivery transports. For the local delivery agent the default is 2.
++
++#local_destination_concurrency_limit = 2
++#default_destination_concurrency_limit = 20
++
++# DEBUGGING CONTROL
++#
++# The debug_peer_level parameter specifies the increment in verbose
++# logging level when an SMTP client or server host name or address
++# matches a pattern in the debug_peer_list parameter.
++#
++debug_peer_level = 2
++
++# The debug_peer_list parameter specifies an optional list of domain
++# or network patterns, /file/name patterns or type:name tables. When
++# an SMTP client or server host name or address matches a pattern,
++# increase the verbose logging level by the amount specified in the
++# debug_peer_level parameter.
++#
++#debug_peer_list = 127.0.0.1
++#debug_peer_list = some.domain
++
++# The debugger_command specifies the external command that is executed
++# when a Postfix daemon program is run with the -D option.
++#
++# Use "command .. & sleep 5" so that the debugger can attach before
++# the process marches on. If you use an X-based debugger, be sure to
++# set up your XAUTHORITY environment variable before starting Postfix.
++#
++debugger_command =
++ PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
++ xxgdb $daemon_directory/$process_name $process_id & sleep 5
++
++# If you can't use X, use this to capture the call stack when a
++# daemon crashes. The result is in a file in the configuration
++# directory, and is named after the process name and the process ID.
++#
++# debugger_command =
++# PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
++# echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
++# >$config_directory/$process_name.$process_id.log & sleep 5
++#
++# Another possibility is to run gdb under a detached screen session.
++# To attach to the screen sesssion, su root and run "screen -r
++# <id_string>" where <id_string> uniquely matches one of the detached
++# sessions (from "screen -list").
++#
++# debugger_command =
++# PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
++# -dmS $process_name gdb $daemon_directory/$process_name
++# $process_id & sleep 1
++
++# INSTALL-TIME CONFIGURATION INFORMATION
++#
++# The following parameters are used when installing a new Postfix version.
++#
++# sendmail_path: The full pathname of the Postfix sendmail command.
++# This is the Sendmail-compatible mail posting interface.
++#
++sendmail_path = /usr/sbin/sendmail
++
++# newaliases_path: The full pathname of the Postfix newaliases command.
++# This is the Sendmail-compatible command to build alias databases.
++#
++newaliases_path = /usr/bin/newaliases
++
++# mailq_path: The full pathname of the Postfix mailq command. This
++# is the Sendmail-compatible mail queue listing command.
++#
++mailq_path = /usr/bin/mailq
++
++# setgid_group: The group for mail submission and queue management
++# commands. This must be a group name with a numerical group ID that
++# is not shared with other accounts, not even with the Postfix account.
++#
++setgid_group = @emailserver_setgid_grp@
++
++# html_directory: The location of the Postfix HTML documentation.
++#
++html_directory = /usr/share/doc/postfix-2.4.3/html
++
++# manpage_directory: The location of the Postfix on-line manual pages.
++#
++manpage_directory = /usr/share/man
++
++# readme_directory: The location of the Postfix README files.
++#
++readme_directory = /usr/share/doc/postfix-2.4.3/readme
++home_mailbox = .maildir/
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_master.cf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_master.cf.template.in-2.1.patch
new file mode 100644
index 0000000..93d12e4
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_master.cf.template.in-2.1.patch
@@ -0,0 +1,170 @@
+--- kolabd/kolabd/templates/master.cf.template.in 2007-06-26 12:24:36.327282000 +0200
++++ kolabd/kolabd/templates/master.cf.template.in.gentoo 2007-07-26 09:10:01.311048750 +0200
+@@ -14,38 +14,137 @@
+ # this file is automatically written by the Kolab config backend
+ # manual additions are lost unless made to the template in the Kolab config directory
+
++#
++# Postfix master process configuration file. For details on the format
++# of the file, see the Postfix master(5) manual page.
++#
++
++# INCOMING MAIL
+ # ==========================================================================
+ # service type private unpriv chroot wakeup maxproc command + args
+ # (yes) (yes) (yes) (never) (100)
+ # ==========================================================================
++
++# The SMTP service on port 25
+ smtp inet n - n - - smtpd
++#submission inet n - n - - smtpd
++# -o smtpd_etrn_restrictions=reject
++# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
++#smtps inet n - n - - smtpd
++# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
++#submission inet n - n - - smtpd
++# -o smtpd_etrn_restrictions=reject
++# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
+ #628 inet n - n - - qmqpd
++# Picks up locally generated mails and feeds them to the cleanup process
+ pickup fifo n - n 60 1 pickup
++# secure smtp on port 465
++465 inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
++# Helps handling TLS connections
++tlsmgr unix - - n 1000? 1 tlsmgr
++
++# POSTFIX INTERNALS
++# ==========================================================================
++# service type private unpriv chroot wakeup maxproc command + args
++# (yes) (yes) (yes) (never) (100)
++# ==========================================================================
++
++# Checks incoming mail for correctnes, rewrites incorrect data as much as
++# possible and moves the mail into the incoming queue
+ cleanup unix n - n - 0 cleanup
++# Handles the central postfix queues for mail delivery
+ qmgr fifo n - n 300 1 qmgr
+-tlsmgr unix - - n 1000? 1 tlsmgr
++#qmgr fifo n - n 300 1 oqmgr
++# Rewriting of incomplete addresses, transport determination, address verification
+ rewrite unix - - n - - trivial-rewrite
++# bouncing mails
+ bounce unix - - n - 0 bounce
+ defer unix - - n - 0 bounce
+-trace unix - - n - 0 bounce
++# address verification (recommended by postfix manual to be turned off on heavy load servers)
+ verify unix - - n - 1 verify
++# flushing mails
+ flush unix n - n 1000? 0 flush
++# proxies files for a chrooted postfix
+ proxymap unix - - n - - proxymap
+-smtp unix - - n - - smtp
+-relay unix - - n - - smtp -o fallback_relay=
++# report queue status
+ showq unix n - n - - showq
++# Rejects clients hammering the server
++anvil unix - - n - 1 anvil
++# Session cache management
++scache unix - - n - 1 scache
++# Trace service
++trace unix - - n - 0 bounce
++# Handles discarded mails
++discard unix - - n - - discard
++# Defer a mail for retry
++retry unix - - n - - error
++#
++relay unix - - n - - smtp
++
++# DELIVERING MAIL
++# ==========================================================================
++# service type private unpriv chroot wakeup maxproc command + args
++# (yes) (yes) (yes) (never) (100)
++# ==========================================================================
++
++# transport mails to destination via smtp
++smtp unix - - n - - smtp
++# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
++#relay unix - - n - - smtp
++# -o fallback_relay=
++# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
++# error delivery
+ error unix - - n - - error
++# transport mail to local recipient
+ local unix - n n - - local
+-#virtual unix - n n - - virtual
++# lmtp delivery (does this really need to be active?)
+ lmtp unix - - n - - lmtp
+-anvil unix - - n - 1 anvil
+-scache unix - - n - 1 scache
+-#cyrus unix - n n - - pipe user=cyrus argv=@bindir@/cyrdeliver -e -r ${sender} -m ${extension} ${user}
+-#uucp unix - n n - - pipe flags=Fqhu user=uucp argv=@bindir@/uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
+-#ifmail unix - n n - - pipe flags=F user=ftn argv=@bindir@/ifmail -r $nexthop ($recipient)
+-#bsmtp unix - n n - - pipe flags=Fq. user=foo argv=@bindir@/bsmtp -f $sender $nexthop $recipient
+-465 inet n - n - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
++# What is this being used for?
+ post-cleanup unix n - n - 0 cleanup -o virtual_maps=
++
++#
++# ====================================================================
++# Interfaces to non-Postfix software. Be sure to examine the manual
++# pages of the non-Postfix software to find out what options it wants.
++#
++# Many of the following services use the Postfix pipe(8) delivery
++# agent. See the pipe(8) man page for information about ${recipient}
++# and other message envelope options.
++# ====================================================================
++#
++# maildrop. See the Postfix MAILDROP_README file for details.
++# Also specify in main.cf: maildrop_destination_recipient_limit=1
++#
++#maildrop unix - n n - - pipe
++# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
++#
++# The Cyrus deliver program has changed incompatibly, multiple times.
++#
++#old-cyrus unix - n n - - pipe
++# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
++# Cyrus 2.1.5 (Amos Gouaux)
++# Also specify in main.cf: cyrus_destination_recipient_limit=1
++#cyrus unix - n n - - pipe
++# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
++#
++# See the Postfix UUCP_README file for configuration details.
++#
++#uucp unix - n n - - pipe
++# flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
++#
++# Other external delivery methods.
++#
++#ifmail unix - n n - - pipe
++# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
++#bsmtp unix - n n - - pipe
++# flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
++
++# SPECIAL KOLAB DELIVERY
++# ==========================================================================
++# service type private unpriv chroot wakeup maxproc command + args
++# (yes) (yes) (yes) (never) (100)
++# ==========================================================================
++
+ smtp-amavis unix - - n - 2 smtp
+ -o smtp_data_done_timeout=1200
+ -o smtp_send_xforward_command=yes
+@@ -91,7 +190,7 @@
+ -o smtpd_hard_error_limit=1000
+ kolabpolicy unix - n n - - spawn user=@emailserver_master_usr@ argv=@kolab_scriptsdir@/kolab_smtpdpolicy
+
+-kolabfilter unix - n n - - pipe user=@emailserver_master_usr@ flags=n argv=@PHP@
++kolabfilter unix - n n - - pipe user=@emailserver_master_usr@ null_sender= argv=@PHP@
+ -c @phpini_dir@/php.ini
+ -f @resmgr_scriptsdir@/kolabfilter.php
+ --
+@@ -101,7 +200,7 @@
+ -c ${client_address}
+ -u ${sasl_username}
+
+-kolabmailboxfilter unix - n n - - pipe user=@emailserver_master_usr@ flags=n argv=@PHP@
++kolabmailboxfilter unix - n n - - pipe user=@emailserver_master_usr@ null_sender= argv=@PHP@
+ -c @phpini_dir@/php.ini
+ -f @resmgr_scriptsdir@/kolabmailboxfilter.php
+ --
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch
new file mode 100644
index 0000000..6ad529d
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_php.ini.template.in-2.1.patch
@@ -0,0 +1,1255 @@
+--- kolabd/kolabd/templates/php.ini.template.in 2006-07-20 09:17:29.000000000 +0200
++++ kolabd/kolabd/templates/php.ini.template.in.gentoo 2007-03-26 18:09:08.000000000 +0200
+@@ -4,83 +4,69 @@
+ OWNERSHIP=@webserver_musr@:@webserver_grp@
+ KOLAB_META_END
+ [PHP]
+-; (c) 2003 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
+-; (c) 2003 Martin Konold <martin.konold@erfrakon.de>
+-; This program is Free Software under the GNU General Public License (>=v2).
+-; Read the file COPYING that comes with this packages for details.
++
++;;;;;;;;;;;
++; WARNING ;
++;;;;;;;;;;;
++; This is the default settings file for new PHP installations.
++; By default, PHP installs itself with a configuration suitable for
++; development purposes, and *NOT* for production purposes.
++; For several security-oriented considerations that should be taken
++; before going online with your site, please consult php.ini-recommended
++; and http://php.net/manual/en/security.php.
+
+
+ ;;;;;;;;;;;;;;;;;;;
+-; About this file ;
++; About php.ini ;
+ ;;;;;;;;;;;;;;;;;;;
++; This file controls many aspects of PHP's behavior. In order for PHP to
++; read it, it must be named 'php.ini'. PHP looks for it in the current
++; working directory, in the path designated by the environment variable
++; PHPRC, and in the path that was defined in compile time (in that order).
++; Under Windows, the compile-time path is the Windows directory. The
++; path in which the php.ini file is looked for can be overridden using
++; the -c argument in command line mode.
++;
++; The syntax of the file is extremely simple. Whitespace and Lines
++; beginning with a semicolon are silently ignored (as you probably guessed).
++; Section headers (e.g. [Foo]) are also silently ignored, even though
++; they might mean something in the future.
++;
++; Directives are specified using the following syntax:
++; directive = value
++; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
++;
++; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
++; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
++; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
++;
++; Expressions in the INI file are limited to bitwise operators and parentheses:
++; | bitwise OR
++; & bitwise AND
++; ~ bitwise NOT
++; ! boolean NOT
++;
++; Boolean flags can be turned on using the values 1, On, True or Yes.
++; They can be turned off using the values 0, Off, False or No.
++;
++; An empty string can be denoted by simply not writing anything after the equal
++; sign, or by using the None keyword:
++;
++; foo = ; sets foo to an empty string
++; foo = none ; sets foo to an empty string
++; foo = "none" ; sets foo to the string 'none'
++;
++; If you use constants in your value, and these constants belong to a
++; dynamically loaded extension (either a PHP extension or a Zend extension),
++; you may only use these constants *after* the line that loads the extension.
+ ;
+-; This is the recommended, PHP 4-style version of the php.ini-dist file. It
+-; sets some non standard settings, that make PHP more efficient, more secure,
+-; and encourage cleaner coding.
+-; The price is that with these settings, PHP may be incompatible with some
+-; applications, and sometimes, more difficult to develop with. Using this
+-; file is warmly recommended for production sites. As all of the changes from
+-; the standard settings are thoroughly documented, you can go over each one,
+-; and decide whether you want to use it or not.
+-;
+-; For general information about the php.ini file, please consult the php.ini-dist
+-; file, included in your PHP distribution.
+-;
+-; This file is different from the php.ini-dist file in the fact that it features
+-; different values for several directives, in order to improve performance, while
+-; possibly breaking compatibility with the standard out-of-the-box behavior of
+-; PHP 3. Please make sure you read what's different, and modify your scripts
+-; accordingly, if you decide to use this file instead.
+-;
+-; - register_globals = Off [Security, Performance]
+-; Global variables are no longer registered for input data (POST, GET, cookies,
+-; environment and other server variables). Instead of using $foo, you must use
+-; you can use $_REQUEST["foo"] (includes any variable that arrives through the
+-; request, namely, POST, GET and cookie variables), or use one of the specific
+-; $_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"], depending
+-; on where the input originates. Also, you can look at the
+-; import_request_variables() function.
+-; Note that register_globals is going to be depracated (i.e., turned off by
+-; default) in the next version of PHP, because it often leads to security bugs.
+-; Read http://php.net/manual/en/security.registerglobals.php for further
+-; information.
+-; - display_errors = Off [Security]
+-; With this directive set to off, errors that occur during the execution of
+-; scripts will no longer be displayed as a part of the script output, and thus,
+-; will no longer be exposed to remote users. With some errors, the error message
+-; content may expose information about your script, web server, or database
+-; server that may be exploitable for hacking. Production sites should have this
+-; directive set to off.
+-; - log_errors = On [Security]
+-; This directive complements the above one. Any errors that occur during the
+-; execution of your script will be logged (typically, to your server's error log,
+-; but can be configured in several ways). Along with setting display_errors to off,
+-; this setup gives you the ability to fully understand what may have gone wrong,
+-; without exposing any sensitive information to remote users.
+-; - output_buffering = 4096 [Performance]
+-; Set a 4KB output buffer. Enabling output buffering typically results in less
+-; writes, and sometimes less packets sent on the wire, which can often lead to
+-; better performance. The gain this directive actually yields greatly depends
+-; on which Web server you're working with, and what kind of scripts you're using.
+-; - register_argc_argv = Off [Performance]
+-; Disables registration of the somewhat redundant $argv and $argc global
+-; variables.
+-; - magic_quotes_gpc = Off [Performance]
+-; Input data is no longer escaped with slashes so that it can be sent into
+-; SQL databases without further manipulation. Instead, you should use the
+-; function addslashes() on each input element you wish to send to a database.
+-; - variables_order = "GPCS" [Performance]
+-; The environment variables are not hashed into the $HTTP_ENV_VARS[]. To access
+-; environment variables, you can use getenv() instead.
+-; - error_reporting = E_ALL [Code Cleanliness, Security(?)]
+-; By default, PHP surpresses errors of type E_NOTICE. These error messages
+-; are emitted for non-critical errors, but that could be a symptom of a bigger
+-; problem. Most notably, this will cause error messages about the use
+-; of uninitialized variables to be displayed.
+-; - allow_call_time_pass_reference = Off [Code cleanliness]
+-; It's not possible to decide to force a variable to be passed by reference
+-; when calling a function. The PHP 4 style to do this is by making the
+-; function require the relevant argument by reference.
++;
++;;;;;;;;;;;;;;;;;;;
++; About this file ;
++;;;;;;;;;;;;;;;;;;;
++; All the values in the php.ini-dist file correspond to the builtin
++; defaults (that is, if no php.ini is used, or if you delete these lines,
++; the builtin defaults will be identical).
+
+
+ ;;;;;;;;;;;;;;;;;;;;
+@@ -90,17 +76,25 @@
+ ; Enable the PHP scripting language engine under Apache.
+ engine = On
+
++; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
++zend.ze1_compatibility_mode = Off
++
+ ; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
+-short_open_tag = Off
++; NOTE: Using short tags should be avoided when developing applications or
++; libraries that are meant for redistribution, or deployment on PHP
++; servers which are not under your control, because short tags may not
++; be supported on the target server. For portable, redistributable code,
++; be sure not to use short tags.
++short_open_tag = On
+
+ ; Allow ASP-style <% %> tags.
+ asp_tags = Off
+
+ ; The number of significant digits displayed in floating point numbers.
+-precision = 14
++precision = 12
+
+ ; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
+-y2k_compliance = Off
++y2k_compliance = On
+
+ ; Output buffering allows you to send header lines (including cookies) even
+ ; after you send body content, at the price of slowing PHP's output layer a
+@@ -109,21 +103,38 @@
+ ; setting this directive to On. If you wish to limit the size of the buffer
+ ; to a certain size - you can use a maximum number of bytes instead of 'On', as
+ ; a value for this directive (e.g., output_buffering=4096).
+-output_buffering = 4096
++output_buffering = Off
+
+ ; You can redirect all of the output of your scripts to a function. For
+-; example, if you set output_handler to "ob_gzhandler", output will be
+-; transparently compressed for browsers that support gzip or deflate encoding.
+-; Setting an output handler automatically turns on output buffering.
+-output_handler =
++; example, if you set output_handler to "mb_output_handler", character
++; encoding will be transparently converted to the specified encoding.
++; Setting any output handler automatically turns on output buffering.
++; Note: People who wrote portable scripts should not depend on this ini
++; directive. Instead, explicitly set the output handler using ob_start().
++; Using this ini directive may cause problems unless you know what script
++; is doing.
++; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
++; and you cannot use both "ob_gzhandler" and "zlib.output_compression".
++; Note: output_handler must be empty if this is set 'On' !!!!
++; Instead you must use zlib.output_handler.
++;output_handler =
+
+ ; Transparent output compression using the zlib library
+ ; Valid values for this option are 'off', 'on', or a specific buffer size
+ ; to be used for compression (default is 4KB)
+-;
+-; Note: output_handler must be empty if this is set 'On' !!!!
+-;
++; Note: Resulting chunk size may vary due to nature of compression. PHP
++; outputs chunks that are few hundreds bytes each as a result of
++; compression. If you prefer a larger chunk size for better
++; performance, enable output_buffering in addition.
++; Note: You need to use zlib.output_handler instead of the standard
++; output_handler, or otherwise the output will be corrupted.
+ zlib.output_compression = Off
++;zlib.output_compression_level = -1
++
++; You cannot specify additional output handlers if zlib.output_compression
++; is activated here. This setting does the same as output_handler but in
++; a different order.
++;zlib.output_handler =
+
+ ; Implicit flush tells PHP to tell the output layer to flush itself
+ ; automatically after every output block. This is equivalent to calling the
+@@ -132,6 +143,20 @@
+ ; implications and is generally recommended for debugging purposes only.
+ implicit_flush = Off
+
++; The unserialize callback function will be called (with the undefined class'
++; name as parameter), if the unserializer finds an undefined class
++; which should be instantiated.
++; A warning appears if the specified function is not defined, or if the
++; function doesn't include/implement the missing class.
++; So only set this entry, if you really want to implement such a
++; callback-function.
++unserialize_callback_func=
++
++; When floats & doubles are serialized store serialize_precision significant
++; digits after the floating point. The default value ensures that when floats
++; are decoded with unserialize, the data will remain the same.
++serialize_precision = 100
++
+ ; Whether to enable the ability to force arguments to be passed by reference
+ ; at function call time. This method is deprecated and is likely to be
+ ; unsupported in future versions of PHP/Zend. The encouraged method of
+@@ -141,7 +166,7 @@
+ ; with future versions of the language (you will receive a warning each time
+ ; you use this feature, and the argument will be passed by value instead of by
+ ; reference).
+-allow_call_time_pass_reference = Off
++allow_call_time_pass_reference = On
+
+ ;
+ ; Safe Mode
+@@ -157,18 +182,12 @@
+ ; including files from this directory and its subdirectories.
+ ; (directory must also be in include_path or full path must
+ ; be used when including)
+-safe_mode_include_dir =
++safe_mode_include_dir =
+
+ ; When safe_mode is on, only executables located in the safe_mode_exec_dir
+ ; will be allowed to be executed via the exec family of functions.
+ safe_mode_exec_dir =
+
+-; open_basedir, if set, limits all file operations to the defined directory
+-; and below. This directive makes most sense if used in a per-directory
+-; or per-virtualhost web server configuration file.
+-;
+-;open_basedir =
+-
+ ; Setting certain environment variables may be a potential security breach.
+ ; This directive contains a comma-delimited list of prefixes. In Safe Mode,
+ ; the user may only alter environment variables whose names begin with the
+@@ -184,20 +203,45 @@
+ ; protected even if safe_mode_allowed_env_vars is set to allow to change them.
+ safe_mode_protected_env_vars = LD_LIBRARY_PATH
+
++; open_basedir, if set, limits all file operations to the defined directory
++; and below. This directive makes most sense if used in a per-directory
++; or per-virtualhost web server configuration file. This directive is
++; *NOT* affected by whether Safe Mode is turned On or Off.
++;open_basedir =
++
+ ; This directive allows you to disable certain functions for security reasons.
+-; It receives a comma-delimited list of function names. This directive is
++; It receives a comma-delimited list of function names. This directive is
+ ; *NOT* affected by whether Safe Mode is turned On or Off.
+ disable_functions =
+
+-; Colors for Syntax Highlighting mode. Anything that's acceptable in
+-; <font color="??????"> would work.
+-highlight.string = #CC0000
+-highlight.comment = #FF9900
+-highlight.keyword = #006600
+-highlight.bg = #FFFFFF
+-highlight.default = #0000CC
+-highlight.html = #000000
++; This directive allows you to disable certain classes for security reasons.
++; It receives a comma-delimited list of class names. This directive is
++; *NOT* affected by whether Safe Mode is turned On or Off.
++disable_classes =
+
++; Colors for Syntax Highlighting mode. Anything that's acceptable in
++; <span style="color: ???????"> would work.
++;highlight.string = #DD0000
++;highlight.comment = #FF9900
++;highlight.keyword = #007700
++;highlight.bg = #FFFFFF
++;highlight.default = #0000BB
++;highlight.html = #000000
++
++; If enabled, the request will be allowed to complete even if the user aborts
++; the request. Consider enabling it if executing long request, which may end up
++; being interrupted by the user or a browser timing out.
++; ignore_user_abort = On
++
++; Determines the size of the realpath cache to be used by PHP. This value should
++; be increased on systems where PHP opens many files to reflect the quantity of
++; the file operations performed.
++; realpath_cache_size=16k
++
++; Duration of time, in seconds for which to cache realpath information for a given
++; file or directory. For systems with rarely changing files, consider increasing this
++; value.
++; realpath_cache_ttl=120
+
+ ;
+ ; Misc
+@@ -213,8 +257,9 @@
+ ; Resource Limits ;
+ ;;;;;;;;;;;;;;;;;;;
+
+-max_execution_time = 120 ; Maximum execution time of each script, in seconds
+-memory_limit = 16M ; Maximum amount of memory a script may consume (8MB)
++max_execution_time = 30 ; Maximum execution time of each script, in seconds
++max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
++memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
+
+
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+@@ -223,8 +268,9 @@
+
+ ; error_reporting is a bit-field. Or each number up to get desired error
+ ; reporting level
+-; E_ALL - All errors and warnings
++; E_ALL - All errors and warnings (doesn't include E_STRICT)
+ ; E_ERROR - fatal run-time errors
++; E_RECOVERABLE_ERROR - almost fatal run-time errors
+ ; E_WARNING - run-time warnings (non-fatal errors)
+ ; E_PARSE - compile-time parse errors
+ ; E_NOTICE - run-time notices (these are warnings which often result
+@@ -232,6 +278,9 @@
+ ; intentional (e.g., using an uninitialized variable and
+ ; relying on the fact it's automatically initialized to an
+ ; empty string)
++; E_STRICT - run-time notices, enable to have PHP suggest changes
++; to your code which will ensure the best interoperability
++; and forward compatibility of your code
+ ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
+ ; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
+ ; initial startup
+@@ -243,24 +292,28 @@
+ ;
+ ; Examples:
+ ;
++; - Show all errors, except for notices and coding standards warnings
++;
++;error_reporting = E_ALL & ~E_NOTICE
++;
+ ; - Show all errors, except for notices
+ ;
+-error_reporting = E_ALL & ~E_NOTICE
++;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
+ ;
+ ; - Show only errors
+ ;
+-;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
++;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
+ ;
+-; - Show all errors
++; - Show all errors except for notices and coding standards warnings
+ ;
+-;error_reporting = E_ALL
++error_reporting = E_ALL & ~E_NOTICE
+
+ ; Print out errors (as a part of the output). For production web sites,
+ ; you're strongly encouraged to turn this feature off, and use error logging
+ ; instead (see below). Keeping display_errors enabled on a production web site
+ ; may reveal security information to end users, such as file paths on your Web
+ ; server, your database schema or other information.
+-display_errors = Off
++display_errors = On
+
+ ; Even when display_errors is on, errors that occur during PHP's startup
+ ; sequence are not displayed. It's strongly recommended to keep
+@@ -270,14 +323,45 @@
+ ; Log errors into a log file (server-specific log, stderr, or error_log (below))
+ ; As stated above, you're strongly advised to use error logging in place of
+ ; error displaying on production web sites.
+-log_errors = On
++log_errors = Off
++
++; Set maximum length of log_errors. In error_log information about the source is
++; added. The default is 1024 and 0 allows to not apply any maximum length at all.
++log_errors_max_len = 1024
++
++; Do not log repeated messages. Repeated errors must occur in same file on same
++; line until ignore_repeated_source is set true.
++ignore_repeated_errors = Off
++
++; Ignore source of message when ignoring repeated messages. When this setting
++; is On you will not log errors with repeated messages from different files or
++; source lines.
++ignore_repeated_source = Off
++
++; If this parameter is set to Off, then memory leaks will not be shown (on
++; stdout or in the log). This has only effect in a debug compile, and if
++; error reporting includes E_WARNING in the allowed list
++report_memleaks = On
++
++;report_zend_debug = 0
+
+ ; Store the last error/warning message in $php_errormsg (boolean).
+ track_errors = Off
+
+ ; Disable the inclusion of HTML tags in error messages.
++; Note: Never use this feature for production boxes.
+ ;html_errors = Off
+-
++
++; If html_errors is set On PHP produces clickable error messages that direct
++; to a page describing the error or function causing the error in detail.
++; You can download a copy of the PHP manual from http://www.php.net/docs.php
++; and change docref_root to the base URL of your local copy including the
++; leading '/'. You must also specify the file extension being used including
++; the dot.
++; Note: Never use this feature for production boxes.
++;docref_root = "/phpmanual/"
++;docref_ext = .html
++
+ ; String to output before an error message.
+ ;error_prepend_string = "<font color=ff0000>"
+
+@@ -298,11 +382,11 @@
+ ; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
+
+ ; The separator used in PHP generated URLs to separate arguments.
+-; Default is "&".
++; Default is "&".
+ ;arg_separator.output = "&amp;"
+
+ ; List of separator(s) used by PHP to parse input URLs into variables.
+-; Default is "&".
++; Default is "&".
+ ; NOTE: Every character in this directive is considered as separator!
+ ;arg_separator.input = ";&"
+
+@@ -310,7 +394,7 @@
+ ; Environment and Built-in variables (G, P, C, E & S respectively, often
+ ; referred to as EGPCS or GPC). Registration is done from left to right, newer
+ ; values override older values.
+-variables_order = "GPCS"
++variables_order = "EGPCS"
+
+ ; Whether or not to register the EGPCS variables as global variables. You may
+ ; want to turn this off if you don't want to clutter your scripts' global scope
+@@ -323,25 +407,34 @@
+ ; to possible security problems, if the code is not very well thought of.
+ register_globals = Off
+
++; Whether or not to register the old-style input arrays, HTTP_GET_VARS
++; and friends. If you're not using them, it's recommended to turn them off,
++; for performance reasons.
++register_long_arrays = On
++
+ ; This directive tells PHP whether to declare the argv&argc variables (that
+ ; would contain the GET information). If you don't use these variables, you
+ ; should turn it off for increased performance.
+-register_argc_argv = Off
++register_argc_argv = On
++
++; When enabled, the SERVER and ENV variables are created when they're first
++; used (Just In Time) instead of when the script starts. If these variables
++; are not used within a script, having this directive on will result in a
++; performance gain. The PHP directives register_globals, register_long_arrays,
++; and register_argc_argv must be disabled for this directive to have any affect.
++auto_globals_jit = On
+
+ ; Maximum size of POST data that PHP will accept.
+ post_max_size = 8M
+
+-; This directive is deprecated. Use variables_order instead.
+-gpc_order = "GPC"
+-
+ ; Magic quotes
+ ;
+
+ ; Magic quotes for incoming GET/POST/Cookie data.
+-magic_quotes_gpc = Off
++magic_quotes_gpc = On
+
+ ; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
+-magic_quotes_runtime = Off
++magic_quotes_runtime = Off
+
+ ; Use Sybase-style magic quotes (escape ' with '' instead of \').
+ magic_quotes_sybase = Off
+@@ -358,19 +451,19 @@
+ default_mimetype = "text/html"
+ ;default_charset = "iso-8859-1"
+
+-; Always populate the $HTTP_RAW_POST_DATA variable.
++; Always populate the $HTTP_RAW_POST_DATA variable.
+ ;always_populate_raw_post_data = On
+
++
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+ ; Paths and Directories ;
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+-; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++; UNIX: "/path1:/path2"
++include_path = ".:/usr/share/php5:/usr/share/php:@phplibdir@:@phplibdir2@:@phppeardir@"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+-include_path = ".:/php/include:@phplibdir@:@phplibdir2@:@phppeardir@"
+
+ ; The root of the PHP pages, used only if nonempty.
+ ; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
+@@ -379,12 +472,12 @@
+ ; cgi.force_redirect configuration below
+ doc_root =
+
+-; The directory under which PHP opens the script using /~usernamem used only
++; The directory under which PHP opens the script using /~username used only
+ ; if nonempty.
+ user_dir =
+
+ ; Directory in which the loadable extensions (modules) reside.
+-extension_dir = ./
++extension_dir = /usr/lib/php5/lib/php/extensions/no-debug-non-zts-20060613
+
+ ; Whether or not to enable the dl() function. The dl() function does NOT work
+ ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
+@@ -397,12 +490,32 @@
+ ; **You CAN safely turn this off for IIS, in fact, you MUST.**
+ ; cgi.force_redirect = 1
+
+-; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
++; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
++; every request.
++; cgi.nph = 1
++
++; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
+ ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
+ ; will look for to know it is OK to continue execution. Setting this variable MAY
+ ; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
+ ; cgi.redirect_status_env = ;
+
++; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
++; security tokens of the calling client. This allows IIS to define the
++; security context that the request runs under. mod_fastcgi under Apache
++; does not currently support this feature (03/17/2002)
++; Set to 1 if running under IIS. Default is zero.
++; fastcgi.impersonate = 1;
++
++; Disable logging through FastCGI connection
++; fastcgi.log = 0
++
++; cgi.rfc2616_headers configuration option tells PHP what type of headers to
++; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
++; is supported by Apache. When this option is set to 1 PHP will send
++; RFC2616 compliant header.
++; Default is zero.
++;cgi.rfc2616_headers = 0
+
+
+ ;;;;;;;;;;;;;;;;
+@@ -425,11 +538,27 @@
+ ;;;;;;;;;;;;;;;;;;
+
+ ; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
+-allow_url_fopen = On
++allow_url_fopen = Off
++
++; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
++allow_url_include = Off
+
+ ; Define the anonymous ftp password (your email address)
+ ;from="john@doe.com"
+
++; Define the User-Agent string
++; user_agent="PHP"
++
++; Default timeout for socket based streams (seconds)
++default_socket_timeout = 60
++
++; If your scripts have to deal with files from Macintosh systems,
++; or you are running on a Mac and need to deal with files from
++; unix or win32 systems, setting this flag will cause PHP to
++; automatically detect the EOL character in those files so that
++; fgets() and file() will work regardless of the source of the file.
++; auto_detect_line_endings = Off
++
+
+ ;;;;;;;;;;;;;;;;;;;;;;
+ ; Dynamic Extensions ;
+@@ -448,66 +577,97 @@
+ ;
+ ; extension=msql.so
+ ;
+-; Note that it should be the name of the module only; no directory information
++; Note that it should be the name of the module only; no directory information
+ ; needs to go here. Specify the location of the extension with the
+ ; extension_dir directive above.
+
+
+-;Windows Extensions
+-;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
+-;
++; Windows Extensions
++; Note that ODBC support is built in, so no dll is needed for it.
++; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
++; extension folders as well as the separate PECL DLL download (PHP 5).
++; Be sure to appropriately set the extension_dir directive.
++
+ ;extension=php_bz2.dll
+-;extension=php_ctype.dll
+-;extension=php_cpdf.dll
+ ;extension=php_curl.dll
+-;extension=php_cybercash.dll
+-;extension=php_db.dll
+ ;extension=php_dba.dll
+ ;extension=php_dbase.dll
+-;extension=php_dbx.dll
+-;extension=php_domxml.dll
+-;extension=php_dotnet.dll
+ ;extension=php_exif.dll
+-;extension=php_fbsql.dll
+ ;extension=php_fdf.dll
+-;extension=php_filepro.dll
+-;extension=php_gd.dll
++;extension=php_gd2.dll
+ ;extension=php_gettext.dll
+-;extension=php_hyperwave.dll
+-;extension=php_iconv.dll
++;extension=php_gmp.dll
+ ;extension=php_ifx.dll
+-;extension=php_iisfunc.dll
+ ;extension=php_imap.dll
+-;extension=php_ingres.dll
+ ;extension=php_interbase.dll
+-;extension=php_java.dll
+ ;extension=php_ldap.dll
+ ;extension=php_mbstring.dll
+ ;extension=php_mcrypt.dll
+ ;extension=php_mhash.dll
++;extension=php_mime_magic.dll
+ ;extension=php_ming.dll
++;extension=php_msql.dll
+ ;extension=php_mssql.dll
++;extension=php_mysql.dll
++;extension=php_mysqli.dll
+ ;extension=php_oci8.dll
+ ;extension=php_openssl.dll
+-;extension=php_oracle.dll
+-;extension=php_pdf.dll
++;extension=php_pdo.dll
++;extension=php_pdo_firebird.dll
++;extension=php_pdo_mssql.dll
++;extension=php_pdo_mysql.dll
++;extension=php_pdo_oci.dll
++;extension=php_pdo_oci8.dll
++;extension=php_pdo_odbc.dll
++;extension=php_pdo_pgsql.dll
++;extension=php_pdo_sqlite.dll
+ ;extension=php_pgsql.dll
+-;extension=php_printer.dll
++;extension=php_pspell.dll
+ ;extension=php_shmop.dll
+ ;extension=php_snmp.dll
++;extension=php_soap.dll
+ ;extension=php_sockets.dll
++;extension=php_sqlite.dll
+ ;extension=php_sybase_ct.dll
+-;extension=php_tokenizer.dll
+-;extension=php_w32api.dll
+-;extension=php_xslt.dll
+-;extension=php_yaz.dll
+-;extension=php_zlib.dll
+-
++;extension=php_tidy.dll
++;extension=php_xmlrpc.dll
++;extension=php_xsl.dll
++;extension=php_zip.dll
+
+ ;;;;;;;;;;;;;;;;;;;
+ ; Module Settings ;
+ ;;;;;;;;;;;;;;;;;;;
+
++[Date]
++; Defines the default timezone used by the date functions
++;date.timezone =
++
++;date.default_latitude = 31.7667
++;date.default_longitude = 35.2333
++
++;date.sunrise_zenith = 90.583333
++;date.sunset_zenith = 90.583333
++
++[filter]
++;filter.default = unsafe_raw
++;filter.default_flags =
++
++[iconv]
++;iconv.input_encoding = ISO-8859-1
++;iconv.internal_encoding = ISO-8859-1
++;iconv.output_encoding = ISO-8859-1
++
++[sqlite]
++;sqlite.assoc_case = 0
++
++[xmlrpc]
++;xmlrpc_error_number = 0
++;xmlrpc_errors = 0
++
++[Pcre]
++;pcre.recursion_limit=100000
++;pcre.backtrack_limit=100000
++
+ [Syslog]
+ ; Whether or not to define the various syslog variables (e.g. $LOG_PID,
+ ; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
+@@ -517,18 +677,18 @@
+ [mail function]
+ ; For Win32 only.
+ SMTP = localhost
++smtp_port = 25
+
+ ; For Win32 only.
+-sendmail_from = me@localhost.com
++;sendmail_from = me@example.com
+
+ ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
+ ;sendmail_path =
+
+-[Java]
+-;java.class.path = .\php_java.jar
+-;java.home = c:\jdk
+-;java.library = c:\jdk\jre\bin\hotspot\jvm.dll
+-;java.library.path = .\
++; Force the addition of the specified parameters to be passed as extra parameters
++; to the sendmail binary. These parameters will always replace the value of
++; the 5th parameter to mail(), even in safe mode.
++;mail.force_extra_parameters =
+
+ [SQL]
+ sql.safe_mode = Off
+@@ -548,16 +708,16 @@
+ odbc.max_persistent = -1
+
+ ; Maximum number of links (persistent + non-persistent). -1 means no limit.
+-odbc.max_links = -1
++odbc.max_links = -1
+
+ ; Handling of LONG fields. Returns number of bytes to variables. 0 means
+ ; passthru.
+-odbc.defaultlrl = 4096
++odbc.defaultlrl = 4096
+
+ ; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
+ ; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
+ ; of uodbc.defaultlrl and uodbc.defaultbinmode
+-odbc.defaultbinmode = 1
++odbc.defaultbinmode = 1
+
+ [MySQL]
+ ; Allow or prevent persistent links.
+@@ -587,11 +747,49 @@
+
+ ; Default password for mysql_connect() (doesn't apply in safe mode).
+ ; Note that this is generally a *bad* idea to store passwords in this file.
+-; *Any* user with PHP access can run 'echo cfg_get_var("mysql.default_password")
++; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
+ ; and reveal this password! And of course, any users with read access to this
+ ; file will be able to reveal the password as well.
+ mysql.default_password =
+
++; Maximum time (in seconds) for connect timeout. -1 means no limit
++mysql.connect_timeout = 60
++
++; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
++; SQL-Errors will be displayed.
++mysql.trace_mode = Off
++
++[MySQLi]
++
++; Maximum number of links. -1 means no limit.
++mysqli.max_links = -1
++
++; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
++; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
++; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
++; at MYSQL_PORT.
++mysqli.default_port = 3306
++
++; Default socket name for local MySQL connects. If empty, uses the built-in
++; MySQL defaults.
++mysqli.default_socket =
++
++; Default host for mysql_connect() (doesn't apply in safe mode).
++mysqli.default_host =
++
++; Default user for mysql_connect() (doesn't apply in safe mode).
++mysqli.default_user =
++
++; Default password for mysqli_connect() (doesn't apply in safe mode).
++; Note that this is generally a *bad* idea to store passwords in this file.
++; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
++; and reveal this password! And of course, any users with read access to this
++; file will be able to reveal the password as well.
++mysqli.default_pw =
++
++; Allow or prevent reconnect
++mysqli.reconnect = Off
++
+ [mSQL]
+ ; Allow or prevent persistent links.
+ msql.allow_persistent = On
+@@ -602,11 +800,43 @@
+ ; Maximum number of links (persistent+non persistent). -1 means no limit.
+ msql.max_links = -1
+
++[OCI8]
++; enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA)
++;oci8.privileged_connect = Off
++
++; Connection: The maximum number of persistent OCI8 connections per
++; process. Using -1 means no limit.
++;oci8.max_persistent = -1
++
++; Connection: The maximum number of seconds a process is allowed to
++; maintain an idle persistent connection. Using -1 means idle
++; persistent connections will be maintained forever.
++;oci8.persistent_timeout = -1
++
++; Connection: The number of seconds that must pass before issuing a
++; ping during oci_pconnect() to check the connection validity. When
++; set to 0, each oci_pconnect() will cause a ping. Using -1 disables
++; pings completely.
++;oci8.ping_interval = 60
++
++; Tuning: This option enables statement caching, and specifies how
++; many statements to cache. Using 0 disables statement caching.
++;oci8.statement_cache_size = 20
++
++; Tuning: Enables statement prefetching and sets the default number of
++; rows that will be fetched automatically after statement execution.
++;oci8.default_prefetch = 10
++
++; Compatibility. Using On means oci_close() will not close
++; oci_connect() and oci_new_connect() connections.
++;oci8.old_oci_close_semantics = Off
++
+ [PostgresSQL]
+ ; Allow or prevent persistent links.
+ pgsql.allow_persistent = On
+
+-; Detect broken persistent links always with pg_pconnect(). Need a little overhead.
++; Detect broken persistent links always with pg_pconnect().
++; Auto reset feature requires a little overheads.
+ pgsql.auto_reset_persistent = Off
+
+ ; Maximum number of persistent links. -1 means no limit.
+@@ -615,6 +845,14 @@
+ ; Maximum number of links (persistent+non persistent). -1 means no limit.
+ pgsql.max_links = -1
+
++; Ignore PostgreSQL backends Notice message or not.
++; Notice message logging require a little overheads.
++pgsql.ignore_notice = 0
++
++; Log PostgreSQL backends Noitce message or not.
++; Unless pgsql.ignore_notice=0, module cannot log notice message.
++pgsql.log_notice = 0
++
+ [Sybase]
+ ; Allow or prevent persistent links.
+ sybase.allow_persistent = On
+@@ -625,7 +863,7 @@
+ ; Maximum number of links (persistent + non-persistent). -1 means no limit.
+ sybase.max_links = -1
+
+-;sybase.interface_file = "@prefix@/sybase/interfaces"
++;sybase.interface_file = "/usr/sybase/interfaces"
+
+ ; Minimum error severity to display.
+ sybase.min_error_severity = 10
+@@ -633,10 +871,10 @@
+ ; Minimum message severity to display.
+ sybase.min_message_severity = 10
+
+-; Compatability mode with old versions of PHP 3.0.
++; Compatibility mode with old versions of PHP 3.0.
+ ; If on, this will cause PHP to automatically assign types to results according
+ ; to their Sybase type, instead of treating them all as strings. This
+-; compatability mode will probably not stay around forever, so try applying
++; compatibility mode will probably not stay around forever, so try applying
+ ; whatever necessary changes to your code, and turn it off.
+ sybase.compatability_mode = Off
+
+@@ -705,13 +943,41 @@
+ session.save_handler = files
+
+ ; Argument passed to save_handler. In the case of files, this is the path
+-; where data files are stored. Note: Windows users have to change this
++; where data files are stored. Note: Windows users have to change this
+ ; variable in order to use PHP's session functions.
++;
++; As of PHP 4.0.1, you can define the path as:
++;
++; session.save_path = "N;/path"
++;
++; where N is an integer. Instead of storing all the session files in
++; /path, what this will do is use subdirectories N-levels deep, and
++; store the session data in those directories. This is useful if you
++; or your OS have problems with lots of files in one directory, and is
++; a more efficient layout for servers that handle lots of sessions.
++;
++; NOTE 1: PHP will not create this directory structure automatically.
++; You can use the script in the ext/session dir for that purpose.
++; NOTE 2: See the section on garbage collection below if you choose to
++; use subdirectories for session storage
++;
++; The file storage module creates files using mode 600 by default.
++; You can change that by using
++;
++; session.save_path = "N;MODE;/path"
++;
++; where MODE is the octal representation of the mode. Note that this
++; does not overwrite the process's umask.
+ session.save_path = @webserver_sessions@
+
+ ; Whether to use cookies.
+ session.use_cookies = 1
+
++;session.cookie_secure =
++
++; This option enables administrators to make their users invulnerable to
++; attacks which involve passing session ids in URLs; defaults to 0.
++; session.use_only_cookies = 1
+
+ ; Name of the session (used as cookie name).
+ session.name = PHPSESSID
+@@ -728,17 +994,42 @@
+ ; The domain for which the cookie is valid.
+ session.cookie_domain =
+
++; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
++session.cookie_httponly =
++
+ ; Handler used to serialize data. php is the standard serializer of PHP.
+ session.serialize_handler = php
+
+-; Percentual probability that the 'garbage collection' process is started
++; Define the probability that the 'garbage collection' process is started
+ ; on every session initialization.
++; The probability is calculated by using gc_probability/gc_divisor,
++; e.g. 1/100 means there is a 1% chance that the GC process starts
++; on each request.
++
+ session.gc_probability = 1
++session.gc_divisor = 100
+
+ ; After this number of seconds, stored data will be seen as 'garbage' and
+ ; cleaned up by the garbage collection process.
+ session.gc_maxlifetime = 1440
+
++; NOTE: If you are using the subdirectory option for storing session files
++; (see session.save_path above), then garbage collection does *not*
++; happen automatically. You will need to do your own garbage
++; collection through a shell script, cron entry, or some other method.
++; For example, the following script would is the equivalent of
++; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
++; cd /path/to/sessions; find -cmin +24 | xargs rm
++
++; PHP 4.2 and less have an undocumented feature/bug that allows you to
++; to initialize a session variable in the global scope, albeit register_globals
++; is disabled. PHP 4.3 and later will warn you, if this feature is used.
++; You can disable the feature and the warning separately. At this time,
++; the warning is only displayed, if bug_compat_42 is enabled.
++
++session.bug_compat_42 = 1
++session.bug_compat_warn = 1
++
+ ; Check HTTP Referer to invalidate externally stored URLs containing ids.
+ ; HTTP_REFERER has to contain this substring for the session to be
+ ; considered as valid.
+@@ -754,14 +1045,15 @@
+
+ ;session.entropy_file = /dev/urandom
+
+-; Set to {nocache,private,public} to determine HTTP caching aspects.
++; Set to {nocache,private,public,} to determine HTTP caching aspects
++; or leave this empty to avoid sending anti-caching headers.
+ session.cache_limiter = nocache
+
+ ; Document expires after n minutes.
+ session.cache_expire = 180
+
+ ; trans sid support is disabled by default.
+-; Use of trans sid may risk your users security.
++; Use of trans sid may risk your users security.
+ ; Use this option with caution.
+ ; - User may send URL contains active session ID
+ ; to other person via. email/irc/etc.
+@@ -769,9 +1061,27 @@
+ ; in publically accessible computer.
+ ; - User may access your site with the same session ID
+ ; always using URL stored in browser's history or bookmarks.
+-session.use_trans_sid = On
++session.use_trans_sid = 0
+
+-url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
++; Select a hash function
++; 0: MD5 (128 bits)
++; 1: SHA-1 (160 bits)
++session.hash_function = 0
++
++; Define how many bits are stored in each character when converting
++; the binary hash data to something readable.
++;
++; 4 bits: 0-9, a-f
++; 5 bits: 0-9, a-v
++; 6 bits: 0-9, a-z, A-Z, "-", ","
++session.hash_bits_per_character = 4
++
++; The URL rewriter will look for URLs in a defined set of HTML tags.
++; form/fieldset are special; if you include them here, the rewriter will
++; add a hidden <input> field with the info which is otherwise appended
++; to URLs. If you want XHTML conformity, remove the form entry.
++; Note that all valid entries require a "=", even if no value follows.
++url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="
+
+ [MSSQL]
+ ; Allow or prevent persistent links.
+@@ -789,9 +1099,15 @@
+ ; Minimum message severity to display.
+ mssql.min_message_severity = 10
+
+-; Compatability mode with old versions of PHP 3.0.
++; Compatibility mode with old versions of PHP 3.0.
+ mssql.compatability_mode = Off
+
++; Connect timeout
++;mssql.connect_timeout = 5
++
++; Query timeout
++;mssql.timeout = 60
++
+ ; Valid range 0 - 2147483647. Default = 4096.
+ ;mssql.textlimit = 4096
+
+@@ -801,6 +1117,24 @@
+ ; Limits the number of records in each batch. 0 = all records in one batch.
+ ;mssql.batchsize = 0
+
++; Specify how datetime and datetim4 columns are returned
++; On => Returns data converted to SQL server settings
++; Off => Returns values as YYYY-MM-DD hh:mm:ss
++;mssql.datetimeconvert = On
++
++; Use NT authentication when connecting to the server
++mssql.secure_connection = Off
++
++; Specify max number of processes. -1 = library default
++; msdlib defaults to 25
++; FreeTDS defaults to 4096
++;mssql.max_procs = -1
++
++; Specify client character set.
++; If empty or not set the client charset from freetds.comf is used
++; This is only used when compiled with FreeTDS
++;mssql.charset = "ISO-8859-1"
++
+ [Assertion]
+ ; Assert(expr); active by default.
+ ;assert.active = On
+@@ -818,77 +1152,64 @@
+ ; error_reporting(0) around the eval().
+ ;assert.quiet_eval = 0
+
+-[Ingres II]
+-; Allow or prevent persistent links.
+-ingres.allow_persistent = On
+-
+-; Maximum number of persistent links. -1 means no limit.
+-ingres.max_persistent = -1
+-
+-; Maximum number of links, including persistents. -1 means no limit.
+-ingres.max_links = -1
+-
+-; Default database (format: [node_id::]dbname[/srv_class]).
+-ingres.default_database =
+-
+-; Default user.
+-ingres.default_user =
+-
+-; Default password.
+-ingres.default_password =
+-
+-[Verisign Payflow Pro]
+-; Default Payflow Pro server.
+-pfpro.defaulthost = "test-payflow.verisign.com"
+-
+-; Default port to connect to.
+-pfpro.defaultport = 443
+-
+-; Default timeout in seconds.
+-pfpro.defaulttimeout = 30
+-
+-; Default proxy IP address (if required).
+-;pfpro.proxyaddress =
+-
+-; Default proxy port.
+-;pfpro.proxyport =
+-
+-; Default proxy logon.
+-;pfpro.proxylogon =
+-
+-; Default proxy password.
+-;pfpro.proxypassword =
+-
+-[Sockets]
+-; Use the system read() function instead of the php_read() wrapper.
+-sockets.use_system_read = On
+-
+-[com]
++[COM]
+ ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
+-;com.typelib_file =
++;com.typelib_file =
+ ; allow Distributed-COM calls
+ ;com.allow_dcom = true
+ ; autoregister constants of a components typlib on com_load()
+ ;com.autoregister_typelib = true
+ ; register constants casesensitive
+ ;com.autoregister_casesensitive = false
+-; show warnings on duplicate constat registrations
++; show warnings on duplicate constant registrations
+ ;com.autoregister_verbose = true
+
+-[Printer]
+-;printer.default_printer = ""
+-
+ [mbstring]
++; language for internal character representation.
++;mbstring.language = Japanese
++
++; internal/script encoding.
++; Some encoding cannot work as internal encoding.
++; (e.g. SJIS, BIG5, ISO-2022-*)
+ ;mbstring.internal_encoding = EUC-JP
++
++; http input encoding.
+ ;mbstring.http_input = auto
++
++; http output encoding. mb_output_handler must be
++; registered as output buffer to function
+ ;mbstring.http_output = SJIS
++
++; enable automatic encoding translation according to
++; mbstring.internal_encoding setting. Input chars are
++; converted to internal encoding by setting this to On.
++; Note: Do _not_ use automatic encoding translation for
++; portable libs/applications.
++;mbstring.encoding_translation = Off
++
++; automatic encoding detection order.
++; auto means
+ ;mbstring.detect_order = auto
++
++; substitute_character used when character cannot be converted
++; one from another
+ ;mbstring.substitute_character = none;
+
++; overload(replace) single byte functions by mbstring functions.
++; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
++; etc. Possible values are 0,1,2,4 or combination of them.
++; For example, 7 for overload everything.
++; 0: No overload
++; 1: Overload mail() function
++; 2: Overload str*() functions
++; 4: Overload ereg*() functions
++;mbstring.func_overload = 0
++
+ [FrontBase]
+ ;fbsql.allow_persistent = On
+ ;fbsql.autocommit = On
+-;fbsql.default_database =
++;fbsql.show_timestamp_decimals = Off
++;fbsql.default_database =
+ ;fbsql.default_database_password =
+ ;fbsql.default_host =
+ ;fbsql.default_password =
+@@ -898,8 +1219,49 @@
+ ;fbsql.max_links = 128
+ ;fbsql.max_persistent = -1
+ ;fbsql.max_results = 128
+-;fbsql.batchSize = 1000
++
++[gd]
++; Tell the jpeg decode to libjpeg warnings and try to create
++; a gd image. The warning will then be displayed as notices
++; disabled by default
++;gd.jpeg_ignore_warning = 0
++
++[exif]
++; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
++; With mbstring support this will automatically be converted into the encoding
++; given by corresponding encode setting. When empty mbstring.internal_encoding
++; is used. For the decode settings you can distinguish between motorola and
++; intel byte order. A decode setting cannot be empty.
++;exif.encode_unicode = ISO-8859-15
++;exif.decode_unicode_motorola = UCS-2BE
++;exif.decode_unicode_intel = UCS-2LE
++;exif.encode_jis =
++;exif.decode_jis_motorola = JIS
++;exif.decode_jis_intel = JIS
++
++[Tidy]
++; The path to a default tidy configuration file to use when using tidy
++;tidy.default_config = /usr/local/lib/php/default.tcfg
++
++; Should tidy clean and repair output automatically?
++; WARNING: Do not use this option if you are generating non-html content
++; such as dynamic images
++tidy.clean_output = Off
++
++[soap]
++; Enables or disables WSDL caching feature.
++soap.wsdl_cache_enabled=1
++; Sets the directory name where SOAP extension will put cache files.
++soap.wsdl_cache_dir="/tmp"
++; (time to live) Sets the number of second while cached file will be used
++; instead of original one.
++soap.wsdl_cache_ttl=86400
+
+ ; Local Variables:
+ ; tab-width: 4
+ ; End:
++
++; MySQL extensions default connection charset settings
++;mysql.connect_charset = utf8
++;mysqli.connect_charset = utf8
++;pdo_mysql.connect_charset = utf8
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_rc.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_rc.conf.template.in-2.1.patch
new file mode 100644
index 0000000..b7dc03c
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_rc.conf.template.in-2.1.patch
@@ -0,0 +1,15 @@
+--- kolabd/kolabd/templates/rc.conf.template.in 2006-07-20 09:17:29.000000000 +0200
++++ kolabd/kolabd/templates/rc.conf.template.in.gentoo 2006-07-20 10:01:49.000000000 +0200
+@@ -1,8 +1,11 @@
+ KOLAB_META_START
+-TARGET=@sysconfdir@/rc.conf
++TARGET=@sysconfdir@/kolab/rc.conf
+ PERMISSIONS=0644
+ OWNERSHIP=@kolab_musr@:@kolab_mgrp@
+ KOLAB_META_END
++# This file is unnecessary for Kolab on Gentoo. Need to ensure that
++# it creates no problem not to have it in the templates dir.
++
+ # (c) 2004 Steffen Hansen <steffen@klaralvdalens-datakonsult.se> (Klaralvdalens Datakonsult AB)
+ #
+ # This program is Free Software under the GNU General Public License (>=v2).
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch
new file mode 100644
index 0000000..75020c4
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_saslauthd.conf.template.in-2.1.patch
@@ -0,0 +1,12 @@
+--- kolabd/kolabd/templates/saslauthd.conf.template.in 2006-07-20 09:17:29.000000000 +0200
++++ kolabd/kolabd/templates/saslauthd.conf.template.in.gentoo 2006-07-20 10:01:50.000000000 +0200
+@@ -1,7 +1,7 @@
+ KOLAB_META_START
+ TARGET=@sasl_authdconffile@
+-PERMISSIONS=0600
+-OWNERSHIP=@kolab_musr@:@kolab_mgrp@
++PERMISSIONS=0640
++OWNERSHIP=root:root
+ KOLAB_META_END
+ # (c) 2003 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
+ # (c) 2003 Martin Konold <martin.konold@erfrakon.de>
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch
new file mode 100644
index 0000000..ebae596
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_session_vars.php.template.in-2.1.patch
@@ -0,0 +1,14 @@
+--- kolabd/kolabd/templates/session_vars.php.template.in 2006-07-20 09:17:29.000000000 +0200
++++ kolabd/kolabd/templates/session_vars.php.template.in.gentoo 2006-07-20 10:01:51.000000000 +0200
+@@ -21,7 +21,10 @@
+ * since we source this file on every invokation anyway.
+ */
+
+-@session_start();
++if(session_id() == "")
++{
++ @session_start();
++}
+
+ $_SESSION['fqdnhostname'] = "@@@fqdnhostname@@@";
+ $_SESSION['ldap_master_uri'] = "@@@ldap_master_uri@@@";
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch
new file mode 100644
index 0000000..9d5392c
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-2.1.patch
@@ -0,0 +1,13 @@
+--- kolabd/kolabd/templates/slapd.conf.template.in 2007-05-10 15:19:40.000000000 +0200
++++ kolabd/kolabd/templates/slapd.conf.template.in.gentoo 2007-05-10 15:22:48.000000000 +0200
+@@ -12,6 +12,10 @@
+
+ # this file is automatically written by the Kolab config backend and should have the
+ # file mode 0640
++modulepath /usr/lib/openldap/openldap/
++moduleload back_monitor
++moduleload refint
++moduleload unique
+
+ # manual additions are lost unless made to the template in the Kolab config directory
+ # the template is @sysconfdir@/kolab/templates/slapd.conf.template
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch
new file mode 100644
index 0000000..ae9579a
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_slapd.conf.template.in-use-horde-2.1.patch
@@ -0,0 +1,22 @@
+--- kolabd/kolabd/templates/slapd.conf.template.in 2007-05-10 15:19:40.000000000 +0200
++++ kolabd/kolabd/templates/slapd.conf.template.in.horde.gentoo 2007-05-10 15:23:45.000000000 +0200
+@@ -12,6 +12,10 @@
+
+ # this file is automatically written by the Kolab config backend and should have the
+ # file mode 0640
++modulepath /usr/lib/openldap/openldap/
++moduleload back_monitor
++moduleload refint
++moduleload unique
+
+ # manual additions are lost unless made to the template in the Kolab config directory
+ # the template is @sysconfdir@/kolab/templates/slapd.conf.template
+@@ -21,7 +25,7 @@
+ include @ldapserver_schemadir@/inetorgperson.schema
+ include @ldapserver_schemadir@/rfc2739.schema
+ include @ldapserver_schemadir@/kolab2.schema
+-#include @ldapserver_schemadir@/horde.schema
++include @ldapserver_schemadir@/horde.schema
+
+ pidfile @ldapserver_pidfile@
+ replica-pidfile @ldapserverslurpd_pidfile@
diff --git a/net-mail/kolabd/files/kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch b/net-mail/kolabd/files/kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch
new file mode 100644
index 0000000..4cf9247
--- /dev/null
+++ b/net-mail/kolabd/files/kolabd_kolabd_templates_smtpd.conf.template.in-2.1.patch
@@ -0,0 +1,10 @@
+--- kolabd/kolabd/templates/smtpd.conf.template.in 2006-07-20 09:17:29.000000000 +0200
++++ kolabd/kolabd/templates/smtpd.conf.template.in.gentoo 2007-05-03 10:34:30.000000000 +0200
+@@ -5,3 +5,7 @@
+ KOLAB_META_END
+ pwcheck_method: saslauthd
+ mech_list: plain login
++
++# This is a completely unnecessary setting, but it makes the
++# cyrus-sasl plugin loader shut up about an invalid auxprop parameter
++ldapdb_uri: ldap://localhost
diff --git a/net-mail/kolabd/files/kolabvirtual.2.1.postfix b/net-mail/kolabd/files/kolabvirtual.2.1.postfix
new file mode 100644
index 0000000..d347c2b
--- /dev/null
+++ b/net-mail/kolabd/files/kolabvirtual.2.1.postfix
@@ -0,0 +1,14 @@
+# (c) 2003 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
+# (c) 2003 Martin Konold <martin.konold@erfrakon.de>
+# This program is Free Software under the GNU General Public License (>=v2).
+# Read the file COPYING that comes with this packages for details.
+
+# this file is automatically written by the Kolab config backend
+# manual additions are lost unless made to the template in the Kolab config directory
+
+# manual additions are lost unless made to the template in the Kolab config directory
+# the template is @sysconfdir@/kolab/templates/virtual.template
+
+# Allows sending mails to "kolab+shared.*@.*"
+
+/^(kolab\+.*)@(.*)/ ${1}@${2}
diff --git a/net-mail/kolabd/files/local.cf.use-spam-2.1.template b/net-mail/kolabd/files/local.cf.use-spam-2.1.template
new file mode 100644
index 0000000..17d7fc5
--- /dev/null
+++ b/net-mail/kolabd/files/local.cf.use-spam-2.1.template
@@ -0,0 +1,85 @@
+KOLAB_META_START
+TARGET=/etc/mail/spamassassin/local.cf
+PERMISSIONS=0644
+OWNERSHIP=root:root
+KOLAB_META_END
+# This is the right place to customize your installation of SpamAssassin.
+#
+# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
+# tweaked.
+#
+# Only a small subset of options are listed below
+#
+###########################################################################
+
+# Add *****SPAM***** to the Subject header of spam e-mails
+#
+# rewrite_header Subject *****SPAM*****
+
+
+# Save spam messages as a message/rfc822 MIME attachment instead of
+# modifying the original message (0: off, 2: use text/plain instead)
+#
+# report_safe 1
+
+
+# Set which networks or hosts are considered 'trusted' by your mail
+# server (i.e. not spammers)
+#
+# trusted_networks 212.17.35.
+
+
+# Set file-locking method (flock is not safe over NFS, but is faster)
+#
+# lock_method flock
+
+
+# Set the threshold at which a message is considered spam (default: 5.0)
+#
+# required_score 5.0
+
+
+# Use Bayesian classifier (default: 1)
+#
+# use_bayes 1
+
+
+# Bayesian classifier auto-learning (default: 1)
+#
+# bayes_auto_learn 1
+
+
+# Set headers which may provide inappropriate cues to the Bayesian
+# classifier
+#
+# bayes_ignore_header X-Bogosity
+# bayes_ignore_header X-Spam-Flag
+# bayes_ignore_header X-Spam-Status
+
+
+# Sensitive data, such as database connection info, should
+# be stored in /etc/mail/spamassassin/secrets.cf with
+# appropriate permissions
+# This is the right place to customize your installation of SpamAssassin.
+#
+# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
+# tweaked.
+#
+###########################################################################
+#
+# rewrite_subject 0
+# report_safe 1
+# trusted_networks 212.17.35.
+
+use_dcc 1
+use_pyzor 1
+use_razor2 1
+razor_config /etc/mail/razor/razor-agent.conf
+use_bayes 1
+bayes_auto_learn 1
+bayes_auto_learn_threshold_nonspam 0.1
+bayes_auto_learn_threshold_spam 12.0
+allow_user_rules 0
+bayes_path /var/amavis/.spamassassin/bayes
+bayes_file_mode 770
+report_safe 1
diff --git a/net-mail/kolabd/files/powered-by-gentoo.jpg b/net-mail/kolabd/files/powered-by-gentoo.jpg
new file mode 100644
index 0000000..02b90d7
--- /dev/null
+++ b/net-mail/kolabd/files/powered-by-gentoo.jpg
Binary files differ
diff --git a/net-mail/kolabd/files/relocated.2.1.postfix b/net-mail/kolabd/files/relocated.2.1.postfix
new file mode 100644
index 0000000..9cea65c
--- /dev/null
+++ b/net-mail/kolabd/files/relocated.2.1.postfix
@@ -0,0 +1,17 @@
+##
+## @l_prefix@/etc/postfix/relocated -- relocate obsolete addresses
+##
+## Searched for relocated addresses user@domain, user and @domain
+## (in this order). It bounces mail for all recipients.
+##
+
+# Syntax (see relocated(5)):
+# | user@domain address
+# | user address
+# | @domain address
+#
+# Examples:
+# | john@invalid john@example.com
+# | john john@example.com
+# | @invalid john@example.com
+
diff --git a/net-mail/kolabd/files/v310.pre.use-spam-2.1.template b/net-mail/kolabd/files/v310.pre.use-spam-2.1.template
new file mode 100644
index 0000000..cc68a84
--- /dev/null
+++ b/net-mail/kolabd/files/v310.pre.use-spam-2.1.template
@@ -0,0 +1,83 @@
+KOLAB_META_START
+TARGET=/etc/mail/spamassassin/v310.pre
+PERMISSIONS=0644
+OWNERSHIP=root:root
+KOLAB_META_END
+# This is the right place to customize your installation of SpamAssassin.
+#
+# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
+# tweaked.
+#
+# This file was installed during the installation of SpamAssassin 3.1.0,
+# and contains plugin loading commands for the new plugins added in that
+# release. It will not be overwritten during future SpamAssassin installs,
+# so you can modify it to enable some disabled-by-default plugins below,
+# if you so wish.
+#
+###########################################################################
+
+# DCC - perform DCC message checks.
+#
+# DCC is disabled here because it is not open source. See the DCC
+# license for more details.
+#
+loadplugin Mail::SpamAssassin::Plugin::DCC
+
+# Pyzor - perform Pyzor message checks.
+#
+loadplugin Mail::SpamAssassin::Plugin::Pyzor
+
+# Razor2 - perform Razor2 message checks.
+#
+# Razor2 is disabled here because it is not available for unlimited free
+# use. It is currently free for personal use, subject to capacity
+# constraints. See the Cloudmark SpamNet Service Policy for more details.
+#
+loadplugin Mail::SpamAssassin::Plugin::Razor2
+
+# SpamCop - perform SpamCop message reporting
+#
+loadplugin Mail::SpamAssassin::Plugin::SpamCop
+
+# AntiVirus - some simple anti-virus checks, this is not a replacement
+# for an anti-virus filter like Clam AntiVirus
+#
+#loadplugin Mail::SpamAssassin::Plugin::AntiVirus
+
+# AWL - do auto-whitelist checks
+#
+loadplugin Mail::SpamAssassin::Plugin::AWL
+
+# AutoLearnThreshold - threshold-based discriminator for Bayes auto-learning
+#
+loadplugin Mail::SpamAssassin::Plugin::AutoLearnThreshold
+
+# TextCat - language guesser
+#
+#loadplugin Mail::SpamAssassin::Plugin::TextCat
+
+# AccessDB - lookup from-addresses in access database
+#
+#loadplugin Mail::SpamAssassin::Plugin::AccessDB
+
+# WhitelistSubject - Whitelist/Blacklist certain subject regular expressions
+#
+loadplugin Mail::SpamAssassin::Plugin::WhiteListSubject
+
+###########################################################################
+# experimental plugins
+
+# DomainKeys - perform DomainKeys verification
+#
+# External modules required for use, see INSTALL for more information.
+#
+#loadplugin Mail::SpamAssassin::Plugin::DomainKeys
+
+# MIMEHeader - apply regexp rules against MIME headers in the message
+#
+loadplugin Mail::SpamAssassin::Plugin::MIMEHeader
+
+# ReplaceTags
+#
+loadplugin Mail::SpamAssassin::Plugin::ReplaceTags
+
diff --git a/net-mail/kolabd/kolabd-2.1.ebuild b/net-mail/kolabd/kolabd-2.1.ebuild
new file mode 100644
index 0000000..c56a84b
--- /dev/null
+++ b/net-mail/kolabd/kolabd-2.1.ebuild
@@ -0,0 +1,452 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+MY_P=kolabd-2.1-gentoo-20070510
+
+DESCRIPTION="The kolab server"
+HOMEPAGE="http://www.kolab.org"
+SRC_URI="http://build.pardus.de/downloads/${MY_P}.tar.bz2"
+
+SLOT="0"
+
+LICENSE="GPL-2"
+KEYWORDS="x86 amd64"
+IUSE="horde spam webdav legacy"
+
+DEPEND=""
+
+RDEPEND="
+!<net-libs/c-client-2004g-r20
+=net-libs/c-client-2004g-r20
+!>net-libs/c-client-2004g-r20
+
+!<net-mail/cyrus-imapd-2.3.9-r20
+=net-mail/cyrus-imapd-2.3.9-r20
+!>net-mail/cyrus-imapd-2.3.9-r20
+
+!<net-mail/cyrus-imap-admin-2.3.9-r20
+=net-mail/cyrus-imap-admin-2.3.9-r20
+!>net-mail/cyrus-imap-admin-2.3.9-r20
+
+=dev-lang/php-5.2.4-r20
+!>dev-lang/php-5.2.4-r20
+
+>=app-antivirus/clamav-0.90
+>=mail-mta/postfix-2.4.0
+>=www-servers/apache-2.2.0
+>=net-nds/openldap-2.3.35-r1
+
+dev-perl/URI
+dev-perl/perl-ldap
+dev-perl/Net-Netmask
+dev-perl/TermReadKey
+
+mail-filter/spamassassin
+mail-filter/amavisd-new
+dev-libs/cyrus-sasl
+
+legacy? (
+net-ftp/proftpd
+)
+
+spam? (
+mail-filter/dcc
+mail-filter/razor
+dev-python/pyzor
+)
+
+>=dev-perl/perl-kolab-2.1
+
+net-mail/kolab-resource-handlers
+net-mail/kolab-webadmin
+"
+
+PDEPEND="
+horde? (
+www-apps/horde-kolab-all
+)
+"
+
+S=${WORKDIR}/${MY_P}
+
+detect_skiplist_db() {
+
+ IMAPD_DB_FORMAT="none"
+
+ if [ -f /var/imap/mailboxes.db ]; then
+ if [ "`head -c 17 /var/imap/mailboxes.db | tail -c 13`" == "skiplist file" ]; then
+ IMAPD_DB_FORMAT="skiplist"
+ else
+ IMAPD_DB_FORMAT="other"
+ fi
+ fi
+
+ if [ "${IMAPD_DB_FORMAT}" == "skiplist" ]; then
+
+ ewarn "Your cyrus-imapd databases are in the older \"skiplist\" format."
+ ewarn "kolabd-20070216 changes to \"berkeley\" format and your databases"
+ ewarn "must be converted! This ebuild will fail until you manually"
+ ewarn "converted the files."
+ ewarn
+ ewarn "These are the necessary commands for the conversion:"
+ ewarn
+ ewarn "# Ensure that cyrus-imap is not running"
+ ewarn "/etc/init.d/cyrus stop"
+ ewarn "# Move the old databases away"
+ ewarn "mv /var/imap/mailboxes.db /var/imap/mailboxes.db-skiplist"
+ ewarn "mv /var/imap/annotations.db /var/imap/annotations.db-skiplist"
+ ewarn "# Convert the databases"
+ ewarn "/usr/lib/cyrus/cvt_cyrusdb /var/imap/mailboxes.db-skiplist skiplist /var/imap/mailboxes.db berkeley"
+ ewarn "/usr/lib/cyrus/cvt_cyrusdb /var/imap/annotations.db-skiplist skiplist /var/imap/annotations.db berkeley"
+ ewarn "chown -R cyrus:mail /var/imap/annotations.db /var/imap/mailboxes.db /var/imap/db"
+ ewarn "# Emerge the new kolabd ebuild again"
+ ewarn "emerge kolabd"
+ ewarn "# Update the configuration"
+ ewarn "kolabconf"
+ ewarn "# Restart the cyrus-imapd server"
+ ewarn "/etc/init.d/cyrus start"
+
+ die
+
+ elif [ "${IMAPD_DB_FORMAT}" == "other" ]; then
+
+ einfo "Your cyrus-imapd databases do not seem to have the \"skiplist\""
+ einfo "format. This ebuild will now assume they are in berkeley format"
+ einfo "which is necessary for kolabd-20070216."
+
+ fi
+}
+
+detect_apache_modules() {
+
+ APACHE_MODULES="mod_authn_alias"
+
+ APACHE_BUILTINS="/etc/apache2/apache2-builtin-mods"
+
+ if [ -f "${APACHE_BUILTINS}" ]; then
+ for MOD in ${APACHE_MODULES}
+ do
+ if [ "`grep $MOD ${APACHE_BUILTINS}`" == "" -o "`grep $MOD ${APACHE_BUILTINS} | grep disabled`" != "" ]; then
+
+ ewarn "The module $MOD in your apache configuration file"
+ ewarn "${APACHE_BUILTINS} has been set to \"disabled\"."
+ ewarn "Please set it to \"shared\" and re-emerge apache."
+
+ die
+ else
+ einfo "Apache module ${MOD} seems to be activated."
+ fi
+ done
+ else
+ einfo "There exists no /etc/apache2/apache2-builtin-mods. The"
+ einfo "ebuild is unable to determine the modules build for your"
+ einfo "Aapche. Assuming that everyting is okay."
+ fi
+}
+
+detect_bad_clamav_log() {
+
+ owner=`stat --printf="%U" /var/log/clamav/clamd.log`
+ if [ "$owner" != "amavis" ]; then
+ ewarn "/var/log/clamav/clamd.log is not owned by amavis!"
+ ewarn "Restarting clamav may fail."
+ ewarn "Please run"
+ ewarn "chown amavis\\: /var/log/clamav/clamd.log"
+ fi
+}
+
+add_user_to_group() {
+
+ #############################################################
+ # HACK:
+ # I did not see any other ebuild that adds existing users
+ # to new groups. So I'm not certain it is ok to handle it
+ # like this since I need to disable the sandbox to access
+ # the /etc/group file.
+ # The given users need access to the ssl certificates which
+ # is possible if they belong to kolab-r
+
+ local oldsandbox=${SANDBOX_ON}
+ export SANDBOX_ON="0"
+ gpasswd -a $1 $2
+ export SANDBOX_ON=${oldsandbox}
+}
+
+pkg_setup() {
+
+ if ! built_with_use net-nds/openldap berkdb crypt overlays perl ssl ; then
+ eerror "You MUST re-emerge openldap with berkdb, crypt,"
+ eerror "overlays, perl and ssl enabled. Please add these use flags"
+ eerror "to your USE variable and re-emerge openldap!"
+ die "Current openldap installation does not support Kolabd!"
+ fi
+
+ if built_with_use net-nds/openldap minimal ; then
+ eerror "You MUST re-emerge openldap without the"
+ eerror "minimal use flag enabled. Please remove this use flags"
+ eerror "from your USE variable and re-emerge openldap!"
+ die "Current openldap installation does not support Kolabd!"
+ fi
+
+ if ! built_with_use dev-libs/cyrus-sasl ldap ssl; then
+ eerror "You MUST re-emerge cyrus-sasl with ldap and ssl support."
+ eerror "Please add the these use flags"
+ eerror "to your USE variable and re-emerge cyrus-sasl!"
+ die "Current cyrus-sasl installation does not support Kolabd!"
+ fi
+
+ if ! built_with_use mail-mta/postfix sasl ssl ldap ; then
+ eerror "You MUST re-emerge postfix with ldap, sasl,"
+ eerror "and ssl enabled. Please add these use flags"
+ eerror "to your USE variable and re-emerge postfix!"
+ die "Current postfix installation does not support Kolabd!"
+ fi
+
+ if ! built_with_use net-mail/cyrus-imapd kolab ssl ; then
+ eerror "You MUST re-emerge cyrus-imapd with kolab"
+ eerror "and ssl enabled. Please add both use flags"
+ eerror "to your USE variable and re-emerge cyrus-imapd!"
+ die "Current cyrus-imapd installation does not support Kolabd!"
+ fi
+
+ if ! built_with_use net-libs/c-client kolab; then
+ eerror "You MUST re-emerge c-client with kolab"
+ eerror "enabled. Please add the use flag"
+ eerror "to your USE variable and re-emerge c-client!"
+ die "Current cyrus-imapd installation does not support Kolabd!"
+ fi
+
+ if ! built_with_use www-servers/apache ssl ; then
+ eerror "You MUST re-emerge apache with ssl support."
+ eerror "Please add the ssl use flag"
+ eerror "to your USE variable and re-emerge apache!"
+ die "Current apache installation does not support Kolabd!"
+ fi
+
+ if use legacy ; then
+ if ! built_with_use net-ftp/proftpd ssl ldap ; then
+ eerror "You MUST re-emerge proftpd with ldap"
+ eerror "and ssl enabled. Please add both use flags"
+ eerror "to your USE variable and re-emerge proftpd!"
+ die "Current proftpd installation does not support Kolabd!"
+ fi
+ fi
+
+ # Perform some important sanity checks.
+ detect_apache_modules
+ detect_skiplist_db
+ detect_bad_clamav_log
+
+ # This needs to be in pkg_setup so that it will also be done
+ # when using binary packages.
+
+ add_user_to_group ldap kolab-r
+ add_user_to_group cyrus kolab-r
+ add_user_to_group postfix kolab-r
+ add_user_to_group apache kolab-r
+}
+
+src_unpack() {
+
+ unpack ${A} && cd "${S}"
+
+ for PATCH in ${FILESDIR}/*-${PV}.patch
+ do
+ for USEFLAG in webdav horde spam
+ do
+ if [ -z "${PATCH/*-use-${USEFLAG}-${PV}.patch/}" ]; then
+ use ${USEFLAG} && epatch ${PATCH} && PATCHED="${PATCHED} ${PATCH/-use-${USEFLAG}/}"
+ fi
+ done
+ done
+
+ for PATCH in ${FILESDIR}/*-${PV}.patch
+ do
+ patch=1
+ for NP in ${PATCHED}
+ do
+ if [ "${NP}" == "${PATCH}" ]; then
+ patch=0
+ fi
+ done
+ if [ -n "${PATCH/*-use-*-${PV}.patch/}" ]; then
+ if [ ${patch} -gt 0 ]; then
+ epatch ${PATCH}
+ fi
+ fi
+ done
+
+}
+
+src_compile() {
+
+ local myconf
+ myconf="${myconf} --with-dist=gentoo"
+ myconf="${myconf} --libexecdir=/usr/lib"
+ myconf="${myconf} --localstatedir=/var"
+
+ econf ${myconf} || die
+ emake || die
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed"
+
+ #############################################################
+ # Remove httpd templates
+ rm ${D}/etc/kolab/templates/httpd.*
+
+ #############################################################
+ # Add additional templates
+
+ cd "${FILESDIR}"
+
+ for TEMPLATE in *-${PV}.template
+ do
+ for USEFLAG in webdav horde spam
+ do
+ if [ -z "${TEMPLATE/*.use-${USEFLAG}-${PV}.template/}" ]; then
+ if use ${USEFLAG}; then
+ cp ${TEMPLATE} ${D}/etc/kolab/templates/${TEMPLATE/.use-${USEFLAG}-${PV}/} \
+ && TEMPLATED="${TEMPLATED} ${TEMPLATE/use-${USEFLAG}-/}"
+ fi
+ fi
+ done
+ done
+
+ for TEMPLATE in *.${PV}.template
+ do
+ template=1
+ for NP in ${TEMPLATED}
+ do
+ if [ "${NP}" == "${TEMPLATE}" ]; then
+ template=0
+ fi
+ done
+ if [ -n "${TEMPLATE/*.use-*-${PV}.template/}" ]; then
+ if [ ${template} -gt 0 ]; then
+ cp ${TEMPLATE} ${D}/etc/kolab/templates/${TEMPLATE/.${PV}/}
+ fi
+ fi
+ done
+
+ for POSTFIX in *.${PV}.postfix
+ do
+ mkdir -p ${D}/etc/postfix
+ cp ${POSTFIX} ${D}/etc/postfix/${POSTFIX/.${PV}.postfix/}
+ done
+
+ cd "${S}"
+
+ # Create original dist templates
+ for TMPL in ${D}/etc/kolab/templates/*
+ do
+ cp $TMPL $TMPL.dist
+ done
+
+ #############################################################
+ # Keep necessary directories
+
+ VARDIRS=$(find ${D}/var -type d)
+ for DIR in ${VARDIRS}
+ do
+ keepdir ${DIR/${D}/}
+ done
+
+ #############################################################
+ # Provide basic web root
+
+ mkdir -p ${D}/var/www/kolab/htdocs/server/services
+ insinto /var/www/kolab/htdocs/server/
+ insopts --mode=0644 --owner=root --group=root
+ doins ${FILESDIR}/favicon.ico
+ doins ${FILESDIR}/kolab_logo.small.png
+ doins ${FILESDIR}/powered-by-gentoo.jpg
+ doins ${FILESDIR}/index.php
+
+ # now add the services to the service directory
+ insinto /var/www/kolab/htdocs/server/services
+ insopts --mode=0644 --owner=root --group=root
+ doins ${FILESDIR}/admin.service
+
+ if use horde ; then
+ doins ${FILESDIR}/horde.service
+ fi
+
+ #############################################################
+ # Fix permissions
+
+ fowners apache:apache /var/cache/httpd_sessions
+
+ fowners kolab:kolab /etc/kolab/kolab.globals
+
+ insinto /etc/init.d
+ insopts --mode=0755 --owner=root --group=root
+ if use legacy ; then
+ cp ${FILESDIR}/kolabd.legacy ${S}/kolabd
+ doins ${S}/kolabd
+ else
+ doins ${FILESDIR}/kolabd
+ rm ${D}/etc/kolab/templates/proftpd.conf.template*
+ fi
+
+ # FIXME
+ # This is kolab-resource-handlers stuff. But I don't want to fix the
+ # dependancies right now.
+ keepdir /var/cache/freebusy/
+ fowners apache:apache /var/cache/freebusy/
+
+ keepdir /var/log/kolab/freebusy
+ fowners apache:apache /var/log/kolab/freebusy
+
+ keepdir /var/log/kolab/resmgr
+ fowners kolab-n:kolab-n /var/log/kolab/resmgr
+
+ keepdir /var/amavis/clamav
+ fowners amavis:amavis /var/amavis/clamav
+}
+
+
+pkg_postinst() {
+
+ echo
+ ewarn "This new version changes the format of some central cyrus-imapd databases."
+ ewarn "The ebuild tries to automatically detect any problems but please be aware"
+ ewarn "that this may fail and you need to debug your cyrus-admin configuration!"
+ echo
+ ewarn "You need to execute "
+ ewarn ""
+ ewarn "/usr/share/${PN}/scripts/kolab_bootstrap -b"
+ ewarn ""
+ ewarn "to complete the kolab installation"
+ echo
+
+ if use horde; then
+ echo
+ ewarn "*** USE FLAG HORDE ***"
+ ewarn
+ ewarn "This use flag will install horde for use with kolab and"
+ ewarn "in addition pathes the server for the horde installation."
+ ewarn
+ ewarn "Please note that the horde packages are NOT AT ALL in a "
+ ewarn "stable state. Do not expect horde to work on your machine."
+ echo
+ fi
+
+ if use spam; then
+ echo
+ ewarn "*** USE FLAG SPAM ***"
+ ewarn
+ ewarn "If you wish to register with razor so that you can also report spam,"
+ ewarn "you can run"
+ ewarn "mkdir -p /etc/mail/razor && chown amavis:amavis /etc/mail/razor"
+ ewarn "su -s /bin/bash - amavis razor-admin -home=/etc/mail/razor -register my@mail.com"
+ ewarn "su -s /bin/bash - amavis razor-admin -home=/etc/mail/razor -create"
+ ewarn "Edit /etc/mail/razor/razor-agent.conf afterwards and link to the newly created identity"
+ echo
+ fi
+
+}
diff --git a/net-mail/kolabd/metadata.xml b/net-mail/kolabd/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/net-mail/kolabd/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/profiles/package.mask b/profiles/package.mask
new file mode 100644
index 0000000..ff5e0eb
--- /dev/null
+++ b/profiles/package.mask
@@ -0,0 +1,15 @@
+#################################################
+# YOU MAY UNMASK THESE - STANDARD DEVELOPMENT
+#################################################
+
+#################################################
+# DO NOT UNMASK THESE - IT MIGHT BREAK THE SERVER
+#################################################
+
+# Gunnar Wrobel <wrobel@pardus.de> (15 Feb 2007)
+# Patched applications that should not be superceded
+# by portage updates.
+>dev-lang/php-5.2.4-r20
+>net-libs/c-client-2004g-r20
+>net-mail/cyrus-imap-admin-2.3.9-r20
+>net-mail/cyrus-imapd-2.3.9-r20
diff --git a/profiles/repo_name b/profiles/repo_name
new file mode 100644
index 0000000..cd600bd
--- /dev/null
+++ b/profiles/repo_name
@@ -0,0 +1 @@
+kolab2
diff --git a/profiles/use.desc b/profiles/use.desc
new file mode 100644
index 0000000..33f561a
--- /dev/null
+++ b/profiles/use.desc
@@ -0,0 +1,2 @@
+horde - patch Kolab for the Horde installation
+kolab - patch a service for Kolab
diff --git a/skel.ChangeLog b/skel.ChangeLog
new file mode 100644
index 0000000..8b65f19
--- /dev/null
+++ b/skel.ChangeLog
@@ -0,0 +1,67 @@
+# ChangeLog for <CATEGORY>/<PACKAGE_NAME>
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*<PACKAGE_NAME>-<PACKAGE_VERSION>-<PACKAGE_RELEASE> (DD MMM YYYY)
+
+ DD MMM YYYY; YOUR_NAME <YOUR_EMAIL> changed_file1, changed_file2 :
+ Initial import. Ebuild submitted by submitter_name <submitter_email>.
+ Note that the "changed_file" listing is optional if you are simply bumping
+ the rev of the ebuild and are only making changes to the .ebuild file
+ itself. Also note that we now have a single unified paragraph rather than
+ having the first line separated from the rest by a newline. Everything
+ should be in one block like this. (note by drobbins, 16 Jul 2002)
+
+ DD MMM YYYY; YOUR_NAME <YOUR_EMAIL> changed_file1, changed_file2: this is
+ an earlier ChangeLog entry.
+
+-- Explanation of ChangeLog format:
+
+ ***************************************************************************
+ THIS IS IMPORTANT: The ChangeLog format is a *chronological* account of all
+ changes made to a set of ebuilds. That means that the most recent ChangeLog
+ entry *always* goes at the top of the file. More explanation below.
+ ***************************************************************************
+
+ ***************************************************************************
+ ANOTHER IMPORTANT NOTE: There are some ChangeLogs that don't follow this
+ format and organize all changes under the "correct" "*" entry. This is not
+ correct. However, rather than making a concerted effort to fix these
+ ChangeLogs, we should spend our energy defining a comprehensive and strict
+ XML-based ChangeLog format which we then migrate to. But for any entries to
+ any ChangeLog that *you* make, please make sure to always add entries to the
+ top of the file like a good boy/girl. Even do this if it's clear that you're
+ adding an entry to a b0rked ChangeLog.
+ ***************************************************************************
+
+ This changelog is targeted to users. This means that the comments should be
+ well explained and written in clean English.
+
+ Every new version or revision of the package should be marked by a '*'
+ separator line as above to indicate where in the chronology it was first
+ added to our CVS tree. Any changes since the last revision, really _any
+ changes at all_ have to be added to the top of the file, underneath the
+ initial copyright and cvs header comments, in exactly the same format as this
+ comment. If you are modifying older ebuilds, simply note them as changed
+ files and add your entry to the top of the ChangeLog. Resist the temptation
+ to "organize" your ChangeLog entries by placing them under the "correct" "*"
+ entries -- this isn't the purpose of the "*" entries.
+
+ This means that you start with header line that has the following format,
+ indented two spaces:
+
+ DD MMM YYYY; your_name <your_email> changed_file1, changed_file2: Your
+ explanation should follow. It should be indented and wrapped at a line width
+ of 80 characters. The changed_files can be omitted if they are obvious; for
+ example, if you are only modifying the .ebuild file and committing a new rev
+ of a package. Any details about what exactly changed in the code should be
+ added as a message when the changes are committed to cvs, not in this file.
+
+-- A word regarding credit:
+
+ Please add credit information ("ebuild submitted by ...", "patch submitted
+ by ...") to the ChangeLog. Do not add this information to the ebuilds
+ themselves.
+
+ And remember: Give credit where credit is due. We're all doing this for
+ free, so the best we can hope (and expect!) to receive is credit.
diff --git a/www-apps/horde-imp-kolab/ChangeLog b/www-apps/horde-imp-kolab/ChangeLog
new file mode 100644
index 0000000..566426b
--- /dev/null
+++ b/www-apps/horde-imp-kolab/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for www-apps/horde-imp-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ -files/conf.php_horde-imp-kolab-20070713.config,
+ -files/servers.php_horde-imp-kolab-20070713.config,
+ +files/conf.php_4.2_alpha.config, +files/servers.php_4.2_alpha.config,
+ +metadata.xml, +horde-imp-kolab-4.2_alpha.ebuild,
+ -horde-imp-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
diff --git a/www-apps/horde-imp-kolab/Manifest b/www-apps/horde-imp-kolab/Manifest
new file mode 100644
index 0000000..c703a90
--- /dev/null
+++ b/www-apps/horde-imp-kolab/Manifest
@@ -0,0 +1,24 @@
+AUX conf.php_4.2_alpha.config 2788 RMD160 8e78bdfc6bd2030c9ede5e42f386be4c514a0b45 SHA1 bd4b0dba2d514cd4cff2a553517ec412a37c055f SHA256 f2fa7c658fa95f3b3f6987f537549796be75ba446a913d7c1e74f305750ab0a3
+MD5 4216a1490910407928d06da3f0981014 files/conf.php_4.2_alpha.config 2788
+RMD160 8e78bdfc6bd2030c9ede5e42f386be4c514a0b45 files/conf.php_4.2_alpha.config 2788
+SHA256 f2fa7c658fa95f3b3f6987f537549796be75ba446a913d7c1e74f305750ab0a3 files/conf.php_4.2_alpha.config 2788
+AUX servers.php_4.2_alpha.config 12271 RMD160 26db8c84630885e76fde486c2f1cacba704e6cfe SHA1 27ee4a3ae7c019c06410a853bd3f0400c8001065 SHA256 b1ac75545caf00a87ebd002b20da1a4e7b3f2571dbdb7e8ad6ebf4395bb986f3
+MD5 c33707ad8bb4dad0234b13f9c6743a1b files/servers.php_4.2_alpha.config 12271
+RMD160 26db8c84630885e76fde486c2f1cacba704e6cfe files/servers.php_4.2_alpha.config 12271
+SHA256 b1ac75545caf00a87ebd002b20da1a4e7b3f2571dbdb7e8ad6ebf4395bb986f3 files/servers.php_4.2_alpha.config 12271
+DIST imp-h3-4.2-alpha.tar.gz 4661703 RMD160 2fe5431257c0fd30d4651406c8971899a6a2afad SHA1 e289816432e57990048b89ad1ee729eb30dabb34 SHA256 8b82df494662b4ee9da8006d61634b5d0d6b40429a39420b2c300db2195ada9b
+EBUILD horde-imp-kolab-4.2_alpha.ebuild 563 RMD160 5f055acf880c09a5039c98e69174cf7e8fe81771 SHA1 b50c1523f67753cde8abfada8f950cf685f95b80 SHA256 18fa23fa7585c6f70a08efcbb3cf6df79db420ca706e4a9699671553ccd646df
+MD5 36dee194caee397cdef031ff4c6de548 horde-imp-kolab-4.2_alpha.ebuild 563
+RMD160 5f055acf880c09a5039c98e69174cf7e8fe81771 horde-imp-kolab-4.2_alpha.ebuild 563
+SHA256 18fa23fa7585c6f70a08efcbb3cf6df79db420ca706e4a9699671553ccd646df horde-imp-kolab-4.2_alpha.ebuild 563
+MISC ChangeLog 482 RMD160 37252f85e31f4a694cf0eabc0f06baa4e2178e22 SHA1 1394702a6d128504b183d2656c9925e1164f19d6 SHA256 5e80587efa2df45796137369faa9f18a0e75a90fab7efa1ab69fc8c7f2c518f9
+MD5 2bac9c82c4b4c5f91b1ee778e091fbd6 ChangeLog 482
+RMD160 37252f85e31f4a694cf0eabc0f06baa4e2178e22 ChangeLog 482
+SHA256 5e80587efa2df45796137369faa9f18a0e75a90fab7efa1ab69fc8c7f2c518f9 ChangeLog 482
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 13721af442a501dea9ff1de4eb8717dd files/digest-horde-imp-kolab-4.2_alpha 253
+RMD160 89447ab592e6e3557d3d7b29501bc4f00b1dbb91 files/digest-horde-imp-kolab-4.2_alpha 253
+SHA256 bb9f6a978f291f1472c3b2a7acb3563531c71e8a42bdb0be0bfc656c56fce2b4 files/digest-horde-imp-kolab-4.2_alpha 253
diff --git a/www-apps/horde-imp-kolab/files/conf.php_4.2_alpha.config b/www-apps/horde-imp-kolab/files/conf.php_4.2_alpha.config
new file mode 100644
index 0000000..dcc6173
--- /dev/null
+++ b/www-apps/horde-imp-kolab/files/conf.php_4.2_alpha.config
@@ -0,0 +1,64 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: imp/config/conf.xml,v 1.105 2007/06/25 16:40:09 jan 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']['fixed_folders'] = array();
+$conf['server']['sort_limit'] = 0;
+$conf['server']['cache_folders'] = 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. */
diff --git a/www-apps/horde-imp-kolab/files/digest-horde-imp-kolab-4.2_alpha b/www-apps/horde-imp-kolab/files/digest-horde-imp-kolab-4.2_alpha
new file mode 100644
index 0000000..ed63a99
--- /dev/null
+++ b/www-apps/horde-imp-kolab/files/digest-horde-imp-kolab-4.2_alpha
@@ -0,0 +1,3 @@
+MD5 441858870a7c00af9eb00c298370cee6 imp-h3-4.2-alpha.tar.gz 4661703
+RMD160 2fe5431257c0fd30d4651406c8971899a6a2afad imp-h3-4.2-alpha.tar.gz 4661703
+SHA256 8b82df494662b4ee9da8006d61634b5d0d6b40429a39420b2c300db2195ada9b imp-h3-4.2-alpha.tar.gz 4661703
diff --git a/www-apps/horde-imp-kolab/files/servers.php_4.2_alpha.config b/www-apps/horde-imp-kolab/files/servers.php_4.2_alpha.config
new file mode 100644
index 0000000..344a397
--- /dev/null
+++ b/www-apps/horde-imp-kolab/files/servers.php_4.2_alpha.config
@@ -0,0 +1,235 @@
+<?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@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@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@example.com', and the username 'jane@example.com' would be
+ * treated as 'jane@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.
+ */
+
+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' => 'imap',
+ 'params' => array(),
+ ),
+ 'acl' => array(
+ 'driver' => 'rfc2086',
+ ),
+ );
+}
diff --git a/www-apps/horde-imp-kolab/horde-imp-kolab-4.2_alpha.ebuild b/www-apps/horde-imp-kolab/horde-imp-kolab-4.2_alpha.ebuild
new file mode 100644
index 0000000..ce8b5bf
--- /dev/null
+++ b/www-apps/horde-imp-kolab/horde-imp-kolab-4.2_alpha.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-imp/horde-imp-4.1.ebuild,v 1.1 2006/03/09 23:34:00 vapier Exp $
+
+HORDE_PHP_FEATURES="imap"
+HORDE_MAJ="-h3"
+inherit horde-kolab-r4 eutils
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+servers.php_${PV}.config
+"
+
+DESCRIPTION="Horde IMP provides webmail access to IMAP/POP3 mailboxes"
+
+KEYWORDS="~x86 ~amd64"
+
+IUSE="crypt kolab"
+
+DEPEND=""
+RDEPEND=">=www-apps/horde-kolab-3.2_alpha
+ crypt? ( app-crypt/gnupg )"
diff --git a/www-apps/horde-imp-kolab/metadata.xml b/www-apps/horde-imp-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-imp-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/www-apps/horde-ingo-kolab/ChangeLog b/www-apps/horde-ingo-kolab/ChangeLog
new file mode 100644
index 0000000..b95e1ef
--- /dev/null
+++ b/www-apps/horde-ingo-kolab/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for www-apps/horde-ingo-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ -files/conf.php_horde-ingo-kolab-20070713.config,
+ -files/backends.php_horde-ingo-kolab-20070713.config,
+ +files/backends.php_1.2_alpha.config, +files/conf.php_1.2_alpha.config,
+ +metadata.xml, +horde-ingo-kolab-1.2_alpha.ebuild,
+ -horde-ingo-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
diff --git a/www-apps/horde-ingo-kolab/Manifest b/www-apps/horde-ingo-kolab/Manifest
new file mode 100644
index 0000000..46af5a8
--- /dev/null
+++ b/www-apps/horde-ingo-kolab/Manifest
@@ -0,0 +1,24 @@
+AUX backends.php_1.2_alpha.config 2180 RMD160 10607e86ea6cbfd81323297ea000743dfaf48c80 SHA1 264d1103a785dadaf0001e2d98589c9450d20c39 SHA256 55a8d62f83d5f801ed14ee805ea35977e3f047beb6d14b7148afe68e9d58151c
+MD5 5390a5f892382ebaf622ddb834cc4143 files/backends.php_1.2_alpha.config 2180
+RMD160 10607e86ea6cbfd81323297ea000743dfaf48c80 files/backends.php_1.2_alpha.config 2180
+SHA256 55a8d62f83d5f801ed14ee805ea35977e3f047beb6d14b7148afe68e9d58151c files/backends.php_1.2_alpha.config 2180
+AUX conf.php_1.2_alpha.config 656 RMD160 234083c3bc7b598e2d287452167398b366c7133b SHA1 8cb57184d67a5fab69cf4dd37e64f6acf0c949c4 SHA256 47cd29e691850cb880e3a8e22acbf0f4dcabcb9240675d505108ec8f528c60ab
+MD5 9190e524123eb3d6956928723145ceed files/conf.php_1.2_alpha.config 656
+RMD160 234083c3bc7b598e2d287452167398b366c7133b files/conf.php_1.2_alpha.config 656
+SHA256 47cd29e691850cb880e3a8e22acbf0f4dcabcb9240675d505108ec8f528c60ab files/conf.php_1.2_alpha.config 656
+DIST ingo-h3-1.2-alpha.tar.gz 1457486 RMD160 9f17d5ea03a72b4d1778f8c5a2766c30bb8b0867 SHA1 ab3a0b3cca268e814d3ef23a5deab33bb5fe737a SHA256 51731076e8189c7cbcf1dc201a68e2c8fcd1199e9ddd91d5289bf836cbfb31de
+EBUILD horde-ingo-kolab-1.2_alpha.ebuild 543 RMD160 3684dbf69138ab218c22ca3d647609c2d6a43bf4 SHA1 ba5d7dac5df2fe95ba1899503babce84ec526391 SHA256 5c398a97664eaa524e305ff8f5041ab14ef04e8979849bc4eda9c2d341ade968
+MD5 f20106e95919dd1f4d1dc894e242afdb horde-ingo-kolab-1.2_alpha.ebuild 543
+RMD160 3684dbf69138ab218c22ca3d647609c2d6a43bf4 horde-ingo-kolab-1.2_alpha.ebuild 543
+SHA256 5c398a97664eaa524e305ff8f5041ab14ef04e8979849bc4eda9c2d341ade968 horde-ingo-kolab-1.2_alpha.ebuild 543
+MISC ChangeLog 489 RMD160 626b23f6d64f162d8b1f04feac8a1144cb2cad47 SHA1 131c6294d57f30fff5246e466d3cbf921f3c8d83 SHA256 43501954cdb8f157ba6bcfe35594dc071cce45f9278e5dd3db6c256abb90ba6d
+MD5 03ecad0f2c280253efc87168d3c0352a ChangeLog 489
+RMD160 626b23f6d64f162d8b1f04feac8a1144cb2cad47 ChangeLog 489
+SHA256 43501954cdb8f157ba6bcfe35594dc071cce45f9278e5dd3db6c256abb90ba6d ChangeLog 489
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 39cc10738c1196e9ec9565a780335b8a files/digest-horde-ingo-kolab-1.2_alpha 256
+RMD160 c670fc6c20b2c122ae494550a5ae6981f326d760 files/digest-horde-ingo-kolab-1.2_alpha 256
+SHA256 62cdf543c2f2d199cca7b58a632e426d103c0421edd6e7bc51cbed931017f54b files/digest-horde-ingo-kolab-1.2_alpha 256
diff --git a/www-apps/horde-ingo-kolab/files/backends.php_1.2_alpha.config b/www-apps/horde-ingo-kolab/files/backends.php_1.2_alpha.config
new file mode 100644
index 0000000..55019ec
--- /dev/null
+++ b/www-apps/horde-ingo-kolab/files/backends.php_1.2_alpha.config
@@ -0,0 +1,53 @@
+<?php
+/**
+ * $Horde: ingo/config/backends.php.dist,v 1.20.8.4 2006/02/02 22:57:31 jan Exp $
+ *
+ * Ingo works purely on a preferred mechanism for server selection. There are
+ * a number of properties that you can set for each backend:
+ *
+ * driver: The Ingo_Driver driver to use to get the script to the
+ * backend server. Valid options:
+ * 'null' -- No backend server
+ * 'timsieved' -- Cyrus timsieved server
+ * 'vfs' -- Use Horde VFS
+ *
+ * preferred: This is the field that is used to choose which server is
+ * used. The value for this field may be a single string or an
+ * array of strings containing the hostnames to use with this
+ * server.
+ *
+ * hordeauth: Ingo uses the current logged in username and password. If
+ * you want the full username@realm to be used to connect then
+ * set this to 'full' otherwise set this to true and just the
+ * username will be used to connect to the driver.
+ *
+ * params: An array containing any additional information that the
+ * Ingo_Driver class needs.
+ *
+ * script: The type of Ingo_Script driver this server uses.
+ * Valid options:
+ * 'imap' -- IMAP client side filtering
+ * 'maildrop' -- Maildrop scripts
+ * 'procmail' -- Procmail scripts
+ * 'sieve' -- Sieve scripts
+ *
+ * scriptparams: An array containing any additional information that the
+ * Ingo_Script driver needs.
+ */
+
+/* Kolab Example (using Sieve) */
+if ($GLOBALS['conf']['kolab']['enabled']) {
+ $backends['kolab'] = array(
+ 'driver' => 'timsieved',
+ 'preferred' => '',
+ 'hordeauth' => 'full',
+ 'params' => array(
+ 'hostspec' => $GLOBALS['conf']['kolab']['imap']['server'],
+ 'logintype' => 'PLAIN',
+ 'port' => $GLOBALS['conf']['kolab']['imap']['sieveport'],
+ 'scriptname' => 'kmail-vacation.siv'
+ ),
+ 'script' => 'sieve',
+ 'scriptparams' => array()
+ );
+}
diff --git a/www-apps/horde-ingo-kolab/files/conf.php_1.2_alpha.config b/www-apps/horde-ingo-kolab/files/conf.php_1.2_alpha.config
new file mode 100644
index 0000000..e93e946
--- /dev/null
+++ b/www-apps/horde-ingo-kolab/files/conf.php_1.2_alpha.config
@@ -0,0 +1,16 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: ingo/config/conf.xml,v 1.20 2007/07/27 16:55:13 jan Exp $
+$conf['menu']['apps'] = array();
+$conf['storage']['driver'] = 'prefs';
+$conf['storage']['maxblacklist'] = 0;
+$conf['storage']['maxwhitelist'] = 0;
+$conf['rules']['userheader'] = true;
+$conf['rules']['usefolderapi'] = true;
+$conf['spam']['enabled'] = true;
+$conf['spam']['header'] = 'X-Spam-Level';
+$conf['spam']['char'] = '*';
+$conf['spam']['compare'] = 'string';
+$conf['hooks']['vacation_addresses'] = false;
+$conf['hooks']['vacation_only'] = true;
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
diff --git a/www-apps/horde-ingo-kolab/files/digest-horde-ingo-kolab-1.2_alpha b/www-apps/horde-ingo-kolab/files/digest-horde-ingo-kolab-1.2_alpha
new file mode 100644
index 0000000..b3be32e
--- /dev/null
+++ b/www-apps/horde-ingo-kolab/files/digest-horde-ingo-kolab-1.2_alpha
@@ -0,0 +1,3 @@
+MD5 258d3850ccc8813f9327bf2d3fa63bed ingo-h3-1.2-alpha.tar.gz 1457486
+RMD160 9f17d5ea03a72b4d1778f8c5a2766c30bb8b0867 ingo-h3-1.2-alpha.tar.gz 1457486
+SHA256 51731076e8189c7cbcf1dc201a68e2c8fcd1199e9ddd91d5289bf836cbfb31de ingo-h3-1.2-alpha.tar.gz 1457486
diff --git a/www-apps/horde-ingo-kolab/horde-ingo-kolab-1.2_alpha.ebuild b/www-apps/horde-ingo-kolab/horde-ingo-kolab-1.2_alpha.ebuild
new file mode 100644
index 0000000..bd8da92
--- /dev/null
+++ b/www-apps/horde-ingo-kolab/horde-ingo-kolab-1.2_alpha.ebuild
@@ -0,0 +1,22 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-ingo/horde-ingo-1.1.ebuild,v 1.1 2006/03/09 23:34:46 vapier Exp $
+
+HORDE_PHP_FEATURES="imap"
+HORDE_MAJ="-h3"
+inherit horde-kolab-r4
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+backends.php_${PV}.config
+"
+
+DESCRIPTION="e-mail filter rules manager for Horde IMP"
+
+KEYWORDS="~x86 ~amd64"
+
+IUSE="kolab"
+
+DEPEND="dev-php/PEAR-Net_Sieve"
+RDEPEND="$DEPEND
+ >=www-apps/horde-kolab-3.2_alpha"
diff --git a/www-apps/horde-ingo-kolab/metadata.xml b/www-apps/horde-ingo-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-ingo-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/www-apps/horde-kolab-all/Manifest b/www-apps/horde-kolab-all/Manifest
new file mode 100644
index 0000000..ce32111
--- /dev/null
+++ b/www-apps/horde-kolab-all/Manifest
@@ -0,0 +1,7 @@
+EBUILD horde-kolab-all-3.ebuild 874 RMD160 46ae815ff77f92705ac5223d4aba30fa615a9945 SHA1 56d2760e90c9759eea1cbca0c3b2e740fa1ec18e SHA256 e050a5bac8ea708461223e2afa062d630565bcac4fc0a3265ec1c7f85729f8fa
+MD5 e470cc64aae619c8d94111f11293d611 horde-kolab-all-3.ebuild 874
+RMD160 46ae815ff77f92705ac5223d4aba30fa615a9945 horde-kolab-all-3.ebuild 874
+SHA256 e050a5bac8ea708461223e2afa062d630565bcac4fc0a3265ec1c7f85729f8fa horde-kolab-all-3.ebuild 874
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-horde-kolab-all-3 0
+RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-horde-kolab-all-3 0
+SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-horde-kolab-all-3 0
diff --git a/www-apps/horde-kolab-all/files/digest-horde-kolab-all-3 b/www-apps/horde-kolab-all/files/digest-horde-kolab-all-3
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/www-apps/horde-kolab-all/files/digest-horde-kolab-all-3
diff --git a/www-apps/horde-kolab-all/horde-kolab-all-3.ebuild b/www-apps/horde-kolab-all/horde-kolab-all-3.ebuild
new file mode 100644
index 0000000..685c3d3
--- /dev/null
+++ b/www-apps/horde-kolab-all/horde-kolab-all-3.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-sork/horde-sork-0.ebuild,v 1.4 2005/05/02 02:51:33 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="Kolab horde meta package"
+SRC_URI=""
+
+SLOT="0"
+
+KEYWORDS="~x86 ~amd64"
+
+DEPEND=""
+RDEPEND="
+net-mail/kolabd
+www-apps/horde-kolab
+www-apps/horde-imp-kolab
+www-apps/horde-ingo-kolab
+www-apps/horde-kronolith-kolab
+www-apps/horde-mnemo-kolab
+www-apps/horde-nag-kolab
+www-apps/horde-passwd-kolab
+www-apps/horde-turba-kolab
+"
+
+S=${WORKDIR}
+
+# this is just a meta package
+pkg_setup() {
+
+ if ! built_with_use net-mail/kolabd horde ; then
+ eerror "You MUST re-emerge kolabd with the horde use flag"
+ eerror "enabled!"
+ die "Current kolabd installation does not support horde-kolab!"
+ fi
+}
+
+src_unpack() { :;}
+src_install() { :;}
diff --git a/www-apps/horde-kolab/ChangeLog b/www-apps/horde-kolab/ChangeLog
new file mode 100644
index 0000000..4ae5edc
--- /dev/null
+++ b/www-apps/horde-kolab/ChangeLog
@@ -0,0 +1,27 @@
+# ChangeLog for www-apps/horde-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ horde-kolab-3.2_alpha.ebuild:
+ Fix removal of the horde framework.
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ -files/hooks.php_horde-kolab-3.2_alpha.config,
+ -files/conf.php_horde-kolab-3.2_alpha.config,
+ -files/registry.php_horde-kolab-3.2_alpha.config, ++, ++, ++,
+ horde-kolab-3.2_alpha.ebuild:
+ Fixed the config file names.
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/hooks.php_horde-kolab-3.2_alpha.config,
+ +files/conf.php_horde-kolab-3.2_alpha.config,
+ +files/registry.php_horde-kolab-3.2_alpha.config,
+ +files/horde-kolab-conf-3.2_alpha.template,
+ -files/hooks.php_horde-kolab-20070713.config,
+ -files/conf.php_horde-kolab-20070713.config,
+ -files/registry.php_horde-kolab-20070713.config,
+ -files/horde-kolab-conf-20070713.template, +metadata.xml,
+ +horde-kolab-3.2_alpha.ebuild:
+ Update to the latest horde release.
+
diff --git a/www-apps/horde-kolab/Manifest b/www-apps/horde-kolab/Manifest
new file mode 100644
index 0000000..5d8d7e2
--- /dev/null
+++ b/www-apps/horde-kolab/Manifest
@@ -0,0 +1,32 @@
+AUX conf.php_3.2_alpha.config 4094 RMD160 970b017d5e4df48f3086b864c3420388ed77d0d7 SHA1 fc9ec47a731ebe6202a9c0a977357e0cb17aeb8a SHA256 9d2e77b596d5ad5366f318f4c6a8eb69462be850e5f9d87a217f3f03c0e1d7c3
+MD5 315d775ee9eba864798d578fc0f86f57 files/conf.php_3.2_alpha.config 4094
+RMD160 970b017d5e4df48f3086b864c3420388ed77d0d7 files/conf.php_3.2_alpha.config 4094
+SHA256 9d2e77b596d5ad5366f318f4c6a8eb69462be850e5f9d87a217f3f03c0e1d7c3 files/conf.php_3.2_alpha.config 4094
+AUX hooks.php_3.2_alpha.config 7444 RMD160 74e7a9bb990da2f3fe4a8f6e7148d5906fdd5e1c SHA1 f2384174b6e2f70eb0096580c595881d90faab56 SHA256 f286828b74821e83420b2ec5cb6a8d1e8f908e87a2fb327682ce350f32ccc824
+MD5 e478cd01113460521e514198bed11fce files/hooks.php_3.2_alpha.config 7444
+RMD160 74e7a9bb990da2f3fe4a8f6e7148d5906fdd5e1c files/hooks.php_3.2_alpha.config 7444
+SHA256 f286828b74821e83420b2ec5cb6a8d1e8f908e87a2fb327682ce350f32ccc824 files/hooks.php_3.2_alpha.config 7444
+AUX horde-kolab-conf-3.2_alpha.template 682 RMD160 1addc6e3afac541ae92ebe0d14a0ae6e91ed04d4 SHA1 2a2444ea96760a5c300121f00a71188ca72e99be SHA256 2e33e088ae6f0c5c1b7484c64a1c7a051805d6359e922cc2afa411986d9f84e1
+MD5 a24a4b35a0852ebed73f1e537043898c files/horde-kolab-conf-3.2_alpha.template 682
+RMD160 1addc6e3afac541ae92ebe0d14a0ae6e91ed04d4 files/horde-kolab-conf-3.2_alpha.template 682
+SHA256 2e33e088ae6f0c5c1b7484c64a1c7a051805d6359e922cc2afa411986d9f84e1 files/horde-kolab-conf-3.2_alpha.template 682
+AUX registry.php_3.2_alpha.config 18168 RMD160 0c0a77c9f621153b725d77e64a4fdddd0f2685ca SHA1 2b443263d7a0490bd211de51540c37956108409f SHA256 3167afdeeedbe331979f9bc5af2f71f84377f4763957552fd6d4ed8629993ab2
+MD5 dd61aa6e53816fedb396623d24eb40d3 files/registry.php_3.2_alpha.config 18168
+RMD160 0c0a77c9f621153b725d77e64a4fdddd0f2685ca files/registry.php_3.2_alpha.config 18168
+SHA256 3167afdeeedbe331979f9bc5af2f71f84377f4763957552fd6d4ed8629993ab2 files/registry.php_3.2_alpha.config 18168
+DIST horde-3.2-alpha.tar.gz 6997065 RMD160 603d28d5151da8a2d773df043eb77d03c1ae4383 SHA1 14751b38243864a51174c236228bdb1ecb043aa5 SHA256 2db789603d2656c36ab06184b118cc2b01a3bea2bb102695e75831ab6513b92d
+EBUILD horde-kolab-3.2_alpha.ebuild 1420 RMD160 71675dcc457f2bc552d2842c134ec12192a4926b SHA1 aa9e54189405c2004b7de05c7291ebab5082d52a SHA256 9034446dfd041eec1326e8a9ecafb415ff750742a53dab3bb69c4ef7222a4549
+MD5 b3a6c846accf61c458aa7171fc776010 horde-kolab-3.2_alpha.ebuild 1420
+RMD160 71675dcc457f2bc552d2842c134ec12192a4926b horde-kolab-3.2_alpha.ebuild 1420
+SHA256 9034446dfd041eec1326e8a9ecafb415ff750742a53dab3bb69c4ef7222a4549 horde-kolab-3.2_alpha.ebuild 1420
+MISC ChangeLog 1037 RMD160 e09f97b015412f7cdfdd2f3cdb440d9ce028216a SHA1 d8989beb1b7598029c77186adb7a77db85128d85 SHA256 6e0638fe4053d7e178d51d17c7a178cbe99cd6349c87b3f2210f1b93c2e3f472
+MD5 458266246cff8aa64d87c7ad5d53774f ChangeLog 1037
+RMD160 e09f97b015412f7cdfdd2f3cdb440d9ce028216a ChangeLog 1037
+SHA256 6e0638fe4053d7e178d51d17c7a178cbe99cd6349c87b3f2210f1b93c2e3f472 ChangeLog 1037
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 63098923a7d50a7eed9b8dfa97468ac2 files/digest-horde-kolab-3.2_alpha 250
+RMD160 d410e928c6b835f8ec53fd098f7e530185de702e files/digest-horde-kolab-3.2_alpha 250
+SHA256 9dc719c38ee614c447c519fb1a3874d1f1d8d8cb08fa4e2d209a2109843bb04a files/digest-horde-kolab-3.2_alpha 250
diff --git a/www-apps/horde-kolab/files/conf.php_3.2_alpha.config b/www-apps/horde-kolab/files/conf.php_3.2_alpha.config
new file mode 100644
index 0000000..db18808
--- /dev/null
+++ b/www-apps/horde-kolab/files/conf.php_3.2_alpha.config
@@ -0,0 +1,100 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: horde/config/conf.xml,v 1.194 2007/07/30 15:47:32 chuck Exp $
+$conf['vhosts'] = false;
+$conf['debug_level'] = E_ALL;
+$conf['max_exec_time'] = 0;
+$conf['compress_pages'] = true;
+$conf['umask'] = 077;
+$conf['use_ssl'] = 2;
+$conf['server']['name'] = $_SERVER['SERVER_NAME'];
+$conf['server']['port'] = $_SERVER['SERVER_PORT'];
+$conf['safe_ips'] = array();
+$conf['session']['name'] = 'Horde';
+$conf['session']['use_only_cookies'] = false;
+$conf['session']['cache_limiter'] = 'nocache';
+$conf['session']['timeout'] = 3600;
+$conf['cookie']['domain'] = $_SERVER['SERVER_NAME'];
+$conf['cookie']['path'] = '/horde';
+$conf['sql'] = NULL;
+$conf['auth']['admins'] = array('manager');
+$conf['auth']['checkip'] = true;
+$conf['auth']['checkbrowser'] = true;
+$conf['auth']['alternate_login'] = false;
+$conf['auth']['redirect_on_logout'] = false;
+$conf['auth']['params']['login_block'] = true;
+$conf['auth']['params']['login_block_count'] = 3;
+$conf['auth']['params']['login_block_time'] = 5;
+$conf['auth']['driver'] = 'kolab';
+$conf['signup']['allow'] = false;
+$conf['log']['priority'] = PEAR_LOG_NOTICE;
+$conf['log']['ident'] = 'HORDE';
+$conf['log']['params'] = array();
+$conf['log']['name'] = '/tmp/horde.log';
+$conf['log']['params']['append'] = true;
+$conf['log']['type'] = 'file';
+$conf['log']['enabled'] = true;
+$conf['log_accesskeys'] = false;
+$conf['prefs']['driver'] = 'kolab';
+$conf['alarms']['driver'] = false;
+$conf['datatree']['driver'] = 'null';
+$conf['group']['driver'] = 'datatree';
+$conf['group']['cache'] = false;
+$conf['share']['no_sharing'] = false;
+$conf['share']['cache'] = true;
+$conf['share']['driver'] = 'kolab';
+$conf['cache']['default_lifetime'] = 1800;
+$conf['cache']['params']['dir'] = Horde::getTempDir();
+$conf['cache']['params']['sub'] = 0;
+$conf['cache']['params']['gc'] = 86400;
+$conf['cache']['driver'] = 'file';
+$conf['token']['driver'] = 'none';
+$conf['mailer']['params']['auth'] = '0';
+$conf['mailer']['type'] = 'smtp';
+$conf['mailformat']['brokenrfc2231'] = false;
+$conf['tmpdir'] = dirname(__FILE__) . '/../tmp/';
+$conf['vfs']['params']['vfsroot'] = dirname(__FILE__) . '/../tmp';
+$conf['vfs']['type'] = 'file';
+$conf['sessionhandler']['type'] = 'none';
+$conf['image']['convert'] = '/usr/bin/convert';
+$conf['mime']['magic_db'] = '/etc/mime.types';
+$conf['problems']['email'] = 'webmaster@example.com';
+$conf['problems']['maildomain'] = 'example.com';
+$conf['problems']['tickets'] = false;
+$conf['menu']['apps'] = array();
+$conf['menu']['always'] = false;
+$conf['menu']['links']['help'] = 'all';
+$conf['menu']['links']['help_about'] = true;
+$conf['menu']['links']['options'] = 'authenticated';
+$conf['menu']['links']['problem'] = 'all';
+$conf['menu']['links']['login'] = 'all';
+$conf['menu']['links']['logout'] = 'authenticated';
+$conf['hooks']['permsdenied'] = false;
+$conf['hooks']['username'] = false;
+$conf['hooks']['preauthenticate'] = false;
+$conf['hooks']['postauthenticate'] = false;
+$conf['hooks']['authldap'] = false;
+$conf['hooks']['groupldap'] = false;
+$conf['portal']['fixed_blocks'] = array();
+$conf['accounts']['driver'] = 'null';
+$conf['user']['verify_from_addr'] = false;
+$conf['imsp']['enabled'] = false;
+$conf['kolab']['ldap']['server'] = 'localhost';
+$conf['kolab']['ldap']['port'] = 389;
+$conf['kolab']['ldap']['basedn'] = 'dc=example,dc=com';
+$conf['kolab']['ldap']['phpdn'] = 'cn=nobody,cn=internal,dc=example,dc=com';
+$conf['kolab']['ldap']['phppw'] = 'dummy';
+$conf['kolab']['imap']['server'] = 'localhost';
+$conf['kolab']['imap']['port'] = 143;
+$conf['kolab']['imap']['sieveport'] = 2000;
+$conf['kolab']['imap']['virtdomains'] = true;
+$conf['kolab']['imap']['maildomain'] = 'example.com';
+$conf['kolab']['smtp']['server'] = 'localhost';
+$conf['kolab']['smtp']['port'] = 25;
+$conf['kolab']['misc']['multidomain'] = false;
+$conf['kolab']['enabled'] = true;
+$conf['memcache']['enabled'] = false;
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
+if (file_exists(dirname(__FILE__) . '/kolab.php')) {
+ require_once(dirname(__FILE__) . '/kolab.php');
+}
diff --git a/www-apps/horde-kolab/files/digest-horde-kolab-3.2_alpha b/www-apps/horde-kolab/files/digest-horde-kolab-3.2_alpha
new file mode 100644
index 0000000..fb15c9b
--- /dev/null
+++ b/www-apps/horde-kolab/files/digest-horde-kolab-3.2_alpha
@@ -0,0 +1,3 @@
+MD5 1de0cdbf07c990db1eafb4c19b9a2ae6 horde-3.2-alpha.tar.gz 6997065
+RMD160 603d28d5151da8a2d773df043eb77d03c1ae4383 horde-3.2-alpha.tar.gz 6997065
+SHA256 2db789603d2656c36ab06184b118cc2b01a3bea2bb102695e75831ab6513b92d horde-3.2-alpha.tar.gz 6997065
diff --git a/www-apps/horde-kolab/files/hooks.php_3.2_alpha.config b/www-apps/horde-kolab/files/hooks.php_3.2_alpha.config
new file mode 100644
index 0000000..fab46b3
--- /dev/null
+++ b/www-apps/horde-kolab/files/hooks.php_3.2_alpha.config
@@ -0,0 +1,209 @@
+<?php
+/**
+ * Horde Hooks configuration file.
+ *
+ * THE HOOKS PROVIDED IN THIS FILE ARE EXAMPLES ONLY. DO NOT ENABLE THEM
+ * BLINDLY IF YOU DO NOT KNOW WHAT YOU ARE DOING. YOU HAVE TO CUSTOMIZE THEM
+ * TO MATCH YOUR SPECIFIC NEEDS AND SYSTEM ENVIRONMENT.
+ *
+ * This file is where you define any hooks, for preferences or general Horde
+ * use, that your installation uses. The functions in this file can vastly
+ * change how your installation behaves, so make sure to test out any changes
+ * here before doing them in a production environment.
+ *
+ * Hook function names are automatically determined. The format of the name
+ * is:
+ *
+ * _<type of hook>_hook_<name of hook>.
+ *
+ * Types of hooks that are defined in this file are 'prefs' (hooks to set the
+ * value of preferences), 'horde' (hooks for the Horde Framework scripts) and
+ * 'app' (where app is any Horde application name, like 'imp') hooks that are
+ * application specific.
+ *
+ * So, a hook to set the preference 'theme' would be named
+ * "_prefs_hook_theme".
+ *
+ * NOTE 1: Having a hook function in this file does NOT mean that the hook
+ * will automatically be used. YOU MUST enable the hook. For preferences, set
+ * 'hook' => true in that preferences attributes; for other hooks, there will
+ * be a configuration option in each application's conf.php file such as
+ * $conf['hooks']['hookname'] which must be set to true.
+ *
+ * NOTE 2: Preferences hooks are ONLY executed on login. Preferences are
+ * cached during a users session and, to avoid unnecessary overhead every time
+ * a preference is accessed, the results of hooks are cached as well. This
+ * leads to ...
+ *
+ * NOTE 3: Any preference that is NOT LOCKED, that is set by a hook, WILL BE
+ * SAVED WITH THAT VALUE. This means several things:
+ * 1) Users will get the results of the hook set for them in their
+ * preferences.
+ * 2) By virtue of this, the next time they log in and load their
+ * preferences, the hook will NOT be called, because in their last session,
+ * we saved the results of the hook for them. However, if the preference is
+ * locked, the result of the hook will never be saved.
+ *
+ * $Horde: horde/config/hooks.php.dist,v 1.109 2007/01/03 06:26:08 slusarz Exp $
+ */
+
+// Default Kolab hooks:
+if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
+ require_once 'Horde/Kolab.php';
+ if (!function_exists('_username_hook_frombackend')) {
+ function _username_hook_frombackend($userID)
+ {
+ // Connect to the LDAP server.
+ $ds = ldap_connect(
+ $GLOBALS['conf']['kolab']['ldap']['server'],
+ $GLOBALS['conf']['kolab']['ldap']['port']
+ );
+ if (!$ds) {
+ return $userID;
+ }
+ ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
+ // Bind anonymously.
+ $result = @ldap_bind($ds);
+ if (!$result) {
+ return $userID;
+ }
+ // Find the user's DN.
+ $result = ldap_search(
+ $ds,
+ $GLOBALS['conf']['kolab']['ldap']['basedn'],
+ 'uid=' . $userID
+ );
+ $entry = ldap_first_entry($ds, $result);
+ if ($entry === false) {
+ // The user already authenticated with his email address.
+ return $userID;
+ }
+ $email = ldap_get_values($ds, $entry, 'mail');
+ return $email[0];
+ }
+ function _imp_hook_mbox_redirect($mailbox)
+ {
+ switch (Kolab::getMailboxType($mailbox)) {
+ case 'event':
+ return $GLOBALS['registry']->get('webroot', 'kronolith');
+
+ case 'task':
+ return $GLOBALS['registry']->get('webroot', 'nag');
+
+ case 'note':
+ return $GLOBALS['registry']->get('webroot', 'mnemo');
+
+ case 'contact':
+ return $GLOBALS['registry']->get('webroot', 'turba');
+
+ default:
+ return '';
+ }
+ }
+ function _imp_hook_mbox_icons()
+ {
+ static $icons;
+
+ if (!empty($icons)) {
+ return $icons;
+ }
+
+ $folders = Kolab::listFolders();
+
+ $icons = array();
+
+ foreach ($folders as $folder) {
+ $name = preg_replace('/^{[^}]+}/', '', $folder[0]);
+
+ switch ($folder[1]) {
+ case 'event':
+ $icons[$name] = array(
+ 'icon' => 'kronolith.png',
+ 'icondir' => $GLOBALS['registry']->getImageDir('kronolith'),
+ 'alt' => _("Calendar")
+ );
+ break;
+
+ case 'task':
+ $icons[$name] = array(
+ 'icon' => 'nag.png',
+ 'icondir' => $GLOBALS['registry']->getImageDir('nag'),
+ 'alt' => _("Tasks")
+ );
+ break;
+
+ case 'note':
+ $icons[$name] = array(
+ 'icon' => 'mnemo.png',
+ 'icondir' => $GLOBALS['registry']->getImageDir('mnemo'),
+ 'alt' => _("Notes")
+ );
+ break;
+
+ case 'contact':
+ $icons[$name] = array(
+ 'icon' => 'turba.png',
+ 'icondir' => $GLOBALS['registry']->getImageDir('turba'),
+ 'alt' => _("Contacts")
+ );
+ break;
+ }
+ }
+ return $icons;
+ }
+ }
+
+ if (!function_exists('_horde_hook_preauthenticate')) {
+ function _horde_hook_preauthenticate($userID, $credential, $realm)
+ {
+ /**
+ * In multidomain mode we authenticate against the home server
+ * of the user, so first we have to query the global ldap server
+ * for the users 'kolabHomeserver' entry and then we modify the
+ * PHP session variables to use the home server.
+ */
+
+ $ds = ldap_connect(
+ $GLOBALS['conf']['kolab']['ldap']['server'],
+ $GLOBALS['conf']['kolab']['ldap']['port']
+ );
+ if (!$ds) {
+ return false;
+ }
+
+ // Bind anonymously.
+ $result = @ldap_bind($ds,
+ $GLOBALS['conf']['kolab']['ldap']['binddn'],
+ $GLOBALS['conf']['kolab']['ldap']['bindpw']
+ );
+ if (!$result) {
+ return false;
+ }
+
+ // Find the user's DN.
+ $result = ldap_search(
+ $ds,
+ $GLOBALS['conf']['kolab']['ldap']['basedn'],
+ "uid=$userID"
+ );
+
+ $entry = ldap_first_entry($ds, $result);
+ if ($entry === false) {
+ return false;
+ }
+
+ $result = ldap_get_values($ds, $entry, 'kolabHomeserver');
+ if (!$result) {
+ // 'manager' has no 'kolabHomserver' set, so don't treat it as error
+ $homeserver = $GLOBALS['conf']['kolab']['imap']['server'];
+ } else {
+ // We found a valid homeserver
+ $homeserver = $result[0];
+ }
+
+ $_SESSION['kolabHomeserver'] = $homeserver;
+ return true;
+ }
+ }
+}
+
diff --git a/www-apps/horde-kolab/files/horde-kolab-conf-3.2_alpha.template b/www-apps/horde-kolab/files/horde-kolab-conf-3.2_alpha.template
new file mode 100644
index 0000000..8c3208e
--- /dev/null
+++ b/www-apps/horde-kolab/files/horde-kolab-conf-3.2_alpha.template
@@ -0,0 +1,17 @@
+KOLAB_META_START
+TARGET=/var/www/kolab/htdocs/horde/config/kolab.php
+PERMISSIONS=0600
+OWNERSHIP=apache:apache
+KOLAB_META_END
+<?php
+$conf['log']['name'] = '/tmp/horde.log';
+$conf['cookie']['domain'] = '@@@fqdnhostname@@@';
+$conf['problems']['email'] = 'postmaster@@@@postfix-mydomain@@@';
+$conf['problems']['maildomain'] = '@@@postfix-mydomain@@@';
+$conf['kolab']['ldap']['server'] = '@@@fqdnhostname@@@';
+$conf['kolab']['ldap']['basedn'] = '@@@base_dn@@@';
+$conf['kolab']['ldap']['phpdn'] = '@@@php_dn@@@';
+$conf['kolab']['ldap']['phppw'] = '@@@php_pw@@@';
+$conf['kolab']['imap']['server'] = '@@@fqdnhostname@@@';
+$conf['kolab']['imap']['maildomain'] = '@@@postfix-mydomain@@@';
+?>
diff --git a/www-apps/horde-kolab/files/registry.php_3.2_alpha.config b/www-apps/horde-kolab/files/registry.php_3.2_alpha.config
new file mode 100644
index 0000000..289e8af
--- /dev/null
+++ b/www-apps/horde-kolab/files/registry.php_3.2_alpha.config
@@ -0,0 +1,570 @@
+<?php
+/**
+ * registry.php -- Horde application registry.
+ *
+ * $Horde: horde/config/registry.php.dist,v 1.294 2006/11/24 10:39:09 jan Exp $
+ *
+ * This configuration file is used by Horde to determine which Horde
+ * applications are installed and where, as well as how they interact.
+ *
+ * Application registry
+ * --------------------
+ * The following settings register installed Horde applications.
+ * By default, Horde assumes that the application directories live
+ * inside the horde directory.
+ *
+ * Attribute Type Description
+ * --------- ---- -----------
+ * fileroot string The base filesystem path for the module's files.
+ * webroot string The base URI for the module.
+ * jsuri string The base URI for static javascript files.
+ * jsfs string The base filesystem path for static javascript files.
+ * themesuri string The base URI for the themes. This can be used to
+ * serve all icons and style sheets from a separate
+ * server.
+ * themesfs string The base file system directory for the themes.
+ * icon string The URI for an icon to show in menus for the module.
+ * Setting this will override the default theme-based
+ * logic in the code.
+ * name string The name used in menus and descriptions for a module
+ * status string 'inactive', 'hidden', 'notoolbar', 'heading',
+ * 'block', 'admin', or 'active'.
+ * provides string Service types the module provides.
+ * initial_page string The initial (default) page (filename) for the module.
+ * templates string The filesystem path to the templates directory.
+ * menu_parent string The name of the 'heading' group that this app should
+ * show up under.
+ * target string The (optional) target frame for the link.
+ * url string The (optional) URL of 'heading' entries.
+ */
+
+// We try to automatically determine the proper webroot for Horde here. This
+// still assumes that applications live under horde/. If this results in
+// incorrect results for you, simply change the 'webroot' setting in the
+// 'horde' stanza below.
+
+$this->applications['horde'] = array(
+ 'fileroot' => dirname(__FILE__) . '/..',
+ 'webroot' => _detect_webroot(),
+ 'initial_page' => 'login.php',
+ 'name' => _("Horde"),
+ 'status' => 'active',
+ 'templates' => dirname(__FILE__) . '/../templates',
+ 'provides' => 'horde',
+);
+
+$this->applications['mimp'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../mimp',
+ 'webroot' => $this->applications['horde']['webroot'] . '/mimp',
+ 'name' => _("Mobile Mail"),
+ 'status' => 'notoolbar',
+);
+
+$this->applications['dimp'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../dimp',
+ 'webroot' => $this->applications['horde']['webroot'] . '/dimp',
+ 'name' => _("Dynamic Mail"),
+ 'status' => 'notoolbar',
+);
+
+$this->applications['imp'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../imp',
+ 'webroot' => $this->applications['horde']['webroot'] . '/imp',
+ 'name' => _("Mail"),
+ 'status' => 'active',
+ 'provides' => array('mail', 'contacts/favouriteRecipients')
+);
+
+$this->applications['ingo'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../ingo',
+ 'webroot' => $this->applications['horde']['webroot'] . '/ingo',
+ 'name' => _("Filters"),
+ 'status' => 'active',
+ 'provides' => array('mail/blacklistFrom', 'mail/showBlacklist', 'mail/whitelistFrom', 'mail/showWhitelist', 'mail/applyFilters', 'mail/canApplyFilters', 'mail/showFilters'),
+ 'menu_parent' => 'imp'
+);
+
+$this->applications['sam'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../sam',
+ 'webroot' => $this->applications['horde']['webroot'] . '/sam',
+ 'name' => _("Spam"),
+ 'status' => 'inactive',
+ // Uncomment this line if you want Sam to handle the blacklist filter
+ // instead of Ingo:
+ // 'provides' => array('mail/blacklistFrom', 'mail/showBlacklist', 'mail/whitelistFrom', 'mail/showWhitelist'),
+ 'menu_parent' => 'imp'
+);
+
+$this->applications['forwards'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../forwards',
+ 'webroot' => $this->applications['horde']['webroot'] . '/forwards',
+ 'name' => _("Forwards"),
+ 'status' => 'inactive',
+ 'provides' => 'forwards',
+ 'menu_parent' => 'imp',
+);
+
+$this->applications['vacation'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../vacation',
+ 'webroot' => $this->applications['horde']['webroot'] . '/vacation',
+ 'name' => _("Vacation"),
+ 'status' => 'inactive',
+ 'provides' => 'vacation',
+ 'menu_parent' => 'imp'
+);
+
+$this->applications['imp-folders'] = array(
+ 'status' => 'block',
+ 'app' => 'imp',
+ 'blockname' => 'tree_folders',
+ 'menu_parent' => 'imp',
+);
+
+$this->applications['organizing'] = array(
+ 'name' => _("Organizing"),
+ 'status' => 'heading',
+);
+
+$this->applications['turba'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../turba',
+ 'webroot' => $this->applications['horde']['webroot'] . '/turba',
+ 'name' => _("Address Book"),
+ 'status' => 'active',
+ 'provides' => array('contacts', 'clients'),
+ 'menu_parent' => 'organizing'
+);
+
+$this->applications['turba-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'turba',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'turba',
+);
+
+$this->applications['kronolith'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../kronolith',
+ 'webroot' => $this->applications['horde']['webroot'] . '/kronolith',
+ 'name' => _("Calendar"),
+ 'status' => 'active',
+ 'provides' => 'calendar',
+ 'menu_parent' => 'organizing'
+);
+
+$this->applications['kronolith-alarms'] = array(
+ 'status' => 'block',
+ 'app' => 'kronolith',
+ 'blockname' => 'tree_alarms',
+ 'menu_parent' => 'kronolith',
+);
+
+$this->applications['kronolith-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'kronolith',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'kronolith',
+);
+
+$this->applications['nag'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../nag',
+ 'webroot' => $this->applications['horde']['webroot'] . '/nag',
+ 'name' => _("Tasks"),
+ 'status' => 'active',
+ 'provides' => 'tasks',
+ 'menu_parent' => 'organizing'
+);
+
+$this->applications['nag-alarms'] = array(
+ 'status' => 'block',
+ 'app' => 'nag',
+ 'blockname' => 'tree_alarms',
+ 'menu_parent' => 'nag',
+);
+
+$this->applications['nag-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'nag',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'nag',
+);
+
+$this->applications['mnemo'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../mnemo',
+ 'webroot' => $this->applications['horde']['webroot'] . '/mnemo',
+ 'name' => _("Notes"),
+ 'status' => 'active',
+ 'provides' => 'notes',
+ 'menu_parent' => 'organizing'
+);
+
+$this->applications['mnemo-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'mnemo',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'mnemo',
+);
+
+$this->applications['genie'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../genie',
+ 'webroot' => $this->applications['horde']['webroot'] . '/genie',
+ 'name' => _("Wishlist"),
+ 'status' => 'inactive',
+ 'provides' => 'wishlist',
+ 'menu_parent' => 'organizing'
+);
+
+$this->applications['trean'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../trean',
+ 'webroot' => $this->applications['horde']['webroot'] . '/trean',
+ 'name' => _("Bookmarks"),
+ 'status' => 'inactive',
+ 'provides' => 'bookmarks',
+ 'menu_parent' => 'organizing'
+);
+
+$this->applications['trean-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'trean',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'trean',
+);
+
+$this->applications['devel'] = array(
+ 'name' => _("Development"),
+ 'status' => 'heading',
+);
+
+$this->applications['chora'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../chora',
+ 'webroot' => $this->applications['horde']['webroot'] . '/chora',
+ 'name' => _("Version Control"),
+ 'status' => 'active',
+ 'menu_parent' => 'devel'
+);
+
+$this->applications['chora-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'chora',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'chora',
+);
+
+$this->applications['whups'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../whups',
+ 'webroot' => $this->applications['horde']['webroot'] . '/whups',
+ 'name' => _("Tickets"),
+ 'status' => 'inactive',
+ 'provides' => 'tickets',
+ 'menu_parent' => 'devel'
+);
+
+$this->applications['luxor'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../luxor',
+ 'webroot' => $this->applications['horde']['webroot'] . '/luxor',
+ 'name' => _("X-Ref"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'devel'
+);
+
+$this->applications['info'] = array(
+ 'name' => _("Information"),
+ 'status' => 'heading',
+);
+
+$this->applications['klutz'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../klutz',
+ 'webroot' => $this->applications['horde']['webroot'] . '/klutz',
+ 'name' => _("Comics"),
+ 'status' => 'inactive',
+ 'provides' => 'comics',
+ 'menu_parent' => 'info'
+);
+
+$this->applications['occam'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../occam',
+ 'webroot' => $this->applications['horde']['webroot'] . '/occam',
+ 'name' => _("Courses"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'info'
+);
+
+$this->applications['mottle'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../mottle',
+ 'webroot' => $this->applications['horde']['webroot'] . '/mottle',
+ 'name' => _("MOTD"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'info'
+);
+
+$this->applications['jonah'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../jonah',
+ 'webroot' => $this->applications['horde']['webroot'] . '/jonah',
+ 'name' => _("News"),
+ 'status' => 'inactive',
+ 'provides' => 'news',
+ 'menu_parent' => 'info'
+);
+
+$this->applications['jonah-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'jonah',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'jonah',
+);
+
+$this->applications['goops'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../goops',
+ 'webroot' => $this->applications['horde']['webroot'] . '/goops',
+ 'name' => _("Search Engines"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'info'
+);
+
+$this->applications['office'] = array(
+ 'name' => _("Office"),
+ 'status' => 'heading',
+);
+
+$this->applications['juno'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../juno',
+ 'webroot' => $this->applications['horde']['webroot'] . '/juno',
+ 'name' => _("Accounting"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'office'
+);
+
+$this->applications['midas'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../midas',
+ 'webroot' => $this->applications['horde']['webroot'] . '/midas',
+ 'name' => _("Ads"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'office'
+);
+
+$this->applications['hylax'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../hylax',
+ 'webroot' => $this->applications['horde']['webroot'] . '/hylax',
+ 'name' => _("Faxes"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'office',
+);
+
+$this->applications['sesha'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../sesha',
+ 'webroot' => $this->applications['horde']['webroot'] . '/sesha',
+ 'name' => _("Inventory"),
+ 'status' => 'inactive',
+
+ // Uncomment this line if you want Sesha to provide queue and version
+ // names instead of Whups:
+ // 'provides' => array('tickets/listQueues', 'tickets/getQueueDetails', 'tickets/listVersions', 'tickets/getVersionDetails'),
+ 'menu_parent' => 'office',
+);
+
+$this->applications['thor'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../thor',
+ 'webroot' => $this->applications['horde']['webroot'] . '/thor',
+ 'name' => _("Projects"),
+ 'status' => 'inactive',
+ 'provides' => 'projects',
+ 'menu_parent' => 'office'
+);
+
+$this->applications['rakim'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../rakim',
+ 'webroot' => $this->applications['horde']['webroot'] . '/rakim',
+ 'name' => _("Support"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'office'
+);
+
+$this->applications['hermes'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../hermes',
+ 'webroot' => $this->applications['horde']['webroot'] . '/hermes',
+ 'name' => _("Time Tracking"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'office',
+ 'provides' => 'time'
+);
+
+$this->applications['hermes-stopwatch'] = array(
+ 'status' => 'block',
+ 'app' => 'hermes',
+ 'blockname' => 'tree_stopwatch',
+ 'menu_parent' => 'hermes',
+);
+
+$this->applications['hermes-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'hermes',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'hermes',
+);
+
+$this->applications['myaccount'] = array(
+ 'name' => _("My Account"),
+ 'status' => 'heading',
+);
+
+$this->applications['gollem'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../gollem',
+ 'webroot' => $this->applications['horde']['webroot'] . '/gollem',
+ 'name' => _("File Manager"),
+ 'status' => 'active',
+ 'menu_parent' => 'myaccount',
+ 'provides' => 'files',
+);
+
+$this->applications['gollem-menu'] = array(
+ 'status' => 'block',
+ 'app' => 'gollem',
+ 'blockname' => 'tree_menu',
+ 'menu_parent' => 'gollem',
+);
+
+$this->applications['passwd'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../passwd',
+ 'webroot' => $this->applications['horde']['webroot'] . '/passwd',
+ 'name' => _("Password"),
+ 'status' => 'active',
+ 'menu_parent' => 'myaccount'
+);
+
+$this->applications['jeta'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../jeta',
+ 'webroot' => $this->applications['horde']['webroot'] . '/jeta',
+ 'name' => _("SSH"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'myaccount'
+);
+
+$this->applications['website'] = array(
+ 'name' => _("Web Site"),
+ 'status' => 'heading',
+);
+
+$this->applications['giapeto'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../giapeto',
+ 'webroot' => $this->applications['horde']['webroot'] . '/giapeto',
+ 'name' => _("CMS"),
+ 'status' => 'inactive',
+ 'provides' => 'cms',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['agora'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../agora',
+ 'webroot' => $this->applications['horde']['webroot'] . '/agora',
+ 'name' => _("Forums"),
+ 'status' => 'inactive',
+ 'provides' => 'forums',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['ulaform'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../ulaform',
+ 'webroot' => $this->applications['horde']['webroot'] . '/ulaform',
+ 'name' => _("Forms"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['volos'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../volos',
+ 'webroot' => $this->applications['horde']['webroot'] . '/volos',
+ 'name' => _("Guestbook"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['ansel'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../ansel',
+ 'webroot' => $this->applications['horde']['webroot'] . '/ansel',
+ 'name' => _("Photos"),
+ 'status' => 'inactive',
+ 'provides' => 'images',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['scry'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../scry',
+ 'webroot' => $this->applications['horde']['webroot'] . '/scry',
+ 'name' => _("Polls"),
+ 'status' => 'inactive',
+ 'provides' => 'polls',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['merk'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../merk',
+ 'webroot' => $this->applications['horde']['webroot'] . '/merk',
+ 'name' => _("Shopping"),
+ 'status' => 'inactive',
+ 'provides' => 'shop',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['swoosh'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../swoosh',
+ 'webroot' => $this->applications['horde']['webroot'] . '/swoosh',
+ 'name' => _("SMS Messaging"),
+ 'status' => 'inactive',
+ 'provides' => 'sms',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['wicked'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../wicked',
+ 'webroot' => $this->applications['horde']['webroot'] . '/wicked',
+ 'name' => _("Wiki"),
+ 'status' => 'inactive',
+ 'provides' => 'wiki',
+ 'menu_parent' => 'website'
+);
+
+$this->applications['vilma'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../vilma',
+ 'webroot' => $this->applications['horde']['webroot'] . '/vilma',
+ 'name' => _("Mail Admin"),
+ 'status' => 'inactive',
+ 'menu_parent' => 'administration'
+);
+
+$this->applications['nic'] = array(
+ 'fileroot' => dirname(__FILE__) . '/../nic',
+ 'webroot' => $this->applications['horde']['webroot'] . '/nic',
+ 'name' => _("Network Tools"),
+ 'status' => 'active',
+ 'menu_parent' => 'administration'
+);
+
+function _detect_webroot()
+{
+ // Note for Windows users: the below assumes that your PHP_SELF variable
+ // uses forward slashes. If it does not, you'll have to tweak this.
+ if (isset($_SERVER['SCRIPT_URL']) || isset($_SERVER['SCRIPT_NAME'])) {
+ $path = empty($_SERVER['SCRIPT_URL']) ?
+ $_SERVER['SCRIPT_NAME'] :
+ $_SERVER['SCRIPT_URL'];
+ $hordedir = str_replace(DIRECTORY_SEPARATOR, '/', __FILE__);
+ $hordedir = basename(preg_replace(';/config/registry.php$;', '', $hordedir));
+ if (preg_match(';/' . $hordedir . ';', $path)) {
+ $webroot = preg_replace(';/' . $hordedir . '.*;', '/' . $hordedir, $path);
+ } else {
+ $webroot = '';
+ }
+ } elseif (isset($_SERVER['PHP_SELF'])) {
+ $webroot = preg_split(';/;', $_SERVER['PHP_SELF'], 2, PREG_SPLIT_NO_EMPTY);
+ $webroot = strstr(dirname(__FILE__), DIRECTORY_SEPARATOR . array_shift($webroot));
+ if ($webroot !== false) {
+ $webroot = preg_replace(array('/\\\\/', ';/config$;'), array('/', ''), $webroot);
+ } elseif ($webroot === false) {
+ $webroot = '';
+ } else {
+ $webroot = '/horde';
+ }
+ } else {
+ $webroot = '/horde';
+ }
+
+ return $webroot;
+}
diff --git a/www-apps/horde-kolab/horde-kolab-3.2_alpha.ebuild b/www-apps/horde-kolab/horde-kolab-3.2_alpha.ebuild
new file mode 100644
index 0000000..362d33e
--- /dev/null
+++ b/www-apps/horde-kolab/horde-kolab-3.2_alpha.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde/horde-3.1.ebuild,v 1.1 2006/03/09 23:32:37 vapier Exp $
+
+HORDE_PN="horde"
+
+HORDE_PHP_FEATURES="session xml"
+
+inherit horde-kolab-r4
+
+HORDE_KOLAB_TEMPLATES="
+horde-kolab-conf-${PV}.template
+"
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+registry.php_${PV}.config
+hooks.php_${PV}.config
+"
+
+DESCRIPTION="Horde Application Framework"
+HOMEPAGE="http://www.horde.org/"
+
+KEYWORDS="~x86 ~amd64"
+
+IUSE="kolab"
+
+DEPEND=""
+RDEPEND="virtual/php
+ >=sys-devel/gettext-0.10.40
+ >=dev-libs/libxml2-2.4.21
+ >=www-apps/horde-pear-1.3
+ dev-php/horde-framework-kolab
+ dev-php/PEAR-Log
+ dev-php/PEAR-Mail_Mime"
+
+src_install() {
+ horde-kolab-r4_src_install
+
+ # We install the Horde framework as a PEAR library for Kolab
+ rm -rf "${D}"/"${MY_HTDOCSDIR}"/lib/{File,File.php,Horde,Horde.php,Net,SyncML,SyncML.php,Text,VFS,VFS.php,XML}
+}
+
+pkg_postinst() {
+ horde-kolab-r4_pkg_postinst
+ echo
+ einfo "Horde requires PHP to have:"
+ einfo " ==> 'short_open_tag enabled = On'"
+ einfo " ==> 'magic_quotes_runtime set = Off'"
+ einfo " ==> 'file_uploads enabled = On'"
+ einfo "Please edit /etc/php/apache2-php5/php.ini"
+ echo
+ einfo "horde-kolab requires NO DATABASE anymore!"
+ echo
+ ewarn "Make sure you delete any old horde configuration"
+ ewarn "templates from /etc/kolab/templates!"
+}
diff --git a/www-apps/horde-kolab/metadata.xml b/www-apps/horde-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/www-apps/horde-kronolith-kolab/ChangeLog b/www-apps/horde-kronolith-kolab/ChangeLog
new file mode 100644
index 0000000..1ed2fb6
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/ChangeLog
@@ -0,0 +1,24 @@
+# ChangeLog for www-apps/horde-kronolith-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ files/horde-kronolith-kolab-conf-2.2_alpha.template:
+ Fix the variables in the template.
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ horde-kronolith-kolab-2.2_alpha.ebuild:
+ Stupid portage problem.
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/HK-UV-Fix_list_events-2.2_alpha.patch,
+ +files/HK-GW-Fix_create_new_event-2.2_alpha.patch,
+ +files/HK-GW-Fix_share_right_editing-2.2_alpha.patch,
+ +files/horde-kronolith-kolab-conf-2.2_alpha.template,
+ -files/conf.php_horde-kronolith-kolab-20070713.config,
+ -files/horde-kronolith-kolab-conf-20070713.template,
+ +files/conf.php_2.2_alpha.config, +metadata.xml,
+ +horde-kronolith-kolab-2.2_alpha.ebuild,
+ -horde-kronolith-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
diff --git a/www-apps/horde-kronolith-kolab/Manifest b/www-apps/horde-kronolith-kolab/Manifest
new file mode 100644
index 0000000..c009bc5
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/Manifest
@@ -0,0 +1,36 @@
+AUX HK-GW-Fix_create_new_event-2.2_alpha.patch 485 RMD160 fdb1d2b566b4056fa3e0d37c808ea7b889aa2e7e SHA1 54f5389aa25d588c9c73a8058d145143d4766371 SHA256 a50cb1fbed7ac00dad99a9da3d8090121ed257658188a53da534aedbaddca35e
+MD5 1141608d1891780de42b78ed4916afac files/HK-GW-Fix_create_new_event-2.2_alpha.patch 485
+RMD160 fdb1d2b566b4056fa3e0d37c808ea7b889aa2e7e files/HK-GW-Fix_create_new_event-2.2_alpha.patch 485
+SHA256 a50cb1fbed7ac00dad99a9da3d8090121ed257658188a53da534aedbaddca35e files/HK-GW-Fix_create_new_event-2.2_alpha.patch 485
+AUX HK-GW-Fix_share_right_editing-2.2_alpha.patch 972 RMD160 847d97a3cb98473665804cdf05d5b9d862884933 SHA1 fdcdf1b8021a702fb7f43e1992213a3edfa5f8a0 SHA256 7c7ad00014cb57a0f03138b2182e5b71bdf55e455cf54e818f0a9fa9c78c5c38
+MD5 b9384b37a3899a2599ca6cad835b6d04 files/HK-GW-Fix_share_right_editing-2.2_alpha.patch 972
+RMD160 847d97a3cb98473665804cdf05d5b9d862884933 files/HK-GW-Fix_share_right_editing-2.2_alpha.patch 972
+SHA256 7c7ad00014cb57a0f03138b2182e5b71bdf55e455cf54e818f0a9fa9c78c5c38 files/HK-GW-Fix_share_right_editing-2.2_alpha.patch 972
+AUX HK-UV-Fix_list_events-2.2_alpha.patch 1807 RMD160 73f7e770b1efa03114f208f825c102c48cec79b2 SHA1 6276e7a0dd012e0ee92cdbfbd1652b4bfc6605ae SHA256 a605d8c9c1bbf75196ce652b96bb2102a8f69d138e1ddbeb9f577406f30cec9c
+MD5 d14d54cede2e95d36951f4ce3ba31240 files/HK-UV-Fix_list_events-2.2_alpha.patch 1807
+RMD160 73f7e770b1efa03114f208f825c102c48cec79b2 files/HK-UV-Fix_list_events-2.2_alpha.patch 1807
+SHA256 a605d8c9c1bbf75196ce652b96bb2102a8f69d138e1ddbeb9f577406f30cec9c files/HK-UV-Fix_list_events-2.2_alpha.patch 1807
+AUX conf.php_2.2_alpha.config 827 RMD160 0b1abb1e74ac991785b68c0e195b869ce4b1c092 SHA1 6b885fc9b993a87453068063e5d344a2ad25f95b SHA256 748f298f4fe595ae8db742b3b7cb060026fc68adc3da21f4f9d2a4aebe4fee6c
+MD5 159bf0b971e9436e8167e332989b3bc6 files/conf.php_2.2_alpha.config 827
+RMD160 0b1abb1e74ac991785b68c0e195b869ce4b1c092 files/conf.php_2.2_alpha.config 827
+SHA256 748f298f4fe595ae8db742b3b7cb060026fc68adc3da21f4f9d2a4aebe4fee6c files/conf.php_2.2_alpha.config 827
+AUX horde-kronolith-kolab-conf-2.2_alpha.template 334 RMD160 1c03c8c027d5feb53b3f4a3b752558d82d533a09 SHA1 e7c22016aa6addaecee9b7fc8ccd4e0fe8a17478 SHA256 c2660583e560faff6bcbf955887a812b6828d46f94d7e0bdb2e474bc622009ee
+MD5 4831d5f8240ec3fb53ed2d9d34ef8658 files/horde-kronolith-kolab-conf-2.2_alpha.template 334
+RMD160 1c03c8c027d5feb53b3f4a3b752558d82d533a09 files/horde-kronolith-kolab-conf-2.2_alpha.template 334
+SHA256 c2660583e560faff6bcbf955887a812b6828d46f94d7e0bdb2e474bc622009ee files/horde-kronolith-kolab-conf-2.2_alpha.template 334
+DIST kronolith-h3-2.2-alpha.tar.gz 2013090 RMD160 b1fe6e176a0cacb1dbaa2e41affd983d0c66d115 SHA1 0251d0d1416ffea0f03bd51d3ab8545ba9fa29a8 SHA256 f908a6ff3ef1436cc121d110302633b9a64911ce536dd8b617d6479b95530bc6
+EBUILD horde-kronolith-kolab-2.2_alpha.ebuild 767 RMD160 0f25735d6eb25e1ac0518ebd35d30c923efdbf63 SHA1 4e800d5cb8d953e693ee6986d40351e2781dc795 SHA256 05922338caf6bfdcfc9f8ea8d10fa0ed9e48f1570f1f6b4a81006f70c9772a7b
+MD5 c7f453a2aa9ff181655e98d1199b72f4 horde-kronolith-kolab-2.2_alpha.ebuild 767
+RMD160 0f25735d6eb25e1ac0518ebd35d30c923efdbf63 horde-kronolith-kolab-2.2_alpha.ebuild 767
+SHA256 05922338caf6bfdcfc9f8ea8d10fa0ed9e48f1570f1f6b4a81006f70c9772a7b horde-kronolith-kolab-2.2_alpha.ebuild 767
+MISC ChangeLog 943 RMD160 3a4767de0687adb12f49687007229507481feb7c SHA1 c75ae6d442e4400bcafe59a999696154012afcf7 SHA256 542641797d6a7338c4c9364996bdebd0fb9682b86b1afcdaa8298c2d6eaad04d
+MD5 fc8dccc216558071fa5ba72eab58164b ChangeLog 943
+RMD160 3a4767de0687adb12f49687007229507481feb7c ChangeLog 943
+SHA256 542641797d6a7338c4c9364996bdebd0fb9682b86b1afcdaa8298c2d6eaad04d ChangeLog 943
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 bb01eeaaf0d141e970f896ae3213d672 files/digest-horde-kronolith-kolab-2.2_alpha 271
+RMD160 b3d414171e16fd3ae29c7e2d673350c7d764cf7c files/digest-horde-kronolith-kolab-2.2_alpha 271
+SHA256 b0cc9535ebe612bacf4071ad9dd7f83f6f898d8d8fff4d1bc9f5eede8bafdb73 files/digest-horde-kronolith-kolab-2.2_alpha 271
diff --git a/www-apps/horde-kronolith-kolab/files/HK-GW-Fix_create_new_event-2.2_alpha.patch b/www-apps/horde-kronolith-kolab/files/HK-GW-Fix_create_new_event-2.2_alpha.patch
new file mode 100644
index 0000000..f4e5b00
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/files/HK-GW-Fix_create_new_event-2.2_alpha.patch
@@ -0,0 +1,14 @@
+Fix the return value when creating a new event.
+
+diff -r b92bff17929a kronolith/lib/Driver/kolab.php
+--- a/kronolith/lib/Driver/kolab.php Wed Oct 03 16:28:16 2007 +0200
++++ b/kronolith/lib/Driver/kolab.php Wed Oct 03 17:15:02 2007 +0200
+@@ -1190,7 +1190,7 @@ class Kronolith_Driver_kolab_wrapper_new
+ Kolab::triggerFreeBusyUpdate($this->_store->parseFolder($this->_driver->_calendar));
+ }
+
+- return $uid;
++ return $event->getUID();
+ }
+
+ /**
diff --git a/www-apps/horde-kronolith-kolab/files/HK-GW-Fix_share_right_editing-2.2_alpha.patch b/www-apps/horde-kronolith-kolab/files/HK-GW-Fix_share_right_editing-2.2_alpha.patch
new file mode 100644
index 0000000..3d43e72
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/files/HK-GW-Fix_share_right_editing-2.2_alpha.patch
@@ -0,0 +1,14 @@
+Fixes share right editing for kronolith.
+
+diff -r 0855b853bf45 kronolith/templates/calendars/calendars.inc
+--- a/kronolith/templates/calendars/calendars.inc Wed Oct 03 19:42:07 2007 +0200
++++ b/kronolith/templates/calendars/calendars.inc Wed Oct 03 19:43:30 2007 +0200
+@@ -113,7 +113,7 @@ function checkSubmit()
+ <strong><?php echo _("Permissions") ?></strong>
+ </td>
+ <td>
+- <input type="button" name="perms" class="button" onclick="if (document.shares.edit_share.value) popup(editURL + document.shares.edit_share.value); else alert('<?php echo addslashes(_("You need to select a calendar first")) ?>')" value="<?php echo _("Edit") ?>" />
++ <input type="button" name="perms" class="button" onclick="if (document.shares.edit_share.value) popup(editURL + encodeURIComponent(document.shares.edit_share.value)); else alert('<?php echo addslashes(_("You need to select a calendar first")) ?>')" value="<?php echo _("Edit") ?>" />
+ </td>
+ </tr>
+ <?php endif; ?>
diff --git a/www-apps/horde-kronolith-kolab/files/HK-UV-Fix_list_events-2.2_alpha.patch b/www-apps/horde-kronolith-kolab/files/HK-UV-Fix_list_events-2.2_alpha.patch
new file mode 100644
index 0000000..b5c58aa
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/files/HK-UV-Fix_list_events-2.2_alpha.patch
@@ -0,0 +1,39 @@
+Fix event display in kronolith.
+
+diff -r 3bb98854b586 kronolith/lib/Driver/kolab.php
+--- a/kronolith/lib/Driver/kolab.php Thu Oct 04 08:29:40 2007 +0200
++++ b/kronolith/lib/Driver/kolab.php Thu Oct 04 08:39:10 2007 +0200
+@@ -1080,25 +1080,19 @@ class Kronolith_Driver_kolab_wrapper_new
+ }
+
+ $keep_event = false;
+-/*
+- echo "Start: ".$startDate->compareDate($event->start)."<br>\n";
+- echo "End: ".$endDate->compareDate($event->end)."<br>\n";
+-*/
+- // check normal event date
+- if ($startDate->compareDate($event->start) <= 0
+- && $endDate->compareDate($event->end) >= -1)
+- {
++ /* check if event period intersects with given period */
++ if (!(($endDate->compareDateTime($event->start) < 0) ||
++ ($startDate->compareDateTime($event->end) > 0))) {
+ $keep_event = true;
+ }
+
+- // do recurrence expansion if not keeping anyway
++ /* do recurrence expansion if not keeping anyway */
+ if (!$keep_event && $event->recurs()) {
+ $next = $event->recurrence->nextRecurrence($startDate);
+-
+- if ($next !== false && !$event->recurrence->hasException($next->year, $next->month, $next->mday)
+- && $startDate->compareDate($next) <= 0
+- && $endDate->compareDate($next) >= 0)
+- {
++ if ($next !== false &&
++ !$event->recurrence->hasException($next->year, $next->month, $next->mday) &&
++ (!(($endDate->compareDateTime($event->start) < 0) ||
++ ($startDate->compareDateTime($event->end) > 0)))) {
+ $keep_event = true;
+ }
+ }
diff --git a/www-apps/horde-kronolith-kolab/files/conf.php_2.2_alpha.config b/www-apps/horde-kronolith-kolab/files/conf.php_2.2_alpha.config
new file mode 100644
index 0000000..1ffd708
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/files/conf.php_2.2_alpha.config
@@ -0,0 +1,20 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: kronolith/config/conf.xml,v 1.19 2006/11/25 00:13:41 jan Exp $
+$conf['calendar']['driver'] = 'kolab';
+$conf['storage']['default_domain'] = '';
+$conf['storage']['freebusy']['protocol'] = 'https';
+$conf['storage']['freebusy']['port'] = 443;
+$conf['storage']['driver'] = 'kolab';
+$conf['metadata']['keywords'] = false;
+$conf['reminder']['server_name'] = '';
+$conf['reminder']['from_addr'] = '';
+$conf['autoshare']['shareperms'] = 'none';
+$conf['holidays']['enable'] = true;
+$conf['menu']['print'] = true;
+$conf['menu']['import_export'] = true;
+$conf['menu']['apps'] = array();
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
+if (file_exists(dirname(__FILE__) . '/kolab.php')) {
+ require_once(dirname(__FILE__) . '/kolab.php');
+}
diff --git a/www-apps/horde-kronolith-kolab/files/digest-horde-kronolith-kolab-2.2_alpha b/www-apps/horde-kronolith-kolab/files/digest-horde-kronolith-kolab-2.2_alpha
new file mode 100644
index 0000000..d532d79
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/files/digest-horde-kronolith-kolab-2.2_alpha
@@ -0,0 +1,3 @@
+MD5 8ad421ffeb4eda2aff20bd94d5ecbac9 kronolith-h3-2.2-alpha.tar.gz 2013090
+RMD160 b1fe6e176a0cacb1dbaa2e41affd983d0c66d115 kronolith-h3-2.2-alpha.tar.gz 2013090
+SHA256 f908a6ff3ef1436cc121d110302633b9a64911ce536dd8b617d6479b95530bc6 kronolith-h3-2.2-alpha.tar.gz 2013090
diff --git a/www-apps/horde-kronolith-kolab/files/horde-kronolith-kolab-conf-2.2_alpha.template b/www-apps/horde-kronolith-kolab/files/horde-kronolith-kolab-conf-2.2_alpha.template
new file mode 100644
index 0000000..19c1e75
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/files/horde-kronolith-kolab-conf-2.2_alpha.template
@@ -0,0 +1,10 @@
+KOLAB_META_START
+TARGET=/var/www/kolab/htdocs/horde/kronolith/config/kolab.php
+PERMISSIONS=0600
+OWNERSHIP=apache:apache
+KOLAB_META_END
+<?php
+$conf['storage']['default_domain'] = '@@@postfix-mydomain@@@';
+$conf['reminder']['server_name'] = '@@@fqdnhostname@@@';
+$conf['reminder']['from_addr'] = 'postmaster@@@@postfix-mydomain@@@';
+?>
diff --git a/www-apps/horde-kronolith-kolab/horde-kronolith-kolab-2.2_alpha.ebuild b/www-apps/horde-kronolith-kolab/horde-kronolith-kolab-2.2_alpha.ebuild
new file mode 100644
index 0000000..50b20a7
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/horde-kronolith-kolab-2.2_alpha.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-kronolith/horde-kronolith-2.1.ebuild,v 1.1 2006/03/09 23:35:47 vapier Exp $
+
+HORDE_PHP_FEATURES="-o mysql mysqli odbc postgres ldap"
+HORDE_MAJ="-h3"
+inherit horde-kolab-r4
+
+HORDE_KOLAB_TEMPLATES="
+horde-kronolith-kolab-conf-${PV}.template
+"
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+"
+
+EHORDE_PATCHES="
+${FILESDIR}/HK-GW-Fix_create_new_event-${PV}.patch
+${FILESDIR}/HK-GW-Fix_share_right_editing-${PV}.patch
+${FILESDIR}/HK-UV-Fix_list_events-${PV}.patch
+"
+
+DESCRIPTION="Kronolith is the Horde calendar application"
+
+KEYWORDS="~x86 ~amd64"
+
+IUSE="kolab"
+
+DEPEND=""
+RDEPEND=">=www-apps/horde-kolab-3.2_alpha"
+
diff --git a/www-apps/horde-kronolith-kolab/metadata.xml b/www-apps/horde-kronolith-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-kronolith-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/www-apps/horde-mnemo-kolab/ChangeLog b/www-apps/horde-mnemo-kolab/ChangeLog
new file mode 100644
index 0000000..2c27633
--- /dev/null
+++ b/www-apps/horde-mnemo-kolab/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for www-apps/horde-mnemo-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/HK-GW-Edit_share_rights-2.2_alpha.patch,
+ -files/conf.php_horde-mnemo-kolab-20070713.config,
+ +files/conf.php_2.2_alpha.config, +metadata.xml,
+ +horde-mnemo-kolab-2.2_alpha.ebuild, -horde-mnemo-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
diff --git a/www-apps/horde-mnemo-kolab/Manifest b/www-apps/horde-mnemo-kolab/Manifest
new file mode 100644
index 0000000..4868929
--- /dev/null
+++ b/www-apps/horde-mnemo-kolab/Manifest
@@ -0,0 +1,24 @@
+AUX HK-GW-Edit_share_rights-2.2_alpha.patch 934 RMD160 27f6a79413bad6ad39702eea063455adda624ab5 SHA1 1f113ec011e0f4c0f6eec22e427303094f23b520 SHA256 7b1d9264556f0a14ea950200872d3458161c37e01411d066a4192516779a6401
+MD5 fba451c57d212d55fa88de184f34c47e files/HK-GW-Edit_share_rights-2.2_alpha.patch 934
+RMD160 27f6a79413bad6ad39702eea063455adda624ab5 files/HK-GW-Edit_share_rights-2.2_alpha.patch 934
+SHA256 7b1d9264556f0a14ea950200872d3458161c37e01411d066a4192516779a6401 files/HK-GW-Edit_share_rights-2.2_alpha.patch 934
+AUX conf.php_2.2_alpha.config 390 RMD160 3cc47f29ba6d2f6f463e5bbd29d662daec7f281e SHA1 af0ae5cb890b0e8d82b03f4555bd2cd40506ff3e SHA256 a0870ab187e7cefe3d032415469a663f1a0541329e095c5d7b7061605d1c3f90
+MD5 302e4e2bfecfcad30777c52cee77c0c0 files/conf.php_2.2_alpha.config 390
+RMD160 3cc47f29ba6d2f6f463e5bbd29d662daec7f281e files/conf.php_2.2_alpha.config 390
+SHA256 a0870ab187e7cefe3d032415469a663f1a0541329e095c5d7b7061605d1c3f90 files/conf.php_2.2_alpha.config 390
+DIST mnemo-h3-2.2-alpha.tar.gz 1242306 RMD160 c27966ce1b8c3a677056ac23bfbb66359995b88f SHA1 5d20743809774dafb6d33eca4b7e682c89836e4f SHA256 ee15fc9bb63af9a9d4e9341940a7c165224b35a3c55fb09695a0cb2f3db716c1
+EBUILD horde-mnemo-kolab-2.2_alpha.ebuild 575 RMD160 75a933021c1a438ef0c29665d6c2ac52fda0f524 SHA1 a0a4f7e9c04c9a193b9859d4183f389e26fa13e3 SHA256 f7120a4c861b7febd9a46fdeed3db57412144db1a70b4b26589cb6c535f7584e
+MD5 53e2a9bdcb4ba63118f8bbac15dcda40 horde-mnemo-kolab-2.2_alpha.ebuild 575
+RMD160 75a933021c1a438ef0c29665d6c2ac52fda0f524 horde-mnemo-kolab-2.2_alpha.ebuild 575
+SHA256 f7120a4c861b7febd9a46fdeed3db57412144db1a70b4b26589cb6c535f7584e horde-mnemo-kolab-2.2_alpha.ebuild 575
+MISC ChangeLog 447 RMD160 b99469750dda1b7062ea74ef4fa108964c16df0e SHA1 64e78ba9eeb8ac4408605ea3d35aa23d6ebdb149 SHA256 6e628026da90c8d3b91dba2ab96e2916ba22b86f52fc50ce2a71e15a1cb16fe9
+MD5 89be5d3c8974a638be74b53c577f62ca ChangeLog 447
+RMD160 b99469750dda1b7062ea74ef4fa108964c16df0e ChangeLog 447
+SHA256 6e628026da90c8d3b91dba2ab96e2916ba22b86f52fc50ce2a71e15a1cb16fe9 ChangeLog 447
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 58a01ec56bbf61d147309fee92efaac6 files/digest-horde-mnemo-kolab-2.2_alpha 259
+RMD160 f58434a02a137f6a609e64515d406838312f1e20 files/digest-horde-mnemo-kolab-2.2_alpha 259
+SHA256 5222a65b5c90568431287e51b9fd200f740e6f808f23aa08710f85d8b29c0dd4 files/digest-horde-mnemo-kolab-2.2_alpha 259
diff --git a/www-apps/horde-mnemo-kolab/files/HK-GW-Edit_share_rights-2.2_alpha.patch b/www-apps/horde-mnemo-kolab/files/HK-GW-Edit_share_rights-2.2_alpha.patch
new file mode 100644
index 0000000..0c03d48
--- /dev/null
+++ b/www-apps/horde-mnemo-kolab/files/HK-GW-Edit_share_rights-2.2_alpha.patch
@@ -0,0 +1,14 @@
+Allow to edit Kolab share rights for the notepads displayed by mnemo.
+
+diff -r 2318390b621a mnemo/templates/notepads/notepads.inc
+--- a/mnemo/templates/notepads/notepads.inc Tue Sep 25 11:50:19 2007 +0200
++++ b/mnemo/templates/notepads/notepads.inc Tue Sep 25 11:52:12 2007 +0200
+@@ -53,7 +53,7 @@ function updateForm(share)
+ <p><?php echo Horde::label('id', _("Name:")) ?><br />
+ <input id="id" name="id" size="30" maxlength="60" /><br />
+ <?php if (empty($conf['shares']['no_sharing'])): ?>
+-<input type="button" name="accesslist" class="button" onclick="popup(editURL.replace(/%40ID%40/, document.shares.edit_share.value));" value="<?php echo _("Permissions") ?>" style="display:none" />
++<input type="button" name="accesslist" class="button" onclick="popup(editURL.replace(/%40ID%40/, encodeURIComponent(document.shares.edit_share.value)));" value="<?php echo _("Permissions") ?>" style="display:none" />
+ <?php endif; ?>
+ </p>
+
diff --git a/www-apps/horde-mnemo-kolab/files/conf.php_2.2_alpha.config b/www-apps/horde-mnemo-kolab/files/conf.php_2.2_alpha.config
new file mode 100644
index 0000000..0677fb8
--- /dev/null
+++ b/www-apps/horde-mnemo-kolab/files/conf.php_2.2_alpha.config
@@ -0,0 +1,9 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: mnemo/config/conf.xml,v 1.19 2006/12/14 11:28:24 jan Exp $
+$conf['storage']['driver'] = 'kolab';
+$conf['utils']['gnupg'] = '/usr/bin/gpg';
+$conf['menu']['print'] = true;
+$conf['menu']['import_export'] = true;
+$conf['menu']['apps'] = array();
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
diff --git a/www-apps/horde-mnemo-kolab/files/digest-horde-mnemo-kolab-2.2_alpha b/www-apps/horde-mnemo-kolab/files/digest-horde-mnemo-kolab-2.2_alpha
new file mode 100644
index 0000000..c96ce48
--- /dev/null
+++ b/www-apps/horde-mnemo-kolab/files/digest-horde-mnemo-kolab-2.2_alpha
@@ -0,0 +1,3 @@
+MD5 7506f8d2ac0b62421bdb87adae3edcb9 mnemo-h3-2.2-alpha.tar.gz 1242306
+RMD160 c27966ce1b8c3a677056ac23bfbb66359995b88f mnemo-h3-2.2-alpha.tar.gz 1242306
+SHA256 ee15fc9bb63af9a9d4e9341940a7c165224b35a3c55fb09695a0cb2f3db716c1 mnemo-h3-2.2-alpha.tar.gz 1242306
diff --git a/www-apps/horde-mnemo-kolab/horde-mnemo-kolab-2.2_alpha.ebuild b/www-apps/horde-mnemo-kolab/horde-mnemo-kolab-2.2_alpha.ebuild
new file mode 100644
index 0000000..64135c2
--- /dev/null
+++ b/www-apps/horde-mnemo-kolab/horde-mnemo-kolab-2.2_alpha.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-mnemo/horde-mnemo-2.1.ebuild,v 1.1 2006/03/09 23:36:36 vapier Exp $
+
+HORDE_PHP_FEATURES="-o mysql mysqli odbc postgres ldap"
+HORDE_MAJ="-h3"
+inherit horde-kolab-r4
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+"
+
+EHORDE_PATCHES="
+${FILESDIR}/HK-GW-Edit_share_rights-${PV}.patch
+"
+
+DESCRIPTION="Mnemo is the Horde note manager"
+
+KEYWORDS="~x86 ~amd64"
+
+IUSE="kolab"
+
+DEPEND=""
+RDEPEND=">=www-apps/horde-kolab-3.2_alpha"
+
diff --git a/www-apps/horde-mnemo-kolab/metadata.xml b/www-apps/horde-mnemo-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-mnemo-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/www-apps/horde-nag-kolab/ChangeLog b/www-apps/horde-nag-kolab/ChangeLog
new file mode 100644
index 0000000..464958a
--- /dev/null
+++ b/www-apps/horde-nag-kolab/ChangeLog
@@ -0,0 +1,14 @@
+# ChangeLog for www-apps/horde-nag-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org> ++,
+ -files/conf.php2.2_alpha.config:
+ Fix config file name.
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/HK-GW-Fix_share_right_editing_2.2_alpha.patch,
+ +files/conf.php_horde-nag-kolab-2.2_alpha.config, +metadata.xml,
+ +horde-nag-kolab-2.2_alpha.ebuild, -horde-nag-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
diff --git a/www-apps/horde-nag-kolab/Manifest b/www-apps/horde-nag-kolab/Manifest
new file mode 100644
index 0000000..ce5c26b
--- /dev/null
+++ b/www-apps/horde-nag-kolab/Manifest
@@ -0,0 +1,24 @@
+AUX HK-GW-Fix_share_right_editing_2.2_alpha.patch 893 RMD160 563d23f01f94d087a4d149935398880b1465428d SHA1 a0010408b12679d4e5f99151f012455d49c53330 SHA256 660ed5349aa3c6b9592b4e5227a8ae494af4ca22dfa03aca170169b8605e9504
+MD5 3fd64a1b980d2dd7227499923e3b35a5 files/HK-GW-Fix_share_right_editing_2.2_alpha.patch 893
+RMD160 563d23f01f94d087a4d149935398880b1465428d files/HK-GW-Fix_share_right_editing_2.2_alpha.patch 893
+SHA256 660ed5349aa3c6b9592b4e5227a8ae494af4ca22dfa03aca170169b8605e9504 files/HK-GW-Fix_share_right_editing_2.2_alpha.patch 893
+AUX conf.php_2.2_alpha.config 348 RMD160 7f4d929b0bdc24f7ac6d451baa5de547b289ea41 SHA1 3d3a9d55c0d40f360e3bcadc2b37fd8d87ca9a20 SHA256 88c8973548cc3b6c6e27635f626782f95e18b0bc7458f95f515687c6c4a53bce
+MD5 af7071ea9fad147635187d206f14d522 files/conf.php_2.2_alpha.config 348
+RMD160 7f4d929b0bdc24f7ac6d451baa5de547b289ea41 files/conf.php_2.2_alpha.config 348
+SHA256 88c8973548cc3b6c6e27635f626782f95e18b0bc7458f95f515687c6c4a53bce files/conf.php_2.2_alpha.config 348
+DIST nag-h3-2.2-alpha.tar.gz 1509265 RMD160 a5da76f2dce034cbbeb13e96e3a64ba5b61675f6 SHA1 a3549ba7cc143b508726bbb70fff72455475eb18 SHA256 983c2ce688c5f38cdafd5c39487e6f93928b5867710a8d6654b356997370934b
+EBUILD horde-nag-kolab-2.2_alpha.ebuild 589 RMD160 1da2343720627c2a0c4899b44b6fb8cc1b4929fd SHA1 f612612f14469b25905beba325527cc8e2382ebc SHA256 3548ed35fcca6258a2ce6ea9474a7ed671670fd26bc228507b921c3b9adbf47d
+MD5 80ebc6f9930f6df4926f8bf7dcd769e2 horde-nag-kolab-2.2_alpha.ebuild 589
+RMD160 1da2343720627c2a0c4899b44b6fb8cc1b4929fd horde-nag-kolab-2.2_alpha.ebuild 589
+SHA256 3548ed35fcca6258a2ce6ea9474a7ed671670fd26bc228507b921c3b9adbf47d horde-nag-kolab-2.2_alpha.ebuild 589
+MISC ChangeLog 523 RMD160 b85d779de797e95fded9fd1b894392c637cd6382 SHA1 2873d150f433eab69b86f3ef53cad38a9b000639 SHA256 6ddcdea32db8ae973cfe3e7a44f8b88eb6f24f40d50e1e94a742f75dcde45c48
+MD5 89a5b45630a5beae5ffe75e3bc75aebb ChangeLog 523
+RMD160 b85d779de797e95fded9fd1b894392c637cd6382 ChangeLog 523
+SHA256 6ddcdea32db8ae973cfe3e7a44f8b88eb6f24f40d50e1e94a742f75dcde45c48 ChangeLog 523
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 7a6e970fb0c3b9662f1de2de909d7b93 files/digest-horde-nag-kolab-2.2_alpha 253
+RMD160 e173d0f5a9247cc1c32801da58536caa31e6c4a0 files/digest-horde-nag-kolab-2.2_alpha 253
+SHA256 eb7c8716898f4e44e4839d8695f00e79b01ddb9e203597afccb71084a00ccc8c files/digest-horde-nag-kolab-2.2_alpha 253
diff --git a/www-apps/horde-nag-kolab/files/HK-GW-Fix_share_right_editing_2.2_alpha.patch b/www-apps/horde-nag-kolab/files/HK-GW-Fix_share_right_editing_2.2_alpha.patch
new file mode 100644
index 0000000..590ecab
--- /dev/null
+++ b/www-apps/horde-nag-kolab/files/HK-GW-Fix_share_right_editing_2.2_alpha.patch
@@ -0,0 +1,14 @@
+Fixes share right editing for nag.
+
+diff -r b7b4a2eab17c nag/templates/tasklists/tasklists.inc
+--- a/nag/templates/tasklists/tasklists.inc Wed Oct 03 19:33:59 2007 +0200
++++ b/nag/templates/tasklists/tasklists.inc Wed Oct 03 19:42:07 2007 +0200
+@@ -62,7 +62,7 @@ function checkSubmit()
+ <p><?php echo Horde::label('id', _("Name:")) ?><br />
+ <input id="id" name="id" size="30" maxlength="60" /><br />
+ <?php if (empty($conf['shares']['no_sharing'])): ?>
+-<input type="button" name="accesslist" class="button" onclick="popup(editURL.replace(/%40ID%40/, document.shares.edit_share.value));" value="<?php echo _("Permission") ?>" style="display:none" />
++<input type="button" name="accesslist" class="button" onclick="popup(editURL.replace(/%40ID%40/, encodeURIComponent(document.shares.edit_share.value)));" value="<?php echo _("Permission") ?>" style="display:none" />
+ <?php endif; ?>
+ </p>
+
diff --git a/www-apps/horde-nag-kolab/files/conf.php_2.2_alpha.config b/www-apps/horde-nag-kolab/files/conf.php_2.2_alpha.config
new file mode 100644
index 0000000..7b5a642
--- /dev/null
+++ b/www-apps/horde-nag-kolab/files/conf.php_2.2_alpha.config
@@ -0,0 +1,8 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: nag/config/conf.xml,v 1.26 2005/07/19 17:06:01 chuck Exp $
+$conf['storage']['driver'] = 'kolab';
+$conf['menu']['print'] = true;
+$conf['menu']['import_export'] = true;
+$conf['menu']['apps'] = array();
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
diff --git a/www-apps/horde-nag-kolab/files/digest-horde-nag-kolab-2.2_alpha b/www-apps/horde-nag-kolab/files/digest-horde-nag-kolab-2.2_alpha
new file mode 100644
index 0000000..97cd8c4
--- /dev/null
+++ b/www-apps/horde-nag-kolab/files/digest-horde-nag-kolab-2.2_alpha
@@ -0,0 +1,3 @@
+MD5 0b635fc9560d00f30557952a9c777b9c nag-h3-2.2-alpha.tar.gz 1509265
+RMD160 a5da76f2dce034cbbeb13e96e3a64ba5b61675f6 nag-h3-2.2-alpha.tar.gz 1509265
+SHA256 983c2ce688c5f38cdafd5c39487e6f93928b5867710a8d6654b356997370934b nag-h3-2.2-alpha.tar.gz 1509265
diff --git a/www-apps/horde-nag-kolab/horde-nag-kolab-2.2_alpha.ebuild b/www-apps/horde-nag-kolab/horde-nag-kolab-2.2_alpha.ebuild
new file mode 100644
index 0000000..4ae9a37
--- /dev/null
+++ b/www-apps/horde-nag-kolab/horde-nag-kolab-2.2_alpha.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-nag/horde-nag-2.1.ebuild,v 1.1 2006/03/09 23:36:59 vapier Exp $
+
+HORDE_PHP_FEATURES="-o mysql mysqli odbc postgres ldap"
+HORDE_MAJ="-h3"
+inherit horde-kolab-r4
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+"
+
+EHORDE_PATCHES="
+${FILESDIR}/HK-GW-Fix_share_right_editing_${PV}.patch
+"
+
+DESCRIPTION="Nag is the Horde multiuser task list manager"
+
+KEYWORDS="~x86 ~amd64"
+
+IUSE="kolab"
+
+DEPEND=""
+RDEPEND=">=www-apps/horde-kolab-3.2_alpha"
diff --git a/www-apps/horde-nag-kolab/metadata.xml b/www-apps/horde-nag-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-nag-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/www-apps/horde-passwd-kolab/ChangeLog b/www-apps/horde-passwd-kolab/ChangeLog
new file mode 100644
index 0000000..fa1bbd3
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/ChangeLog
@@ -0,0 +1,18 @@
+# ChangeLog for www-apps/horde-passwd-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ -files/horde-passwd-kolab-20070713-no-clear-password.patch,
+ -files/conf.php_horde-passwd-kolab-20070713.config,
+ +files/backends.php_3.0.1.config, +files/conf.php_3.0.1.config,
+ +horde-passwd-kolab-3.0.1.ebuild, -horde-passwd-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ -files/horde-passwd-kolab-20070713-no-clear-password.patch,
+ -files/conf.php_horde-passwd-kolab-20070713.config,
+ +files/backends.php_3.0.1.config, +files/conf.php_3.0.1.config,
+ +horde-passwd-kolab-3.0.1.ebuild, -horde-passwd-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
diff --git a/www-apps/horde-passwd-kolab/Manifest b/www-apps/horde-passwd-kolab/Manifest
new file mode 100644
index 0000000..a6a209c
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/Manifest
@@ -0,0 +1,28 @@
+AUX backends.php_3.0.1.config 5530 RMD160 a1a3d3f81d63d8922aa95d5f912b4837b53336d2 SHA1 28041dce6deb7769ce2610ad3c29f358991b04a4 SHA256 d0e12a4c4b50e7ae1895bf0172fc41a3e87e73aebd93be13077d7a48499b53f9
+MD5 819fff813df65d59c9dd2809eb17d0a2 files/backends.php_3.0.1.config 5530
+RMD160 a1a3d3f81d63d8922aa95d5f912b4837b53336d2 files/backends.php_3.0.1.config 5530
+SHA256 d0e12a4c4b50e7ae1895bf0172fc41a3e87e73aebd93be13077d7a48499b53f9 files/backends.php_3.0.1.config 5530
+AUX conf.php_3.0.1.config 797 RMD160 896c098908d842590e70c45403a6bc7878f485e8 SHA1 b19f607c9b1647d72a545fb6a87a92fd90c655d6 SHA256 4ccceef0b973acb49415f243afff64512fc5c88fd2b5aee487036480266a16b4
+MD5 31e7f94a05dd77b5b4beee204a97400b files/conf.php_3.0.1.config 797
+RMD160 896c098908d842590e70c45403a6bc7878f485e8 files/conf.php_3.0.1.config 797
+SHA256 4ccceef0b973acb49415f243afff64512fc5c88fd2b5aee487036480266a16b4 files/conf.php_3.0.1.config 797
+AUX horde-passwd-kolab-3.0-no-clear-password.patch 424 RMD160 973599225a10dedb55b331bfcd55874aa5d1a90f SHA1 59b7a4a5de40381310352dc9d037a7ad5f70e5d5 SHA256 6e2c0664f029aae9688e84313b56eddc766dcc2d3ba138082dec618eb1dc5593
+MD5 a663a0df1829b79b8197da762868127a files/horde-passwd-kolab-3.0-no-clear-password.patch 424
+RMD160 973599225a10dedb55b331bfcd55874aa5d1a90f files/horde-passwd-kolab-3.0-no-clear-password.patch 424
+SHA256 6e2c0664f029aae9688e84313b56eddc766dcc2d3ba138082dec618eb1dc5593 files/horde-passwd-kolab-3.0-no-clear-password.patch 424
+DIST passwd-h3-3.0.1.tar.gz 1265941 RMD160 a118ffc3b14dce2bb1e91af5a5f617db5c09a2e4 SHA1 50a8a0ca948029280b642ecaa6c1c6f401d8d89f SHA256 1fd0f4a693c993ade25b2835da9c8c8fd13e823945d0107abfeb736ae3b21f57
+EBUILD horde-passwd-kolab-3.0.1.ebuild 672 RMD160 0f607151b6753aafd250e1fdf42cd1778b3c5352 SHA1 9951735e64031707a6761acf87321e05bd7ce944 SHA256 f741e93eb3d75dbab35a50a7ebbc678e4ec756fc73364d2485210ec289038ea4
+MD5 4587d600d22051ae05949b269e1f257e horde-passwd-kolab-3.0.1.ebuild 672
+RMD160 0f607151b6753aafd250e1fdf42cd1778b3c5352 horde-passwd-kolab-3.0.1.ebuild 672
+SHA256 f741e93eb3d75dbab35a50a7ebbc678e4ec756fc73364d2485210ec289038ea4 horde-passwd-kolab-3.0.1.ebuild 672
+MISC ChangeLog 820 RMD160 5c1b01e9904c8494cc6de7d7c4c85d4c4cbcb183 SHA1 d817017da20e5d658beba5e0837c676fea32cb85 SHA256 80f2eb3f4265e81adf86974c20a9f2a62c7cbd46993d26c1e0f8262941532a71
+MD5 610598cba5ec88189e4bd81d22ab54c4 ChangeLog 820
+RMD160 5c1b01e9904c8494cc6de7d7c4c85d4c4cbcb183 ChangeLog 820
+SHA256 80f2eb3f4265e81adf86974c20a9f2a62c7cbd46993d26c1e0f8262941532a71 ChangeLog 820
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 6708f5aa1725275dd6c012a845644255 files/digest-horde-passwd-kolab-3.0.1 250
+RMD160 7794ced687e2ed66deab12846cc670154325e6a0 files/digest-horde-passwd-kolab-3.0.1 250
+SHA256 425d3ebab07a0aabaa329c34a956341a84fabf1b253d61ced1684d9f8abb7ffa files/digest-horde-passwd-kolab-3.0.1 250
diff --git a/www-apps/horde-passwd-kolab/files/backends.php_3.0.1.config b/www-apps/horde-passwd-kolab/files/backends.php_3.0.1.config
new file mode 100644
index 0000000..f604b93
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/files/backends.php_3.0.1.config
@@ -0,0 +1,114 @@
+<?php
+/**
+ * $Horde: passwd/config/backends.php.dist,v 1.43 2007/02/15 18:13:15 jan Exp $
+ *
+ * This file is where you specify what backends people use to change
+ * their passwords. There are a number of properties that you can set
+ * for each backend:
+ *
+ * name: This is the plaintext, english name that you want displayed
+ * to people if you are using the drop down server list. Also
+ * displayed on the main page (input form).
+ *
+ * password policy: The password policies for this backend. You are responsible
+ * for the sanity checks of these options. Options are:
+ * minLength Minimum length of the password
+ * maxLength Maximum length of the password
+ * maxSpace Maximum number of white space characters
+ *
+ * The following are the types of characters required
+ * in a password. Either specific characters, character
+ * classes, or both can be required. Specific types are:
+ *
+ * minUpper Minimum number of uppercase characters
+ * minLower Minimum number of lowercase characters
+ * minNumeric Minimum number of numeric characters (0-9)
+ * minAlphaNum Minimum number of alphanumeric characters
+ * minAlpha Minimum number of alphabetic characters
+ * minSymbol Minimum number of alphabetic characters
+ *
+ * Alternatively (or in addition to), the minimum number of
+ * character classes can be configured by setting the
+ * following. The valid range is 0 through 4 character
+ * classes may be required for a password. The classes are:
+ * 'upper', 'lower', 'number', and 'symbol'. For example:
+ * A password of 'p@ssw0rd' satisfies three classes ('number',
+ * 'lower', and 'symbol'), while 'passw0rd' only satisfies
+ * two classes ('lower' and 'symbols').
+ *
+ * minClasses Minimum number (0 through 4) of character classes.
+ *
+ * driver: The Passwd driver used to change the password. Valid
+ * Valid values are currently:
+ * ldap Change the password on a ldap server
+ * smbldap Change the password on a ldap server for both
+ * ldap and samba auth
+ * sql Change the password for sql authentication
+ * (exim, pam_mysql, horde)
+ * poppassd Change the password via a poppassd server
+ * smbpasswd Change the password via the smbpasswd command
+ * expect Change the password via an expect script
+ * vmailmgr Change the password via a local vmailmgr daemon
+ * vpopmail Change the password for sql based vpopmail
+ * servuftp Change the password via a servuftp server
+ * pine Change the password in a Pine-encoded file
+ * composite Allows you to chain multiple drivers together
+ *
+ * no_reset: Do not reset the authenticated user's credentials on success.
+ *
+ * params: A params array containing any additional information that the
+ * Passwd driver needs.
+ *
+ * The following is a list of supported encryption/hashing
+ * methods supported by Passwd.
+ *
+ * 1) plain
+ * 2) crypt or crypt-des
+ * 3) crypt-md5
+ * 4) crypt-blowfish
+ * 5) md5-hex
+ * 6) md5-base64
+ * 7) smd5
+ * 8) sha
+ * 9) ssha
+ *
+ * Currently, md5-base64, smd5, sha, and ssha require the
+ * mhash php library in order to work properly. See the
+ * INSTALL file for directions on enabling this. md5
+ * passwords have caused some problems in the past because
+ * there are different definitions of what is a "md5
+ * password". Systems implement them in a different
+ * manner. If you are using OpenLDAP as your backend or
+ * have migrated your passwords from your OS based passwd
+ * file, you will need to use the md5-base64 hashing
+ * method. If you are using a SQL database or used the PHP
+ * md5() method to create your passwords, you will need to
+ * use the md5-hex hashing method.
+ *
+ * preferred: This is only useful if you want to use the same
+ * backend.php file for different machines: if the Hostname
+ * of the Passwd 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.
+ *
+ * show_encryption: If you are using the sql or the vpopmail backend
+ * you have the choice whether or not to store the
+ * encryption type with the password. If you are
+ * using for example an SQL based PAM you will most
+ * likely not want to store the encryption type as it
+ * would cause PAM to never match the passwords.
+ *
+ */
+
+$backends['kolab'] = array(
+ 'name' => 'Local Kolab Server',
+ 'preferred' => '',
+ 'password policy' => array(
+ 'minLength' => 3,
+ 'maxLength' => 8
+ ),
+ 'driver' => 'kolab',
+ 'params' => array()
+);
diff --git a/www-apps/horde-passwd-kolab/files/conf.php_3.0.1.config b/www-apps/horde-passwd-kolab/files/conf.php_3.0.1.config
new file mode 100644
index 0000000..c9019a3
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/files/conf.php_3.0.1.config
@@ -0,0 +1,13 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: passwd/config/conf.xml,v 1.12 2005/10/09 14:48:58 jan Exp $
+$conf['menu']['apps'] = array();
+$conf['backend']['backend_list'] = 'hidden';
+$conf['user']['change'] = true;
+$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['password']['strengthtests'] = true;
+$conf['hooks']['full_name'] = true;
+$conf['hooks']['default_username'] = false;
+$conf['hooks']['username'] = false;
+$conf['hooks']['userdn'] = false;
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
diff --git a/www-apps/horde-passwd-kolab/files/digest-horde-passwd-kolab-3.0.1 b/www-apps/horde-passwd-kolab/files/digest-horde-passwd-kolab-3.0.1
new file mode 100644
index 0000000..fc2c584
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/files/digest-horde-passwd-kolab-3.0.1
@@ -0,0 +1,3 @@
+MD5 b5217a62c7a88e2845d382a1d19d5644 passwd-h3-3.0.1.tar.gz 1265941
+RMD160 a118ffc3b14dce2bb1e91af5a5f617db5c09a2e4 passwd-h3-3.0.1.tar.gz 1265941
+SHA256 1fd0f4a693c993ade25b2835da9c8c8fd13e823945d0107abfeb736ae3b21f57 passwd-h3-3.0.1.tar.gz 1265941
diff --git a/www-apps/horde-passwd-kolab/files/horde-passwd-kolab-3.0-no-clear-password.patch b/www-apps/horde-passwd-kolab/files/horde-passwd-kolab-3.0-no-clear-password.patch
new file mode 100644
index 0000000..8f4a238
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/files/horde-passwd-kolab-3.0-no-clear-password.patch
@@ -0,0 +1,13 @@
+--- passwd-h3-3.0/config/backends.php.dist
++++ passwd-h3-3.0/config/backends.php.dist
+@@ -314,8 +314,8 @@
+ 'name' => 'pw_name',
+ 'domain' => 'pw_domain',
+ 'passwd' => 'pw_passwd',
+- 'clear_passwd' => 'pw_clear_passwd',
+- 'use_clear_passwd' => true,
++ //'clear_passwd' => 'pw_clear_passwd',
++ 'use_clear_passwd' => false,
+ 'show_encryption' => true
+ )
+ );
diff --git a/www-apps/horde-passwd-kolab/horde-passwd-kolab-3.0.1.ebuild b/www-apps/horde-passwd-kolab/horde-passwd-kolab-3.0.1.ebuild
new file mode 100644
index 0000000..719aece
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/horde-passwd-kolab-3.0.1.ebuild
@@ -0,0 +1,27 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-passwd/horde-passwd-3.0.ebuild,v 1.1 2005/10/14 00:40:05 vapier Exp $
+
+HORDE_PHP_FEATURES="ctype"
+
+HORDE_MAJ="-h3"
+inherit horde-kolab-r4 eutils
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+backends.php_${PV}.config
+"
+
+DESCRIPTION="Horde Passwd is the Horde password changing application"
+
+KEYWORDS="~x86"
+IUSE="clearpasswd kolab"
+
+DEPEND=""
+RDEPEND=">=www-apps/horde-kolab-3.2_alpha"
+
+src_unpack() {
+ horde-kolab-r4_src_unpack
+ cd "${S}"
+ use clearpasswd || epatch "${FILESDIR}"/${PN}-3.0-no-clear-password.patch
+}
diff --git a/www-apps/horde-passwd-kolab/metadata.xml b/www-apps/horde-passwd-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-passwd-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/www-apps/horde-turba-kolab/ChangeLog b/www-apps/horde-turba-kolab/ChangeLog
new file mode 100644
index 0000000..f5e179c
--- /dev/null
+++ b/www-apps/horde-turba-kolab/ChangeLog
@@ -0,0 +1,21 @@
+# ChangeLog for www-apps/horde-turba-kolab
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 16 Oct 2007; Gunnar Wrobel <wrobel@gentoo.org>
+ +files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch,
+ +files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch,
+ +files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch,
+ +files/HK-GW-Fix_editing_contacts-2.2_alpha.patch,
+ +files/HK-GW-Fix_share_id_change-2.2_alpha.patch,
+ +files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch,
+ -files/sources.php_horde-turba-kolab-20070713.config,
+ -files/conf.php_horde-turba-kolab-20070713.config,
+ -files/lib-Driver-ldap.php-20070713.patch,
+ -files/lib-Turba.php-20070713.patch,
+ -files/config-sources.php.dist-20070713.patch,
+ +files/conf.php_2.2_alpha.config, +files/sources.php_2.2_alpha.config,
+ +metadata.xml, +horde-turba-kolab-2.2_alpha.ebuild,
+ -horde-turba-kolab-20070713.ebuild:
+ -m Update to the latest horde release.
+
diff --git a/www-apps/horde-turba-kolab/Manifest b/www-apps/horde-turba-kolab/Manifest
new file mode 100644
index 0000000..3d9937c
--- /dev/null
+++ b/www-apps/horde-turba-kolab/Manifest
@@ -0,0 +1,48 @@
+AUX HK-GW-Changes_after_ALPHA-2.2_alpha.patch 10693 RMD160 60a7a2320de6a95967527ac920d0353f52093ea0 SHA1 49de617c4f0a3003327f574a3a5ae08a3ebf2740 SHA256 7d8698c339970f6c1706f0f2cfd1ccf5d1dd083dcff00c0f0592e1099a6ae60a
+MD5 35718789c7c3455df77ce5ce7d477386 files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch 10693
+RMD160 60a7a2320de6a95967527ac920d0353f52093ea0 files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch 10693
+SHA256 7d8698c339970f6c1706f0f2cfd1ccf5d1dd083dcff00c0f0592e1099a6ae60a files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch 10693
+AUX HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch 658 RMD160 2c345a84004968b5a9648d229d77b30991b02cc6 SHA1 8d41f086ebc7130ef110057d11a83dfc5790c953 SHA256 5cd2aaa2cfcfb48e416ffa21ad112bf2801edbc17f61dd15d54ee5f1f7495528
+MD5 24b5bf21ee38e00dcc62bbc2f9b16699 files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch 658
+RMD160 2c345a84004968b5a9648d229d77b30991b02cc6 files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch 658
+SHA256 5cd2aaa2cfcfb48e416ffa21ad112bf2801edbc17f61dd15d54ee5f1f7495528 files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch 658
+AUX HK-GW-Fix_editing_contacts-2.2_alpha.patch 476 RMD160 350ea0448d71084863125ed03055f6a37621a065 SHA1 0052aa328bf6cf6103313c14df87c29d626c2f69 SHA256 c7d8b82b15a8326e80802a2fd28cc7cbc2ed927610086cb5396b5721b5b6a95b
+MD5 f7d9b9c260ef986ea7c554bd49e70750 files/HK-GW-Fix_editing_contacts-2.2_alpha.patch 476
+RMD160 350ea0448d71084863125ed03055f6a37621a065 files/HK-GW-Fix_editing_contacts-2.2_alpha.patch 476
+SHA256 c7d8b82b15a8326e80802a2fd28cc7cbc2ed927610086cb5396b5721b5b6a95b files/HK-GW-Fix_editing_contacts-2.2_alpha.patch 476
+AUX HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch 557 RMD160 ac3331c140e92c91b5aa5550037e3f0f7959af13 SHA1 c67938106b3f409ee2743d61f45e675cbd9ee92c SHA256 941c4b5671cd1708592c130df85218646e06508ea0c75b8ccc49b79723db0244
+MD5 b4ea19eace25a68304ffd90d3f830b18 files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch 557
+RMD160 ac3331c140e92c91b5aa5550037e3f0f7959af13 files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch 557
+SHA256 941c4b5671cd1708592c130df85218646e06508ea0c75b8ccc49b79723db0244 files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch 557
+AUX HK-GW-Fix_share_id_change-2.2_alpha.patch 1136 RMD160 8c659dde0795ce7e9f07055cf4c192fdbbe7f5aa SHA1 df16d677cb83700b2d36bc5d0cd53a9403e73dda SHA256 00ff20831d5d33b344f351da2bae2e3c0f2de8ca17d9a5901f50873e5f610fad
+MD5 36cc9cda3381be2d21b5a8bec15e1f9c files/HK-GW-Fix_share_id_change-2.2_alpha.patch 1136
+RMD160 8c659dde0795ce7e9f07055cf4c192fdbbe7f5aa files/HK-GW-Fix_share_id_change-2.2_alpha.patch 1136
+SHA256 00ff20831d5d33b344f351da2bae2e3c0f2de8ca17d9a5901f50873e5f610fad files/HK-GW-Fix_share_id_change-2.2_alpha.patch 1136
+AUX HK-GW-Ldap_read_only_fix-2.2_alpha.patch 1370 RMD160 d3b1f669526a52afae1f71eda9c15a735af83cca SHA1 a9e349fdab4333530097503d0e19714d03774eb8 SHA256 b6b0302e0dea5de8c0e332e894332c244b24ea5310d9ffe2955d3c28cf9281ce
+MD5 0ab753dcfe91be6098dea6a0b6bc7dc2 files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch 1370
+RMD160 d3b1f669526a52afae1f71eda9c15a735af83cca files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch 1370
+SHA256 b6b0302e0dea5de8c0e332e894332c244b24ea5310d9ffe2955d3c28cf9281ce files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch 1370
+AUX conf.php_2.2_alpha.config 437 RMD160 71ca79fc930027a3880bc6d850c2937bce1e5c74 SHA1 37e244c1ecb97473dfd18c5243338cb1f8632577 SHA256 195fcce93ee181d970014e0d83953c12f80ae808c77742c5e14a292a5507bef2
+MD5 cb886cb3fed39a8cd7bdf5bf19c4dd3e files/conf.php_2.2_alpha.config 437
+RMD160 71ca79fc930027a3880bc6d850c2937bce1e5c74 files/conf.php_2.2_alpha.config 437
+SHA256 195fcce93ee181d970014e0d83953c12f80ae808c77742c5e14a292a5507bef2 files/conf.php_2.2_alpha.config 437
+AUX sources.php_2.2_alpha.config 12512 RMD160 ba50571f7fa4b299fa311a62369acac358181d0e SHA1 a7a3194dff0960c7a3c3e239e8d32c601a676eb2 SHA256 8a61446757d07023ff62492ef895e3aeab9333100810be7d8b9bf0defee0dad4
+MD5 be5129a22d308f9d31213e810fd1e30f files/sources.php_2.2_alpha.config 12512
+RMD160 ba50571f7fa4b299fa311a62369acac358181d0e files/sources.php_2.2_alpha.config 12512
+SHA256 8a61446757d07023ff62492ef895e3aeab9333100810be7d8b9bf0defee0dad4 files/sources.php_2.2_alpha.config 12512
+DIST turba-h3-2.2-alpha.tar.gz 1964965 RMD160 500ac66cd607512a76364e1671a16da739fec4c6 SHA1 e5904f9fb64dc322f0b55efc4bf30f062211d31a SHA256 a445633c6ce19298e8abec88b9e5faf2e99fc8a767131b582ef775330cad87a0
+EBUILD horde-turba-kolab-2.2_alpha.ebuild 903 RMD160 fb7ceaf999730ebcdef7c0f8b99f13efdccbc479 SHA1 bf09e404ea6dfa71ec286a2d0c27162cc54ef700 SHA256 47edb68124953ae3aed51cb186310f8ea2e4bd47d0e4d80aa24653e1b192fef0
+MD5 cea2567d6e4c53d2ed6cd1d8045a68ac horde-turba-kolab-2.2_alpha.ebuild 903
+RMD160 fb7ceaf999730ebcdef7c0f8b99f13efdccbc479 horde-turba-kolab-2.2_alpha.ebuild 903
+SHA256 47edb68124953ae3aed51cb186310f8ea2e4bd47d0e4d80aa24653e1b192fef0 horde-turba-kolab-2.2_alpha.ebuild 903
+MISC ChangeLog 960 RMD160 96654b25082a27c813f5b28667fb5218ee3dd72d SHA1 6a23c91111c3f196eba43054a2879e4d5002434e SHA256 0fe0d4496a23bad7c40e81058ded6162523bc1c865cdb39d185078b75bcf8b4c
+MD5 0fc46ae997e2b7d59edb9316eddfc00e ChangeLog 960
+RMD160 96654b25082a27c813f5b28667fb5218ee3dd72d ChangeLog 960
+SHA256 0fe0d4496a23bad7c40e81058ded6162523bc1c865cdb39d185078b75bcf8b4c ChangeLog 960
+MISC metadata.xml 157 RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a SHA1 ddaa23cc35eb917bf8962b652442bebb1ce0f440 SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+RMD160 a98db3a086fae3c09a903dadbc05f60443ec4b1a metadata.xml 157
+SHA256 54f8878ca0228e380abbaa4b529806b5533a6b9b51b3b16c0909e906586a91a1 metadata.xml 157
+MD5 f62826d5b62fd8f92d5f893aa67a2f34 files/digest-horde-turba-kolab-2.2_alpha 259
+RMD160 533dbbe5b6387580f5b9df8a432b1768c6551fc1 files/digest-horde-turba-kolab-2.2_alpha 259
+SHA256 89672067e6e5f637781264daf5710b96707abad8f116d0a4322fa9fed33bdec4 files/digest-horde-turba-kolab-2.2_alpha 259
diff --git a/www-apps/horde-turba-kolab/files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch b/www-apps/horde-turba-kolab/files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch
new file mode 100644
index 0000000..f948cac
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/HK-GW-Changes_after_ALPHA-2.2_alpha.patch
@@ -0,0 +1,268 @@
+Some necessary fixes for Turba from CVS.
+
+diff -r 0ca2d81b250b turba/addressbooks.php
+--- a/turba/addressbooks.php Tue Oct 02 15:05:12 2007 +0200
++++ b/turba/addressbooks.php Tue Oct 02 15:12:26 2007 +0200
+@@ -4,7 +4,7 @@
+ *
+ * Copyright 2005-2007 The Horde Project (http://www.horde.org/)
+ *
+- * $Horde: turba/addressbooks.php,v 1.32 2007/08/01 10:43:29 jan Exp $
++ * $Horde: turba/addressbooks.php,v 1.33 2007/08/16 17:35:26 mrubinsk Exp $
+ *
+ * See the enclosed file LICENSE for license information (ASL). If you did
+ * did not receive this file, see http://www.horde.org/licenses/asl.php.
+@@ -102,7 +102,6 @@ case 'add':
+ $notification->push(sprintf(_("There was an error creating this address book: %s"), $share->getMessage()), 'horde.error');
+ } else {
+ $notification->push(sprintf(_("The address book \"%s\" was created successfully."), $share->get('name')), 'horde.success');
+- Turba::addSourceFromShare($share);
+ }
+
+ header('Location: ' . Horde::applicationUrl('addressbooks.php', true));
+diff -r 0ca2d81b250b turba/lib/Driver/kolab.php
+--- a/turba/lib/Driver/kolab.php Tue Oct 02 15:05:12 2007 +0200
++++ b/turba/lib/Driver/kolab.php Tue Oct 02 15:12:26 2007 +0200
+@@ -2,7 +2,7 @@
+ /**
+ * @package Turba
+ *
+- * $Horde: turba/lib/Driver/kolab.php,v 1.27 2007/06/19 09:50:30 wrobel Exp $
++ * $Horde: turba/lib/Driver/kolab.php,v 1.28 2007/09/19 07:43:19 wrobel Exp $
+ */
+
+ /** Kolab support class. */
+@@ -151,12 +151,36 @@ class Turba_Driver_kolab extends Turba_D
+ }
+ }
+
++ /**
++ * Creates a new Horde_Share
++ *
++ * @param array The params for the share.
++ *
++ * @return mixed The share object or PEAR_Error.
++ * @since Turba 2.2
++ */
++ function &createShare($share_id, $params)
++ {
++ if (isset($params['params']['default']) && $params['params']['default'] === true) {
++ $share_id = Auth::getAuth();
++ }
++
++ $result = &Turba::createShare($share_id, $params);
++ return $result;
++ }
++
++ function checkDefaultShare(&$share, $srcConfig)
++ {
++ $params = @unserialize($share->get('params'));
++ return $params['default'];
++ }
++
+ }
+
+ /**
+ * Horde Turba wrapper to distinguish between both Kolab driver implementations.
+ *
+- * $Horde: turba/lib/Driver/kolab.php,v 1.27 2007/06/19 09:50:30 wrobel Exp $
++ * $Horde: turba/lib/Driver/kolab.php,v 1.28 2007/09/19 07:43:19 wrobel Exp $
+ *
+ * Copyright 2004-2007 The Horde Project (http://www.horde.org/)
+ *
+diff -r 0ca2d81b250b turba/lib/Turba.php
+--- a/turba/lib/Turba.php Tue Oct 02 15:05:12 2007 +0200
++++ b/turba/lib/Turba.php Tue Oct 02 15:12:26 2007 +0200
+@@ -1,6 +1,6 @@
+ <?php
+ /**
+- * $Horde: turba/lib/Turba.php,v 1.148 2007/08/02 21:19:27 mrubinsk Exp $
++ * $Horde: turba/lib/Turba.php,v 1.152 2007/08/24 19:37:54 mrubinsk Exp $
+ *
+ * @package Turba
+ */
+@@ -213,8 +213,6 @@ class Turba {
+ */
+ function guessLastname($name)
+ {
+- global $prefs;
+-
+ $name = trim(preg_replace('|\s|', ' ', $name));
+ if (!empty($name)) {
+ /* Assume that last names are always before any commas. */
+@@ -469,24 +467,27 @@ class Turba {
+ }
+
+ /**
+- * Add a new source entry based on a Turba share directly to $cfgSources,
+- * bypassing any permission checking.
+- *
+- * @param Horde_Share object The share to add.
++ * Retrieve a new source config entry based on a Turba share.
++ *
++ * @param Horde_Share object The share to base config on.
++ *
+ * @since Turba 2.2
+ */
+- function addSourceFromShare(&$share)
+- {
+- $name = $share->getName();
+- if (!isset($GLOBALS['cfgSources'][$name])) {
+- list($source, $user) = explode(':', $name, 2);
+- if ($user != Auth::getAuth()) {
+- $newSrc = $GLOBALS['cfgSources'][$source];
+- unset($newSrc['use_shares']);
+- $newSrc['title'] = $share->get('name');
+- $GLOBALS['cfgSources'][$name] = $newSrc;
+- }
+- }
++ function getSourceFromShare(&$share)
++ {
++ // Require a fresh config file.
++ require TURBA_BASE . '/config/sources.php';
++
++ $params = @unserialize($share->get('params'));
++ $newConfig = $cfgSources[$params['source']];
++ $newConfig['params']['config'] = $cfgSources[$params['source']];
++ $newConfig['params']['config']['params']['share'] = &$share;
++ $newConfig['params']['config']['params']['name'] = $params['name'];
++ $newConfig['title'] = $share->get('name');
++ $newConfig['type'] = 'share';
++ $newConfig['use_shares'] = false;
++
++ return $newConfig;
+ }
+
+ /**
+@@ -616,10 +617,13 @@ class Turba {
+
+ // Kinda hackish way of indicating what tasks need to run, until
+ // a more general mechanism is available.
+- $needed_tasks = array('upgradeprefs');
++ $needed_tasks = array('upgradeprefs', 'upgradelists');
+
+ $successful = array();
+ $existing = @unserialize($GLOBALS['prefs']->getValue('turba_maintenance_tasks'));
++ if (empty($existing)) {
++ $existing = array();
++ }
+ foreach ($needed_tasks as $taskname) {
+ if (array_search($taskname, $existing) === false) {
+ include dirname(__file__) . '/Maintenance/Task/' . basename($taskname) . '.php';
+diff -r 0ca2d81b250b turba/lib/api.php
+--- a/turba/lib/api.php Tue Oct 02 15:05:12 2007 +0200
++++ b/turba/lib/api.php Tue Oct 02 15:12:26 2007 +0200
+@@ -2,7 +2,7 @@
+ /**
+ * Turba external API interface.
+ *
+- * $Horde: turba/lib/api.php,v 1.214 2007/08/02 04:37:18 chuck Exp $
++ * $Horde: turba/lib/api.php,v 1.219 2007/08/29 12:13:30 jan Exp $
+ *
+ * This file defines Turba's external API interface. Other applications can
+ * interact with Turba through this API.
+@@ -180,18 +180,34 @@ function _turba_removeUserData($user)
+
+ /* We need a clean copy of the $cfgSources array here.*/
+ require TURBA_BASE . '/config/sources.php';
+-
+ $hasError = false;
+- $sourceKeys = array_keys($cfgSources);
+- foreach ($sourceKeys as $sourceKey) {
+- $driver = &Turba_Driver::singleton($sourceKey);
+- if (is_a($driver, 'PEAR_Error')) {
++ $shares = null;
++
++ foreach ($cfgSources as $source) {
++ if (empty($source['use_shares'])) {
++ // Shares not enabled for this source
++ $driver = &Turba_Driver::singleton($source);
++ if (is_a($driver, 'PEAR_Error')) {
++ $hasError = true;
++ } else {
++ $result = $driver->removeUserData($user);
++ if (is_a($result, 'PEAR_Error')) {
++ $hasError = true;
++ }
++ }
++ }
++ }
++
++ $shares = &$GLOBALS['turba_shares']->listShares($user,
++ PERMS_EDIT,
++ $user);
++ foreach ($shares as $share) {
++ $params = @unserialize($share->get('params'));
++ $config = Turba::getSourceFromShare($share);
++ $driver = &Turba_Driver::singleton($config);
++ $result = $driver->removeUserData($user);
++ if (is_a($result, 'PEAR_Error')) {
+ $hasError = true;
+- } else {
+- $result = $driver->removeUserData($user);
+- if (is_a($result, 'PEAR_Error')) {
+- $hasError = true;
+- }
+ }
+ }
+
+@@ -918,6 +934,10 @@ function _turba_search($names = array(),
+ return array();
+ }
+
++ if (!is_array($names)) {
++ $names = is_null($names) ? array() : array($names);
++ }
++
+ if (!count($sources)) {
+ $sources = array(key($cfgSources));
+ }
+@@ -934,7 +954,8 @@ function _turba_search($names = array(),
+ }
+
+ // Skip sources that aren't browseable if the search is empty.
+- if (!count($names) && empty($cfgSources[$source]['browse'])) {
++ if (empty($cfgSources[$source]['browse'])
++ && (!count($names) || (count($names) == 1 && empty($names[0])))) {
+ continue;
+ }
+
+@@ -1024,6 +1045,7 @@ function _turba_search($names = array(),
+ $listatt = $ob->getAttributes();
+ $seeninlist = array();
+ $members = $ob->listMembers();
++ $listName = $ob->getValue('name');
+ if (is_a($members, 'Turba_List')) {
+ if ($members->count() > 0) {
+ if (!isset($results[$name])) {
+@@ -1032,7 +1054,8 @@ function _turba_search($names = array(),
+ $emails = array();
+ while ($ob = $members->next()) {
+ $att = $ob->getAttributes();
+- foreach ($att as $key => $value) {
++ foreach (array_keys($att) as $key) {
++ $value = $ob->getValue($key);
+ if (!empty($value) && isset($attributes[$key]) &&
+ $attributes[$key]['type'] == 'email' &&
+ empty($seeninlist[trim(String::lower($att['name'])) . trim(String::lower($value))])) {
+@@ -1042,7 +1065,7 @@ function _turba_search($names = array(),
+ }
+ }
+ }
+- $results[$name][] = array('name' => $listatt['name'], 'email' => implode(', ', $emails), 'id' => $listatt['__key'], 'source' => $source);
++ $results[$name][] = array('name' => $listName, 'email' => implode(', ', $emails), 'id' => $listatt['__key'], 'source' => $source);
+ }
+ }
+ }
+diff -r 0ca2d81b250b turba/templates/addressbooks.inc
+--- a/turba/templates/addressbooks.inc Tue Oct 02 15:05:12 2007 +0200
++++ b/turba/templates/addressbooks.inc Tue Oct 02 15:12:26 2007 +0200
+@@ -120,7 +120,7 @@ function verifyDelete()
+ <strong><?php echo _("Permissions") ?></strong>
+ </td>
+ <td>
+- <input type="button" name="perms" class="button" onclick="if (document.editshares.editshare.value) popup(editURL.replace(/%40ID%40/, document.editshares.editshare.value));" value="<?php echo _("Edit") ?>" />
++ <input type="button" name="perms" class="button" onclick="if (document.editshares.editshare.value) popup(editURL.replace(/%40ID%40/, encodeURIComponent(document.editshares.editshare.value)));" value="<?php echo _("Edit") ?>" />
+ </td>
+ </tr>
+ <?php endif; ?>
diff --git a/www-apps/horde-turba-kolab/files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch b/www-apps/horde-turba-kolab/files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch
new file mode 100644
index 0000000..df4b1ef
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/HK-GW-Fix_address_book_deletion_1-2.2_alpha.patch
@@ -0,0 +1,17 @@
+Fixes address book deletion.
+
+diff -r 8e461aedd317 turba/lib/Driver/kolab.php
+--- a/turba/lib/Driver/kolab.php Tue Oct 02 09:24:16 2007 +0200
++++ b/turba/lib/Driver/kolab.php Tue Oct 02 09:30:45 2007 +0200
+@@ -892,11 +892,6 @@ class Turba_Driver_kolab_wrapper_new ext
+ return $result;
+ }
+
+- if ($sourceName != null) {
+- Horde::logMessage('deleteAll only working for current share. Called for $sourceName', __FILE__, __LINE__, PEAR_LOG_ERR);
+- return PEAR::raiseError(sprintf(_("Cannot delete all address book entries for %s"), $sourceName));
+- }
+-
+ return $this->_store->deleteAll();
+ }
+
diff --git a/www-apps/horde-turba-kolab/files/HK-GW-Fix_editing_contacts-2.2_alpha.patch b/www-apps/horde-turba-kolab/files/HK-GW-Fix_editing_contacts-2.2_alpha.patch
new file mode 100644
index 0000000..3edaab4
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/HK-GW-Fix_editing_contacts-2.2_alpha.patch
@@ -0,0 +1,14 @@
+Fixes editing contacts.
+
+diff -r de15e2f26408 turba/lib/Driver/share.php
+--- a/turba/lib/Driver/share.php Tue Oct 02 12:25:42 2007 +0200
++++ b/turba/lib/Driver/share.php Tue Oct 02 12:38:50 2007 +0200
+@@ -58,7 +58,7 @@ class Turba_Driver_share extends Turba_D
+ */
+ function getName()
+ {
+- $share_parts = explode(':', $this->_share->getName());
++ $share_parts = explode(':', $this->_share->getId());
+ return array_pop($share_parts);
+ }
+
diff --git a/www-apps/horde-turba-kolab/files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch b/www-apps/horde-turba-kolab/files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch
new file mode 100644
index 0000000..89c934e
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/HK-GW-Fix_notice_on_addressbook_creation-2.2_alpha.patch
@@ -0,0 +1,14 @@
+Fixes a notice when creating a new share.
+
+diff -r 6da2fcb4e060 turba/lib/Driver/kolab.php
+--- a/turba/lib/Driver/kolab.php Tue Oct 02 07:47:47 2007 +0200
++++ b/turba/lib/Driver/kolab.php Tue Oct 02 08:18:26 2007 +0200
+@@ -222,7 +222,7 @@ class Turba_Driver_kolab_wrapper {
+ */
+ function Turba_Driver_kolab_wrapper($addressbook, &$kolab)
+ {
+- if ($addressbook[0] == '_') {
++ if ($addressbook && $addressbook[0] == '_') {
+ $addressbook = substr($addressbook, 1);
+ }
+ $this->_addressbook = $addressbook;
diff --git a/www-apps/horde-turba-kolab/files/HK-GW-Fix_share_id_change-2.2_alpha.patch b/www-apps/horde-turba-kolab/files/HK-GW-Fix_share_id_change-2.2_alpha.patch
new file mode 100644
index 0000000..f60e1a0
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/HK-GW-Fix_share_id_change-2.2_alpha.patch
@@ -0,0 +1,23 @@
+This fixes a problem with the way the Kolab share driver handles ids.
+
+diff -r dd05e667699d turba/lib/Turba.php
+--- a/turba/lib/Turba.php Tue Oct 02 06:47:29 2007 +0200
++++ b/turba/lib/Turba.php Tue Oct 02 06:55:13 2007 +0200
+@@ -439,7 +439,7 @@ class Turba {
+
+ $source_config = $sources[$source];
+ $source_config['params']['share'] = &$share;
+- $sources[$sourceKey] = $source_config;
++ $sources[$share->getId()] = $source_config;
+ } else {
+ $notification->push($driver, 'horde.error');
+ }
+@@ -564,7 +564,7 @@ class Turba {
+ /* Add the new addressbook to the user's list of visible
+ * address books. */
+ $prefs = explode("\n", $GLOBALS['prefs']->getValue('addressbooks'));
+- if (array_search($share_id, $prefs) === false) {
++ if (array_search($share->getId(), $prefs) === false) {
+ $GLOBALS['prefs']->setValue('addressbooks', $GLOBALS['prefs']->getValue('addressbooks') . "\n" . $share_id);
+ }
+ return $share;
diff --git a/www-apps/horde-turba-kolab/files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch b/www-apps/horde-turba-kolab/files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch
new file mode 100644
index 0000000..ed84a35
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/HK-GW-Ldap_read_only_fix-2.2_alpha.patch
@@ -0,0 +1,41 @@
+This is a temporary fix to mark the ldap addressbook as read-only. This should be solved with the Horde Perms package but this needs a new driver.
+
+diff -r b7be146cb26a turba/lib/Driver/ldap.php
+--- a/turba/lib/Driver/ldap.php Tue Oct 02 07:18:36 2007 +0200
++++ b/turba/lib/Driver/ldap.php Tue Oct 02 07:19:20 2007 +0200
+@@ -53,6 +53,9 @@ class Turba_Driver_ldap extends Turba_Dr
+ }
+ if (empty($params['deref'])) {
+ $params['deref'] = LDAP_DEREF_NEVER;
++ }
++ if (empty($params['read_only'])) {
++ $params['read_only'] = false;
+ }
+
+ parent::Turba_Driver($params);
+@@ -749,4 +752,25 @@ class Turba_Driver_ldap extends Turba_Dr
+ return $dn;
+ }
+
++ /**
++ * Checks if the current user has the requested permission
++ * on this source.
++ *
++ * @param integer $perm The permission to check for.
++ *
++ * @return boolean true if user has permission, false otherwise.
++ */
++ function hasPermission($perm)
++ {
++ if ($this->_params['read_only'] === false) {
++ return parent::hasPermission($perm);
++ } else {
++ switch ($perm) {
++ case PERMS_EDIT: return false;
++ case PERMS_DELETE: return false;
++ default: return parent::hasPermission($perm);
++ }
++ }
++ }
++
+ }
diff --git a/www-apps/horde-turba-kolab/files/conf.php_2.2_alpha.config b/www-apps/horde-turba-kolab/files/conf.php_2.2_alpha.config
new file mode 100644
index 0000000..d9769c2
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/conf.php_2.2_alpha.config
@@ -0,0 +1,10 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: turba/config/conf.xml,v 1.20 2006/05/09 14:22:18 jan Exp $
+$conf['menu']['import_export'] = true;
+$conf['menu']['apps'] = array();
+$conf['client']['addressbook'] = 'kolab_local';
+$conf['shares']['source'] = 'kolab';
+$conf['comments']['allow'] = true;
+$conf['documents']['type'] = 'horde';
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
diff --git a/www-apps/horde-turba-kolab/files/digest-horde-turba-kolab-2.2_alpha b/www-apps/horde-turba-kolab/files/digest-horde-turba-kolab-2.2_alpha
new file mode 100644
index 0000000..9c0593c
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/digest-horde-turba-kolab-2.2_alpha
@@ -0,0 +1,3 @@
+MD5 a69a18ef253a56cb6c498b52bff28d1a turba-h3-2.2-alpha.tar.gz 1964965
+RMD160 500ac66cd607512a76364e1671a16da739fec4c6 turba-h3-2.2-alpha.tar.gz 1964965
+SHA256 a445633c6ce19298e8abec88b9e5faf2e99fc8a767131b582ef775330cad87a0 turba-h3-2.2-alpha.tar.gz 1964965
diff --git a/www-apps/horde-turba-kolab/files/sources.php_2.2_alpha.config b/www-apps/horde-turba-kolab/files/sources.php_2.2_alpha.config
new file mode 100644
index 0000000..aa52b55
--- /dev/null
+++ b/www-apps/horde-turba-kolab/files/sources.php_2.2_alpha.config
@@ -0,0 +1,292 @@
+<?php
+/**
+ * $Horde: turba/config/sources.php.dist,v 1.166 2007/05/23 22:08:54 wrobel Exp $
+ *
+ * This file is where you specify the sources of contacts available to users
+ * at your installation. It contains a large number of EXAMPLES. Please
+ * remove or comment out those examples that YOU DON'T NEED. There are a
+ * number of properties that you can set for each server, including:
+ *
+ * title: This is the common (user-visible) name that you want displayed
+ * in the contact source drop-down box.
+ *
+ * type: The types 'ldap', 'sql', 'imsp' and 'prefs' are currently
+ * supported. Preferences-based address books are not intended
+ * for production installs unless you really know what you're
+ * doing - they are not searchable, and they won't scale well if
+ * a user has a large number of entries.
+ *
+ * params: These are the connection parameters specific to the contact
+ * source. See below for examples of how to set these.
+ *
+ * Special params settings:
+ *
+ * charset: The character set that the backend stores data in. Many
+ * LDAP servers use utf-8. Database servers typically use
+ * iso-8859-1.
+ *
+ * tls: Only applies to LDAP servers. If true, then try to use a
+ * TLS connection to the server.
+ *
+ * scope: Only applies to LDAP servers. Can be set to 'one' to
+ * search one level of the LDAP directory, or 'sub' to search
+ * all levels. 'one' will work for most setups and should be
+ * much faster. However we default to 'sub' for backwards
+ * compatibility.
+ *
+ * checkrequired: Only applies to LDAP servers. If present, this value causes
+ * the driver to consult the LDAP schema for any attributes
+ * that are required by the given objectclass(es). Required
+ * attributes will be provided automatically if the
+ * 'checkrequired_string' parameter is present.
+ * *NOTE* You must have the Net_LDAP PEAR library installed
+ * for this to work.
+ *
+ * checksyntax: Only applies to LDAP servers. If present, this value causes
+ * the driver to inspect the LDAP schema for particular
+ * attributes by the type defined in the corresponding schema
+ * *NOTE* You must have the Net_LDAP PEAR library installed
+ * for this to work.
+ *
+ * deref: Only applies to LDAP servers. If set, should be one of:
+ * LDAP_DEREF_NEVER
+ * LDAP_DEREF_SEARCHING
+ * LDAP_DEREF_FINDING
+ * LDAP_DEREF_ALWAYS
+ * This tells the LDAP server when to dereference
+ * aliases. See http://www.php.net/ldap for more
+ * information.
+ *
+ * dn: Only applies to LDAP servers. Defines the list of LDAP
+ * attributes that build a valid DN.
+ *
+ * objectclass: Only applies to LDAP servers. Defines a list of
+ * objectclasses that the LDAP object must be a member of.
+ *
+ * filter: Filter helps to filter your result based on certain
+ * condition in SQL and LDAP backends. A filter can be
+ * specified to avoid some unwanted data. For example, if the
+ * source is an external sql database, to select records with
+ * the delete flag = 0:
+ * 'filter' = 'deleted=0'
+ *
+ * map: This is a list of mappings from the Turba attribute names
+ * (on the left) to the attribute names by which they are known
+ * in this contact source (on the right). Turba also supports
+ * composite fields. A composite field is defined by mapping
+ * the field name to an array containing a list of component
+ * fields and a format string (similar to a printf() format
+ * string). 'attribute' defines where the composed value
+ * is saved, and can be left out. Here is an example:
+ * ...
+ * 'name' => array('fields' => array('firstname', 'lastname'),
+ * 'format' => '%s %s',
+ * 'attribute' => 'object_name'),
+ * 'firstname' => 'object_firstname',
+ * 'lastname' => 'object_lastname',
+ * ...
+ *
+ * Standard Turba attributes are:
+ * __key : A backend-specific ID for the entry (any value
+ * as long as it is unique inside that source;
+ * required)
+ * __uid : Globally unique ID of the entry (used for
+ * synchronizing and must be able to be set to any
+ * value)
+ * __owner : User name of the contact's owner
+ * __type : Either 'Object' or 'Group'
+ * __members : Serialized PHP array with list of Group members.
+ * More Turba attributes are defined in config/attributes.php.
+ *
+ * tabs: All fields can be grouped into tabs with this optional entry.
+ * This list is multidimensional hash, the keys are the tab
+ * titles.
+ * Here is an example:
+ * 'tabs' => array(
+ * 'Names' => array('firstname', 'lastname', 'alias'),
+ * 'Addresses' => array('homeAddress', 'workAddress')
+ * );
+ *
+ * search: A list of Turba attribute names that can be searched for this
+ * source.
+ *
+ * strict: A list of native field/attribute names that must always be
+ * matched exactly in a search.
+ *
+ * export: If set to true, this source will appear on the Export menu,
+ * allowing users to export the contacts to a CSV (etc.) file.
+ *
+ * browse: If set to true, this source will be browseable via the Browse
+ * menu item, and empty searches against the source will return
+ * all contacts.
+ *
+ * use_shares: If this is present and true, Turba_Share functionality will
+ * be enabled for this source - allowing users to share their
+ * personal address books as well as to create new ones. Since
+ * Turba only supports having one backend configured for
+ * creating new shares, use the 'shares' configuration option to
+ * specify which backend will be used for creating new shares.
+ * All permission checking will be done against Turba_Share, but
+ * note that any 'extended' permissions (such as max_contacts)
+ * will still be enforced. Also note that the backend driver
+ * must have support for using this. Currently SQL and IMSP.
+ *
+ * Here are some example configurations:
+ */
+
+/* Begin Kolab sources. */
+if (!empty($GLOBALS['conf']['kolab']['enabled'])) {
+
+ /* Only use LDAP if we have that extension in PHP */
+ if (function_exists('ldap_connect')) {
+ require_once 'Horde/Kolab.php';
+
+ if (!is_callable('Kolab', 'getServer')) {
+ $server = $GLOBALS['conf']['kolab']['ldap']['server'];
+ } else {
+ $server = Kolab::getServer('ldap');
+ }
+
+ /* A global address book for a Kolab Server. This is typically a
+ * read-only public directory, stored in the default Kolab LDAP server.
+ * The user accessing this should have read permissions to the shared
+ * directory in LDAP. */
+ $cfgSources['kolab_global'] = array(
+ 'title' => _("Global Address Book"),
+ 'type' => 'ldap',
+ 'params' => array(
+ 'server' => $server,
+ 'port' => $GLOBALS['conf']['kolab']['ldap']['port'],
+ 'tls' => false,
+ 'root' => $GLOBALS['conf']['kolab']['ldap']['basedn'],
+ 'sizelimit' => 200,
+ 'dn' => array('cn'),
+ 'objectclass' => array(
+ 'inetOrgPerson'
+ ),
+ 'scope' => 'one',
+ 'charset' => 'utf-8',
+ 'version' => 3,
+ 'bind_dn' => '',
+ 'bind_password' => '',
+ 'read_only' => true,
+ ),
+ 'map' => array(
+ '__key' => 'dn',
+ 'name' => 'cn',
+ 'firstname' => 'givenName',
+ 'lastname' => 'sn',
+ 'email' => 'mail',
+ 'alias' => 'alias',
+ 'title' => 'title',
+ 'company' => 'o',
+ 'workStreet' => 'street',
+ 'workCity' => 'l',
+ 'workProvince' => 'st',
+ 'workPostalCode' => 'postalCode',
+ 'workCountry' => 'c',
+ 'homePhone' => 'homePhone',
+ 'workPhone' => 'telephoneNumber',
+ 'cellPhone' => 'mobile',
+ 'fax' => 'fax',
+ 'notes' => 'description',
+ 'freebusyUrl' => 'kolabHomeServer',
+ ),
+ 'search' => array(
+ 'name',
+ 'firstname',
+ 'lastname',
+ 'email',
+ 'title',
+ 'company',
+ 'workAddress',
+ 'workCity',
+ 'workProvince',
+ 'workPostalCode',
+ 'workCountry',
+ 'homePhone',
+ 'workPhone',
+ 'cellPhone',
+ 'fax',
+ 'notes',
+ ),
+ 'strict' => array(
+ 'dn',
+ ),
+ 'export' => true,
+ 'browse' => true,
+ );
+ }
+
+ /**
+ * The local address books for a Kolab user. These are stored in specially
+ * flagged contact folder within the users Cyrus IMAP mailbox.
+ */
+
+ $cfgSources['kolab'] = array(
+ 'title' => _("Contacts"),
+ 'type' => 'kolab',
+ 'params' => array(
+ 'charset' => 'utf-8',
+ ),
+ 'map' => array(
+ '__key' => 'uid',
+ 'name' => 'full-name',
+ 'firstname' => 'given-name',
+ 'lastname' => 'last-name',
+ 'title' => 'job-title',
+ 'company' => 'organization',
+ 'notes' => 'body',
+ 'website' => 'web-page',
+ 'nickname' => 'nick-name',
+ 'emails' => 'emails',
+ 'homePhone' => 'phone-home1',
+ 'workPhone' => 'phone-business1',
+ 'cellPhone' => 'phone-mobile',
+ 'fax' => 'phone-businessfax',
+ 'workStreet' => 'addr-business-street',
+ 'workCity' => 'addr-business-locality',
+ 'workProvince' => 'addr-business-region',
+ 'workPostalCode' => 'addr-business-postal-code',
+ 'workCountry' => 'addr-business-country',
+ 'homeStreet' => 'addr-home-street',
+ 'homeCity' => 'addr-home-locality',
+ 'homeProvince' => 'addr-home-region',
+ 'homePostalCode' => 'addr-home-postal-code',
+ 'homeCountry' => 'addr-home-country',
+ ),
+ 'search' => array(
+ 'name',
+ 'firstname',
+ 'lastname',
+ 'emails',
+ 'title',
+ 'company',
+ 'notes',
+ 'homePhone',
+ 'workPhone',
+ 'cellPhone',
+ 'fax',
+ 'workStreet',
+ 'workCity',
+ 'workProvince',
+ 'workPostalCode',
+ 'workCountry',
+ 'homeStreet',
+ 'homeCity',
+ 'homeProvince',
+ 'homePostalCode',
+ 'homeCountry',
+ 'website',
+ 'nickname'
+ ),
+ 'strict' => array(
+ 'uid',
+ ),
+ 'export' => true,
+ 'browse' => true,
+ 'use_shares' => true,
+ 'shares_only' => true,
+ );
+}
+/* End Kolab sources. */
diff --git a/www-apps/horde-turba-kolab/horde-turba-kolab-2.2_alpha.ebuild b/www-apps/horde-turba-kolab/horde-turba-kolab-2.2_alpha.ebuild
new file mode 100644
index 0000000..3b8a4a9
--- /dev/null
+++ b/www-apps/horde-turba-kolab/horde-turba-kolab-2.2_alpha.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/horde-turba/horde-turba-2.1.ebuild,v 1.1 2006/03/09 23:37:24 vapier Exp $
+
+HORDE_PHP_FEATURES="-o mysql mysqli odbc postgres ldap"
+HORDE_MAJ="-h3"
+inherit horde-kolab-r4
+
+HORDE_KOLAB_CONFIG="
+conf.php_${PV}.config
+sources.php_${PV}.config
+"
+EHORDE_PATCHES="
+${FILESDIR}/HK-GW-Changes_after_ALPHA-${PV}.patch
+${FILESDIR}/HK-GW-Fix_address_book_deletion_1-${PV}.patch
+${FILESDIR}/HK-GW-Fix_editing_contacts-${PV}.patch
+${FILESDIR}/HK-GW-Fix_notice_on_addressbook_creation-${PV}.patch
+${FILESDIR}/HK-GW-Fix_share_id_change-${PV}.patch
+${FILESDIR}/HK-GW-Ldap_read_only_fix-${PV}.patch
+"
+
+DESCRIPTION="Turba is the Horde address book / contact management program"
+
+KEYWORDS="~x86 ~amd64"
+
+IUSE="kolab"
+
+DEPEND=""
+RDEPEND=">=www-apps/horde-kolab-3.2_alpha"
+
diff --git a/www-apps/horde-turba-kolab/metadata.xml b/www-apps/horde-turba-kolab/metadata.xml
new file mode 100644
index 0000000..fd3dbe3
--- /dev/null
+++ b/www-apps/horde-turba-kolab/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>