diff --git a/createlinks b/createlinks index 9cc1741..efeb189 100644 --- a/createlinks +++ b/createlinks @@ -2,6 +2,10 @@ use esmith::Build::CreateLinks qw(:all); -templates2events("/etc/sogosync/config.php", qw(webapps-update bootstrap-console-save email-update)); -safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/sogosync/config.php/template-begin"); -safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/etc/sogosync/config.php/template-end"); +templates2events("/usr/share/sogosync/config.php", qw(webapps-update bootstrap-console-save email-update)); +templates2events("/usr/share/sogosync/backend/searchldap/config.php", qw(webapps-update bootstrap-console-save email-update)); +safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/usr/share/sogosync/config.php/template-begin"); +safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/usr/share/sogosync/config.php/template-end"); +safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/template-begin"); +safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/template-end"); + diff --git a/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/10Server b/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/10Server new file mode 100644 index 0000000..b69afb9 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/10Server @@ -0,0 +1,4 @@ +define("LDAP_HOST", "ldap://127.0.0.1/"); +define("LDAP_PORT", "389"); +define("ANONYMOUS_BIND", true); + diff --git a/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/20base b/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/20base new file mode 100644 index 0000000..4243584 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/20base @@ -0,0 +1,13 @@ +{ +use esmith::util; +my $c = esmith::ConfigDB->open_ro; +my $domain = $c->get('DomainName')->value; +my $basedn = esmith::util::ldapBase($domain); + +$OUT .=<<"EOF"; + +define("LDAP_SEARCH_BASE", "ou=Users,$basedn"); +define("LDAP_SEARCH_FILTER", "(|(cn=*SEARCHVALUE*)(mail=*SEARCHVALUE*))"); + +EOF +} diff --git a/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/30Map b/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/30Map new file mode 100644 index 0000000..a2fd3c3 --- /dev/null +++ b/root/etc/e-smith/templates/usr/share/sogosync/backend/searchldap/config.php/30Map @@ -0,0 +1,14 @@ +global $ldap_field_map; +$ldap_field_map = array( + SYNC_GAL_DISPLAYNAME => 'cn', + SYNC_GAL_PHONE => 'telephonenumber', + SYNC_GAL_OFFICE => 'l', + SYNC_GAL_TITLE => 'title', + SYNC_GAL_COMPANY => 'o', + SYNC_GAL_ALIAS => 'uid', + SYNC_GAL_FIRSTNAME => 'givenname', + SYNC_GAL_LASTNAME => 'sn', + SYNC_GAL_HOMEPHONE => 'extensionnumber', + SYNC_GAL_MOBILEPHONE => 'mobile', + SYNC_GAL_EMAILADDRESS => 'mail', + ); diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/10TimeZone b/root/etc/e-smith/templates/usr/share/sogosync/config.php/10TimeZone similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/10TimeZone rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/10TimeZone diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/20BasePath b/root/etc/e-smith/templates/usr/share/sogosync/config.php/20BasePath similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/20BasePath rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/20BasePath diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/30Options b/root/etc/e-smith/templates/usr/share/sogosync/config.php/30Options similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/30Options rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/30Options diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/40Backend b/root/etc/e-smith/templates/usr/share/sogosync/config.php/40Backend similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/40Backend rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/40Backend diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/45Backend10Mapi b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend10Mapi similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/45Backend10Mapi rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend10Mapi diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/45Backend20Imap b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend20Imap similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/45Backend20Imap rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend20Imap diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/45Backend30Maildir b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend30Maildir similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/45Backend30Maildir rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend30Maildir diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/45Backend40Vcard b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend40Vcard similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/45Backend40Vcard rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend40Vcard diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/45Backend50SearchProvider b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend50SearchProvider similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/45Backend50SearchProvider rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend50SearchProvider diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/45Backend60Caldav b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend60Caldav similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/45Backend60Caldav rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend60Caldav diff --git a/root/etc/e-smith/templates/etc/sogosync/config.php/45Backend70Carddav b/root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend70Carddav similarity index 100% rename from root/etc/e-smith/templates/etc/sogosync/config.php/45Backend70Carddav rename to root/etc/e-smith/templates/usr/share/sogosync/config.php/45Backend70Carddav diff --git a/smeserver-sogosync.spec b/smeserver-sogosync.spec index 2cdd059..5ae51f4 100644 --- a/smeserver-sogosync.spec +++ b/smeserver-sogosync.spec @@ -1,6 +1,6 @@ Name: smeserver-sogosync Version: 0.0.1 -Release: 0.beta1%{?dist} +Release: 0.beta2%{?dist} Summary: SME Server integration for sogosync Group: Application/System