| | 1 | |
| | 2 | = How to configure the opensync-plugin-ldap for synchronizing contacts between evolution-2.x and an LDAP server = |
| | 3 | |
| | 4 | |
| | 5 | The very first configuration step: Choose a name for a particular |
| | 6 | synchronization group: |
| | 7 | |
| | 8 | {{{ |
| | 9 | osynctool --addgroup "sync_ldap_with_evolution" |
| | 10 | }}} |
| | 11 | |
| | 12 | Which plugins could we use for this synchronization group? |
| | 13 | |
| | 14 | {{{ |
| | 15 | osynctool --listplugins |
| | 16 | |
| | 17 | Available plugins: |
| | 18 | ldap-sync |
| | 19 | syncml-http-server |
| | 20 | syncml-http-client |
| | 21 | syncml-obex-client |
| | 22 | file-sync |
| | 23 | evo2-sync |
| | 24 | }}} |
| | 25 | |
| | 26 | Here we choose the “evo2-sync” and the “ldap-sync” plugin: |
| | 27 | |
| | 28 | {{{ |
| | 29 | osynctool --addmember "sync_ldap_with_evolution" evo2-sync |
| | 30 | osynctool --addmember "sync_ldap_with_evolution" ldap-sync |
| | 31 | }}} |
| | 32 | |
| | 33 | Which formats are available for configuring each plugin? |
| | 34 | |
| | 35 | {{{ |
| | 36 | osynctool --listformats |
| | 37 | |
| | 38 | (...) |
| | 39 | Format: ldap-evolutionperson |
| | 40 | Object Type: contact |
| | 41 | Format: ldap-inetorgperson |
| | 42 | Object Type: contact |
| | 43 | Format: ldap-event |
| | 44 | Object Type: event |
| | 45 | Format: ldap-todo |
| | 46 | Object Type: todo |
| | 47 | Format: ldap-note |
| | 48 | Object Type: note |
| | 49 | (...) |
| | 50 | }}} |
| | 51 | |
| | 52 | Configure the evo2-sync plugin: For the time being |
| | 53 | we enable just the object type "contact": |
| | 54 | |
| | 55 | {{{ |
| | 56 | osynctool --configure "sync_ldap_with_evolution" 1 |
| | 57 | |
| | 58 | <?xml version="1.0"?> |
| | 59 | <config version="1.0"> |
| | 60 | <Resources> |
| | 61 | <Resource> |
| | 62 | <Enabled>1</Enabled> |
| | 63 | <Formats> |
| | 64 | <Format> |
| | 65 | <Config>VCARD_EXTENSION=Evolution</Config> |
| | 66 | <Name>vcard21</Name> |
| | 67 | </Format> |
| | 68 | <Format> |
| | 69 | <Config>VCARD_EXTENSION=Evolution</Config> |
| | 70 | <Name>vcard30</Name> |
| | 71 | </Format> |
| | 72 | </Formats> |
| | 73 | <ObjType>contact</ObjType> |
| | 74 | <Url>default</Url> |
| | 75 | </Resource> |
| | 76 | <Resource> |
| | 77 | <Enabled>0</Enabled> |
| | 78 | <Formats> |
| | 79 | <Format> |
| | 80 | <Name>vevent20</Name> |
| | 81 | </Format> |
| | 82 | </Formats> |
| | 83 | <ObjType>event</ObjType> |
| | 84 | <Url>default</Url> |
| | 85 | </Resource> |
| | 86 | <Resource> |
| | 87 | <Enabled>0</Enabled> |
| | 88 | <Formats> |
| | 89 | <Format> |
| | 90 | <Name>vtodo20</Name> |
| | 91 | </Format> |
| | 92 | </Formats> |
| | 93 | <ObjType>todo</ObjType> |
| | 94 | <Url>default</Url> |
| | 95 | </Resource> |
| | 96 | <Resource> |
| | 97 | <Enabled>0</Enabled> |
| | 98 | <Formats> |
| | 99 | <Format> |
| | 100 | <Name>vjournal</Name> |
| | 101 | </Format> |
| | 102 | </Formats> |
| | 103 | <ObjType>note</ObjType> |
| | 104 | <Url>default</Url> |
| | 105 | </Resource> |
| | 106 | </Resources> |
| | 107 | </config> |
| | 108 | |
| | 109 | }}} |
| | 110 | |
| | 111 | Configure the “ldap-sync” plugin: The following configuration |
| | 112 | lets only the objtype “contact” be enabled. It chooses |
| | 113 | SASL/DIGEST-MD5 as authentication mechanism with the authcid |
| | 114 | being “ldap_user” and the password “secret”. It connects to a |
| | 115 | host “host.example.com” on port 389 with the protocol “ldap”. |
| | 116 | |
| | 117 | {{{ |
| | 118 | osynctool --configure "sync_ldap_with_evolution" 2 |
| | 119 | |
| | 120 | <?xml version="1.0"?> |
| | 121 | <config version="1.0"> |
| | 122 | <AdvancedOptions> |
| | 123 | <AdvancedOption> |
| | 124 | <MaxOccurs>2147483647</MaxOccurs> |
| | 125 | <Max>2147483647</Max> |
| | 126 | <Name>binddn</Name> |
| | 127 | <Type>string</Type> |
| | 128 | <Value>cn=ldap_user,ou=people,dc=example,dc=com</Value> |
| | 129 | </AdvancedOption> |
| | 130 | <AdvancedOption> |
| | 131 | <MaxOccurs>2147483647</MaxOccurs> |
| | 132 | <Max>2147483647</Max> |
| | 133 | <Name>authcid</Name> |
| | 134 | <Type>string</Type> |
| | 135 | <Value>ldap_user</Value> |
| | 136 | </AdvancedOption> |
| | 137 | <AdvancedOption> |
| | 138 | <MaxOccurs>2147483647</MaxOccurs> |
| | 139 | <Max>2147483647</Max> |
| | 140 | <Name>password</Name> |
| | 141 | <Type>string</Type> |
| | 142 | <Value>secret</Value> |
| | 143 | </AdvancedOption> |
| | 144 | <AdvancedOption> |
| | 145 | <MaxOccurs>2147483647</MaxOccurs> |
| | 146 | <Max>2147483647</Max> |
| | 147 | <Name>anonymous</Name> |
| | 148 | <Type>string</Type> |
| | 149 | <Value>0</Value> |
| | 150 | </AdvancedOption> |
| | 151 | <AdvancedOption> |
| | 152 | <MaxOccurs>2147483647</MaxOccurs> |
| | 153 | <Max>2147483647</Max> |
| | 154 | <Name>authmech</Name> |
| | 155 | <Type>string</Type> |
| | 156 | <Value>DIGEST-MD5</Value> |
| | 157 | </AdvancedOption> |
| | 158 | <AdvancedOption> |
| | 159 | <MaxOccurs>2147483647</MaxOccurs> |
| | 160 | <Max>2147483647</Max> |
| | 161 | <Name>encryption</Name> |
| | 162 | <Type>string</Type> |
| | 163 | <Value>0</Value> |
| | 164 | </AdvancedOption> |
| | 165 | <AdvancedOption> |
| | 166 | <MaxOccurs>2147483647</MaxOccurs> |
| | 167 | <Max>2147483647</Max> |
| | 168 | <Name>ldap_read</Name> |
| | 169 | <Type>string</Type> |
| | 170 | <Value>1</Value> |
| | 171 | </AdvancedOption> |
| | 172 | <AdvancedOption> |
| | 173 | <MaxOccurs>2147483647</MaxOccurs> |
| | 174 | <Max>2147483647</Max> |
| | 175 | <Name>ldap_write</Name> |
| | 176 | <Type>string</Type> |
| | 177 | <Value>1</Value> |
| | 178 | </AdvancedOption> |
| | 179 | <AdvancedOption> |
| | 180 | <MaxOccurs>2147483647</MaxOccurs> |
| | 181 | <Max>2147483647</Max> |
| | 182 | <Name>searchbase_contact</Name> |
| | 183 | <Type>string</Type> |
| | 184 | <Value>ou=addressbook,dc=example,dc=com</Value> |
| | 185 | </AdvancedOption> |
| | 186 | <AdvancedOption> |
| | 187 | <MaxOccurs>2147483647</MaxOccurs> |
| | 188 | <Max>2147483647</Max> |
| | 189 | <Name>searchfilter_contact</Name> |
| | 190 | <Type>string</Type> |
| | 191 | <Value></Value> |
| | 192 | </AdvancedOption> |
| | 193 | <AdvancedOption> |
| | 194 | <MaxOccurs>2147483647</MaxOccurs> |
| | 195 | <Max>2147483647</Max> |
| | 196 | <Name>storebase_contact</Name> |
| | 197 | <Type>string</Type> |
| | 198 | <Value></Value> |
| | 199 | </AdvancedOption> |
| | 200 | <AdvancedOption> |
| | 201 | <MaxOccurs>2147483647</MaxOccurs> |
| | 202 | <Max>2147483647</Max> |
| | 203 | <Name>searchbase_event</Name> |
| | 204 | <Type>string</Type> |
| | 205 | <Value>ou=calendar,dc=example,dc=com</Value> |
| | 206 | </AdvancedOption> |
| | 207 | <AdvancedOption> |
| | 208 | <MaxOccurs>2147483647</MaxOccurs> |
| | 209 | <Max>2147483647</Max> |
| | 210 | <Name>searchfilter_event</Name> |
| | 211 | <Type>string</Type> |
| | 212 | <Value></Value> |
| | 213 | </AdvancedOption> |
| | 214 | <AdvancedOption> |
| | 215 | <MaxOccurs>2147483647</MaxOccurs> |
| | 216 | <Max>2147483647</Max> |
| | 217 | <Name>storebase_event</Name> |
| | 218 | <Type>string</Type> |
| | 219 | <Value></Value> |
| | 220 | </AdvancedOption> |
| | 221 | <AdvancedOption> |
| | 222 | <MaxOccurs>2147483647</MaxOccurs> |
| | 223 | <Max>2147483647</Max> |
| | 224 | <Name>searchbase_todo</Name> |
| | 225 | <Type>string</Type> |
| | 226 | <Value>ou=todo,dc=example,dc=com</Value> |
| | 227 | </AdvancedOption> |
| | 228 | <AdvancedOption> |
| | 229 | <MaxOccurs>2147483647</MaxOccurs> |
| | 230 | <Max>2147483647</Max> |
| | 231 | <Name>searchfilter_todo</Name> |
| | 232 | <Type>string</Type> |
| | 233 | <Value></Value> |
| | 234 | </AdvancedOption> |
| | 235 | <AdvancedOption> |
| | 236 | <MaxOccurs>2147483647</MaxOccurs> |
| | 237 | <Max>2147483647</Max> |
| | 238 | <Name>storebase_todo</Name> |
| | 239 | <Type>string</Type> |
| | 240 | <Value></Value> |
| | 241 | </AdvancedOption> |
| | 242 | <AdvancedOption> |
| | 243 | <MaxOccurs>2147483647</MaxOccurs> |
| | 244 | <Max>2147483647</Max> |
| | 245 | <Name>searchbase_note</Name> |
| | 246 | <Type>string</Type> |
| | 247 | <Value>o=notes,dc=example,dc=com</Value> |
| | 248 | </AdvancedOption> |
| | 249 | <AdvancedOption> |
| | 250 | <MaxOccurs>2147483647</MaxOccurs> |
| | 251 | <Max>2147483647</Max> |
| | 252 | <Name>searchfilter_note</Name> |
| | 253 | <Type>string</Type> |
| | 254 | <Value></Value> |
| | 255 | </AdvancedOption> |
| | 256 | <AdvancedOption> |
| | 257 | <MaxOccurs>2147483647</MaxOccurs> |
| | 258 | <Max>2147483647</Max> |
| | 259 | <Name>storebase_note</Name> |
| | 260 | <Type>string</Type> |
| | 261 | <Value></Value> |
| | 262 | </AdvancedOption> |
| | 263 | </AdvancedOptions> |
| | 264 | <Connection> |
| | 265 | <ActiveConnection>Network</ActiveConnection> |
| | 266 | <Network> |
| | 267 | <Address>host.example.com</Address> |
| | 268 | <Port>389</Port> |
| | 269 | <Protocol>ldap</Protocol> |
| | 270 | </Network> |
| | 271 | </Connection> |
| | 272 | <Resources> |
| | 273 | <Resource> |
| | 274 | <Enabled>1</Enabled> |
| | 275 | <Formats> |
| | 276 | <Format> |
| | 277 | <Name>ldap-inetorgperson</Name> |
| | 278 | </Format> |
| | 279 | </Formats> |
| | 280 | <ObjType>contact</ObjType> |
| | 281 | </Resource> |
| | 282 | <Resource> |
| | 283 | <Enabled>1</Enabled> |
| | 284 | <Formats> |
| | 285 | <Format> |
| | 286 | <Name>ldap-event</Name> |
| | 287 | </Format> |
| | 288 | </Formats> |
| | 289 | <ObjType>event</ObjType> |
| | 290 | </Resource> |
| | 291 | <Resource> |
| | 292 | <Enabled>1</Enabled> |
| | 293 | <Formats> |
| | 294 | <Format> |
| | 295 | <Name>ldap-todo</Name> |
| | 296 | </Format> |
| | 297 | </Formats> |
| | 298 | <ObjType>todo</ObjType> |
| | 299 | </Resource> |
| | 300 | <Resource> |
| | 301 | <Enabled>1</Enabled> |
| | 302 | <Formats> |
| | 303 | <Format> |
| | 304 | <Name>ldap-note</Name> |
| | 305 | </Format> |
| | 306 | </Formats> |
| | 307 | <ObjType>note</ObjType> |
| | 308 | </Resource> |
| | 309 | </Resources> |
| | 310 | </config> |
| | 311 | |
| | 312 | |
| | 313 | }}} |
| | 314 | |
| | 315 | Make the configuration become effective: |
| | 316 | |
| | 317 | {{{ |
| | 318 | osynctool --discover "sync_ldap_with_evolution" 1 |
| | 319 | osynctool --discover "sync_ldap_with_evolution" 2 |
| | 320 | osynctool --discover "sync_ldap_with_evolution" |
| | 321 | |
| | 322 | (...) |
| | 323 | }}} |
| | 324 | |
| | 325 | Quickly check the “members”: |
| | 326 | |
| | 327 | {{{ |
| | 328 | osynctool --showgroup "sync_ldap_with_evolution" |
| | 329 | |
| | 330 | Group: sync_ldap_with_evolution |
| | 331 | Member 2: ldap-sync |
| | 332 | Member 1: evo2-sync |
| | 333 | }}} |
| | 334 | |
| | 335 | |
| | 336 | And the object types available: |
| | 337 | |
| | 338 | {{{ |
| | 339 | osynctool --showobjtypes "sync_ldap_with_evolution" |
| | 340 | |
| | 341 | Member 1 Objtypes: |
| | 342 | Objtype contact: Enabled |
| | 343 | conversion config: VCARD_EXTENSION=Evolution |
| | 344 | conversion config: VCARD_EXTENSION=Evolution |
| | 345 | Member 2 Objtypes: |
| | 346 | Objtype contact: Enabled |
| | 347 | conversion config: |
| | 348 | Objtypes for the group: |
| | 349 | contact: Enabled |
| | 350 | |
| | 351 | }}} |
| | 352 | |