Samstag, 23. April 2016

Raspbian repository started

Hi,

after a long period of testing my script and trying to get the Winterfell and Development version up and running it was time to get back to 3.4.

My repo contains my compiled packages and for the impatient ones:

  1. Add the key to your keyring:
    wget -O - https://www.zion-control.org/raspbian/kolab_repo%40zion-control.org |apt-key add -
  2. Add the following line to your sources.list:
    deb http://www.zion-control.org/raspbian/ jessie main
  3. Run update
    apt-get update
  4. Install kolab
    apt-get install kolab
The cyrus package contains a fix for the bug on armhf so it is working. See the following Git-Commit for further informations : https://github.com/cyrusimap/cyrus-imapd/commit/f507861e48b6c50e6394d9a0880aefe34b820dc0

For the Roundcube/iRony/chwala I did a small correction concerning error management and the Sabre libraries.
First of all the error handling:
find /usr/share/roundcubemail/ -name '*php' -exec sed -i 's/PEAR::isError/(new PEAR)->isError/g' {} \;
Repeat this for /usr/share/iRony and /usr/share/chwala.

There is also a manual ToDo right now after installing the packages for the Sabre-Object. So download the Sabre libraries manually from http://sabre.io and reference them in the PHP file /usr/share/iRony/public_html/index.php. Add the following line at the beginning:
require_once("/usr/share/php/SabreDAV/vendor/autoload.php");
Chwala did not install the MySQL database correctly so create them with the SQL script mysql.initial.sql found in the doc directory from the source package.

The new setup is running well on my Pi2 with nginx and SSL with a certificate from letsencrypt :-) following this instructions: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04

I'm a bit new to create correct debian packages with changelog, new version numbers and so on. But I will do my best so that you can get "right out of the box" packages for using Kolab on RaspberryPi incl. Nginx

Greetz.

Sonntag, 7. Februar 2016

Plan for a clean and fresh install on Debian Jessie

I'm currently planning to migrate (again) to a +Raspberry Pi 2 because my +Cubietruck Cubieboard3 is a bit nasty concerning port forwarding. It doesn't show up in my Fritz!Box so I cannot redirect the ports in a convenient way.

Again I updated my script for getting +Kolab and it should handle all the dependencies in the right way so that you will be able to install it via "apt-get" or "aptitude".

So feel free to get it from my site and test it.

And I will switch from Apache to NginX as a Webserver and IMAP-Proxy as well.

So come back again for updates

Greetz

Dienstag, 2. Februar 2016

Update to Kolab 16

After a long time using +Kolab.org Community and some amazing news around this groupware I decided to go on with Kolab 16.

Currently there are not so many packages for my Debian Jessie release available.
So I decided to compile them again out of the development directory from http://obs.kolabsys.com:82/Kolab:/Development/Debian_7.0/

A few days ago I thought it went well but my Active-Sync was some sort of working. Contacts and Calendar is syncing quite well but no mails. 

I digged into the logfiles in the directory /usr/share/kolab-syncroton/logs and found two errors:
Call to protected method rcube_imap_generic::strToTime() from context 'kolab_sync_data_email' in /usr/share/kolab-syncroton/lib/kolab_sync_data_email.php on line 140
and
 Maximum execution time of 30 seconds exceeded in /usr/share/roundcubemail/program/lib/Roundcube/rcube_imap_generic.php on line 3481

The first one is a known bug and I found it belongs to the new version of +Roundcube 1.2. Following https://git.kolab.org/rSe4d229229fa3de87f0d9c98156632adf8a87fb2d I also changed the line 140 and after that it was working like a charme again.

 The second one can be avoided in modifying the entry max_execution_time in /etc/php5/apache2/php.ini.

So up to now I have the following packages running concerning Kolab:

root@cubietruck:~# dpkg -l | grep -E "(kolab|roundcube|imap)"
ii  chwala                              0.4~dev20160122-0~kolab1    
ii  cyrus-imapd                         2.4.16-4+deb7u2            
ii  cyrus-imapd-2.4                     2.4.16-4+deb7u2            
ii  imapcopy                            1.04-1                      
ii  imapfilter                          1:2.5.2-2                  
ii  irony                               0.4.0-0~kolab1              
ii  kolab                               16.0.0-3                    
ii  kolab-cli                           0.7.14-0~kolab1            
ii  kolab-conf                          0.7.14-0~kolab1            
ii  kolab-freebusy                      1.1.0-0~kolab1              
ii  kolab-imap                          16.0.0-3                    
ii  kolab-ldap                          16.0.0-3                    
ii  kolab-mta                           16.0.0-3                    
ii  kolab-saslauthd                     0.7.14-0~kolab1            
ii  kolab-schema                        3.3-0~kolab1                
ii  kolab-server                        0.7.14-0~kolab1            
ii  kolab-syncroton                     2.3.2-0~kolab1              
ii  kolab-telemetry                     0.7.14-0~kolab1            
ii  kolab-ucs                           16.0.0-3                    
ii  kolab-utils                         3.1~dev20140624-0~kolab1    
ii  kolab-webadmin                      3.2.11~dev20151020-0~kolab1
ii  kolab-webclient                     16.0.0-3                    
ii  kolab-xml                           0.7.14-0~kolab1            
ii  kolabadmin                          0.0.20080222-4              
ii  libcyrus-imap-perl24                2.4.16-4+deb7u2            
ii  libjs-less                          1.7.5-0~kolab2              
ii  libkolab-dev                        2.0~dev20151230-0~kolab1    
ii  libkolab0                           2.0~dev20151230-0~kolab1    
ii  libkolabxml-dev                     1.1.git.1422810799          
ii  libkolabxml1                        1.1.git.1422810799          
ii  libxapian22                         1.2.16-0~kolab1            
ii  node-less                           1.7.5-0~kolab2              
ii  nodejs                              0.12.8-0~kolab1            
ii  php-kolab                           2.0~dev20151230-0~kolab1    
ii  php-kolabformat                     1.1.git.1422810799          
ii  php-net-ldap3                       1.0.4-0~kolab1              
ii  pykolab                             0.7.14-0~kolab1            
ii  python-kolab                        2.0~dev20151230-0~kolab1    
ii  python-kolabformat                  1.1.git.1422810799          
ii  roundcubemail                       1:1.2~dev20160119-0~kolab1  
ii  roundcubemail-plugin-contextmenu    2.1.1-0~kolab1              
ii  roundcubemail-plugin-converse       0.1~dev20140214-0~kolab1    
ii  roundcubemail-plugin-dblog          2.0                        
ii  roundcubemail-plugins-kolab         1:3.2.8-0~kolab1            
ii  roundcubemail-skin-chameleon        0.3.7-0~kolab1              
ii  swig                                2.0.11-0~kolab1            
ii  swig2.0                             2.0.11-0~kolab1            
ii  wallace                             0.7.14-0~kolab1               
To compile all the packages I created a little script in the past. It is working if you have a running kolab installation with all dependencies.

  1. Create a working directory and change into it:
    mkdir /mnt/kolab
    cd /mnt/kolab
  2. Put the script get_kolab.sh in this directory and make it executable.
  3. Create some directories
    mkdir kolab_Development_src
    mkdir kolab_Development_deb
    mkdir compile_log
  4. Change into the src directory and start the script get_kolab.sh with a parameter because it is the first time you start it
    cd kolab_Development_src
    ../get_kolab.sh first
  5. It is necessary to run the script three times because it stops after some packages and I didn't solve this up to now because the workaround (restart) is so easy :-)
    It will continue after the last package
  6. To install all the packages please add the following line top you /etc/apt/sources.list
  7. deb file:/mnt/kolab/kolab_Development_deb ./
So enjoy the update like I do.

Greetz

Freitag, 13. März 2015

How-To - Kolab with Seafile

Hello,

Seafile is an open source cloud software which is free for private use.

There is also a professional edition which is not necessary for my needs. I just want to sync files across more than one device. In the past I used ownCloud which was pretty good for my needs.

First I decided to have ownCloud integrated in Kolab as a backend but I had a bit lack of time so developing a new driver for chwala was not so easy.

After a while I noticed that Seafile is integrated in chwala 0.3.0 and with Kolab 3.4 it is quite stable to install.

Last week I managed all the stuff and here is my Step-By-Step Guide:


  1. Install Kolab 3.4 and test it
    It's obvious that you need Kolab for this. Please refer to the kolab.org web page for an installation guide for your distro
  2. Install seafile and test it.
    The homepage of seafile will guide you through all the stuff you need for that. So just download, extract and run it.
  3. Connect Seafile to Kolab-LDAP
    Following Seafile->Using LDAP is exactly what I did. My installation was spreaded over /opt/seafile, /opt/seafile/seafile-server-latest and /mnt/seafile
    But you'll find your ccnet.conf and add the LDAP part to it (please change the values according to your installation):
    [LDAP]
    HOST = ldap://127.0.0.1
    BASE = ou=People,dc=example,dc=com
    USER_DN = cn=directory manager
    PASSWORD = youdon'tknowjack
    LOGIN_ATTR = mail
  4. Now test seafile again if you can now login with your kolab main mailaddress.
    Please keep in mind that each user has to login for the first time to seafile in order to get the right folders.
  5. If everything is ok, now you have to use Apache as a proxy for Seafile
    Following Seafile -> Deploy with Apache was ok for me for the first time.
    Well, this will break your Kolab if you follow the steps directly.
  6. If this is ok as well, now fine tune a bit the Apache configuration for Seafile.
    These lines should be changed in your apache.conf (or vhost):
    #
    # seahub
    #
    RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ /seahub.fcgi$1 [QSA,L,E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    This will redirect all request to Seafile, but if you only have one SSL certificate and one domain you have to ignore this for all the Kolab modules.
    So please add the following RewriteCond to the config:

    RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !^/roundcubemail.*
    RewriteCond %{REQUEST_URI} !^/Microsoft.*
    RewriteCond %{REQUEST_URI} !^/iRony.*
    RewriteCond %{REQUEST_URI} !^/chwala.*
    RewriteCond %{REQUEST_URI} !^/kolab.*
    RewriteRule ^(.*)$ /seahub.fcgi$1 [QSA,L,E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    The first RwriteCond tells Apache to rewrite the URL if the file does not exist. For the Kolab installation there are some URL more not to check against an existing file because they are an Alias in the Apache way. So we ignore this rewrite when the URL starts with "roundcube", "Microsoft" (for active sync) and so on.
    Reading the conf above should be:

    Rewrite all URL starting with /media
    ReWrite the URL when the requested file does not exist (! -f)
    AND (is implicitly) the request does not start with roundcube (!/^/roundcubemail.*)
    AND the request does not start with Microsoft
    AND the request does not start with iRony
    AND the erquest does not start with chwala
    AND the request does not start with kolab
    TO /seahub.fcgi PLUS the request string including the trailing slash (^(.*)$ /seahub.fcgi$1)
  7. Now test your Kolab and Seafile again, everything should now work on the same server.
  8. It's time to combine Chwala with Seafile. The most interesting part. :-)
    Please edit your /etc/roundcubemail/config.inc.php file and all the Seafile stuff:

    // seafile
    $config['fileapi_backend'] = 'seafile';
    $config['fileapi_seafile_host'] = 'www.example.com';
    $config['fileapi_seafile_ssl_verify_peer'] = false;
    $config['fileapi_seafile_ssl_verify_host'] = false;
    $config['fileapi_seafile_cache_ttl'] = '14d';
    $config['fileapi_seafile_debug'] = true;
  9. That's it.

Now you can use your Seafile server in Kolab as a file storage. But keep in mind, password protected folders are not accessible through chwala this way.

Feel free to leave any comments and
Greetz

Mittwoch, 4. März 2015

Kolab 3.4 released - New Skin - Chwala driver for Seafile

Hello @all,


+Kolab.org Community released Version 3.4 and it was time to get the new updates up and running.

This time there is a new driver for "chwala" integrated for +Seafile.VN so I gave it a try and tried to mix it all together.

After lots pf solving dependencies and so on I managed to get the new version up and running with Seafile attached.

That's quite amazing, for this you have to configure Seafile through Apache and connect to the LDAP.

When you were able to manage all these things, you can easily save attachments in your cloud and syncing them to your smartphone. :-)

There are still some issues on my Cubietruck which I have to solve but my Idea is to rebuild all the stuff from scratch in a chroot environment and track down all steps to get it working.

Two Screenshots showing the new skin for +Roundcube and the integration of Seafile into Chwala.

That's the new Chameleon skin for Roundcube

The same folders in seafile and chwala except the password protected one.

So the next couple of days I'm trying to set up a new build environment for the ARM-HF packages for Kolab and a Step-By-Step description.

Greetz

Montag, 26. Januar 2015

Migration to "Cubietruck" finished

Hi,

due to a new job since the beginning of the year and moving to a new country I was a bit stressed. In addition to this, my provider changed from IPv4 to IPv6 at a DSLite line.

So my port forwarding is no longer working and I had to organize all the stuff to get access to my mails again :-). Well, that's a disadvantage of my solution but I hope this will be solved somehow.

So my script to install Kolab on my truck:


export RELEASE=3.3
export RELEASEDIR=kolab_3.3_src
mkdir -p /mnt/kolab/$RELEASEDIR
mkdir -p /mnt/kolab/kolab_${RELEASE}_deb
echo "deb-src http://obs.kolabsys.com:82/Kolab:/$RELEASE/Debian_7.0/ ./" > /etc/apt/sources.list.d/kolab.list
echo "deb-src http://obs.kolabsys.com:82/Kolab:/$RELEASE:/Updates/Debian_7.0/ ./" >> /etc/apt/sources.list.d/kolab.list
#echo "deb http://kolab-deb.zion-control.org /" >> /etc/apt/sources.list.d/kolab.list
echo "Package: *" >  /etc/apt/preferences.d/kolab
echo "Pin: origin obs.kolabsys.com" >>  /etc/apt/preferences.d/kolab
echo "Pin-Priority: 501" >>  /etc/apt/preferences.d/kolab
wget -qO - http://obs.kolabsys.com:82/Kolab:/$RELEASE/Debian_7.0/Release.key | apt-key add -
wget -qO - http://obs.kolabsys.com:82/Kolab:/$RELEASE:/Updates/Debian_7.0/Release.key | apt-key add -
aptitude update
cd /mnt/kolab/$RELEASEDIR
echo Get debian sources

wget http://obs.kolabsys.com:82/Kolab:/$RELEASE/Debian_7.0/Packages -O packages.txt
wget http://obs.kolabsys.com:82/Kolab:/$RELEASE:/Updates/Debian_7.0/Packages -O packages_updates.txt
apt-get -ym source `grep Package packages.txt | awk '{print $2}' | grep -v "kolab-ucs" | sort -u`
apt-get -ym source `grep Package packages_updates.txt | awk '{print $2}' | grep -v "kolab-ucs" | sort -u`
apt-get -y build-dep `grep Package packages.txt | awk '{print $2}' | grep -v kolab-ucs | sort -u`
dpkg -i 389-ds-base-libs_1.2.11.29-0_armhf.deb
dpkg -i 389-ds-base-dev_1.2.11.29-0_armhf.deb
cd python-icalendar-3.4/
debuild -us -uc -b
cd ..
apt-get install python-dateutil python-tz
dpkg -i python-icalendar_3.4-1_all.deb
cd libcalendaring_4.9.0
debuild -us -uc -b
cd ..
dpkg -i libcalendaring_4.9.0-3_armhf.deb
dpkg -i libcalendaring-dev_4.9.0-3_armhf.deb
apt-get install libboost-program-options-dev
cd libkolabxml-1.1~dev20140624/
debuild -us -uc -b
cd ..
dpkg -i libkolabxml1_1.1~dev20140624-0~kolab1_armhf.deb
dpkg -i libkolabxml-dev_1.1~dev20140624-0~kolab1_armhf.deb
cd libkolab-0.6~dev20140624/
debuild -us -uc -b
cd ..
dpkg -i libkolab0_0.6~dev20140624-0~kolab1_armhf.deb
dpkg -i libkolab-dev_0.6~dev20140624-0~kolab1_armhf.deb
apt-get -y build-dep `grep Package packages.txt | awk '{print $2}' | grep -v kolab-ucs | sort -u`
apt-get -y build-dep `grep Package packages_updates.txt | awk '{print $2}' | grep -v kolab-ucs | sort -u`
ls -ld * | grep '^d' | awk '{print $9}' | while read verz
do
        cd $verz
        debuild -us -uc -b
        cd ..
done

cp *deb ../kolab_${RELEASE}_deb/
cd ../kolab_${RELEASE}_deb
dpkg-scanpackages -m .  | gzip -c9 > Packages.gz

After a while it was installed and I had to move all mails to my truck. I decided to reorganize all the mails according to the recipient in a separate folder (because of my C@tch@ll). I used "imapfilter" for that and for this I wrote a little LUA script:

function processMailbox(raspberryPi,cubietruck, mb,subfolders)
        -- Status
        total, recent,unseen,nextid = raspberryPi[mb]:check_status()
        -- Alle Nachrichten auswaehlen
        results = raspberryPi[mb]:select_all()
        number = 1
        for _, message in ipairs(results) do
                print ("")
                mailbox, uid = table.unpack(message)
                header = mailbox[uid]:fetch_header()
                recipient = string.gsub(header, ".*for <([A-Za-z0-9-]+@example.com)>.*","%1")
                if (recipient:find(":")) then
                        headerTo = mailbox[uid]:fetch_field('To')
                        if (headerTo == nil) then
                                recipient = "invalid_to@example.com"
                        else
                                headerTo = headerTo:gsub("\r","")
                                headerTo = headerTo:gsub("\n","")
                                headerTo = headerTo:gsub(" ","")
                                headerTo = headerTo:gsub("To: ","")
                                if (headerTo == "") then
                                        recipient = "invalid_to@example.com"
                                else
                                        recipient = headerTo:gsub("To: ","")
                                end
                        end
                end
                if (recipient:find("<")) then
                        recipient = recipient:gsub(".*<(.*)>","%1")
                end
                toFolder = string.gsub(recipient,"(.-)(@.*)","%1")
                messageId = mailbox[uid]:fetch_field("Message-id")
                messageId = string.gsub(messageId,".-<(.-)>","%1")
                subject   = mailbox[uid]:fetch_field('Subject')
                subject   = subject:gsub("\r"," ")
                subject   = subject:gsub("\n"," ")
                print('Processing : <' .. mb .. '>')
                print('Subject    : <' .. subject .. '>')
                print('Recipient  : <' .. recipient .. '>')
                print('Folder     : <' .. toFolder .. '>')
                print('ID         : <' .. messageId .. '>')
                prozent = number / total * 100
                print('Number     : <' .. number .. '/' .. total .. '> in ' .. mb .. ' (' .. prozent .. ' %)')
                cubietruck:create_mailbox('Archive/' .. toFolder)
                toMove = raspberryPi[mb]:contain_field("Message-id",messageId)
                for _, messageM in ipairs(toMove) do
                        tmMB,tmUID = table.unpack(message)
                end
                toMove:copy_messages(cubietruck['Archive/' .. toFolder])
                number = number + 1
        end
        -- process all subfolder
        if (subfolders) then
                rPi_Mailboxes, rPi_Folders = raspberryPi:list_all(mb)
                for _, mbSub in ipairs(rPi_Mailboxes) do
                        processMailbox(raspberryPi,cubietruck,mbSub,true)
                end
        end
end
---------------
--  Options  --
---------------
options.timeout = 120
options.subscribe = true
options.create = true
----------------
--  Accounts  --
----------------
-- Quelle ist Pi und Ziel ist Truck
raspberryPi = IMAP {
    server = 'raspberrypi.example.com',
    username = 'username@example.com',
    password = ':-)',
}
cubietruck = IMAP {
    server = 'cubietruck.example.com',
    username = 'username@example.com',
    password = ';-)',
}
processMailbox(raspberryPi,cubietruck,'Subfolder',false)


Don't hesitate to ask any questions

Greetz

Samstag, 3. Januar 2015

Repository updated for Raspberry Pi and migration to Cubietruck started

Hello,

currently my +Raspberry Pi compiles the packages to the latest version available. (Update from 01.01.2015)

In the next couple of weeks I'm going to migrate from +Raspberry Pi  to my new Cubietruck. I decided to upgrade to a new SBC because the Cubietruck has more power (2 GB Ram instead of 512MB, ARMv7 instead ARMv6 a.s.o.)

For the Cubietruck I decided to go the debootsrap way for a debian image and followed these instructions :
After that I had an amazing fast boot sequence on my "truck". :-) 
I had to fix an  issue on my host because the module "binfmt_misc" was not integrated in my kernel which I compiled myself.

The main difference beetween Raspberry Pi and the Cubietruck is the CPU.
Debian is available for ARMv7 CPUs as "armhf" and for ARMv6 CPUs as "armel" (soft float). The difference is the performance. If you use "armel" on the Raspberry Pi you will loose lots of performance, that's why the guys from Raspbian created their own repository for ARMv6 and "hard float". They compiled nearly every package for the Pi and I did that for the +Kolab packages.

The debian-armhf repository does not contain all of the packages which are necessary for the Kolab installation so my "truck" is compiling all the stuff as well. :-)

Greetz
Andreas

Donnerstag, 4. September 2014

Kolab 3.3 now available for Raspberry Pi

Hi,

now I finished compiling all the +Kolab.org packages for the +Raspberry Pi . Just a short note that you can update your groupware on your Pi pto the most recent version of +Kolab.org .

Greetz

Donnerstag, 7. August 2014

Updating from 3.2 to 3.3 beta1

Hello,

I just finished the compiling of all modules and performed an upgrade to 3.3 beta1 on +Rasperry Pi .

For all impatient:
deb http://kolab.zion-control.org /


Changes I adopted to my installation :

/etc/kolab/kolab.conf
[wallace]
modules = resources, invitationpolicy, footer 
kolab_invitation_policy = ACT_ACCEPT_IF_NO_CONFLICT:zion-control.org, ACT_MANUAL
/etc/kolab-freebusy/config.ini
[httpauth]
type = ldap
host = ldap://localhost:389
bind_dn = "uid=kolab-service,ou=Special Users,dc=zion-control,dc=org"
bind_pw = "IwontTellYou"


[directory "local-cache"]
type = static
fbsource = file:/var/cache/kolab-freebusy/%s.ifb
expires = 10m
[directory "kolab-resources"]
type = ldap
host = ldap://localhost:389
bind_dn = "uid=kolab-service,ou=Special Users,dc=zion-control,dc=org"
bind_pw = "IwontTellYou"
base_dn = "ou=Resources,dc=zion-control,dc=org"
filter = "(&(objectClass=kolabsharedfolder)(mail=%s))"
attributes = mail, kolabtargetfolder
fbsource = "imap://cyrus-admin:IwontTellYou@localhost/%kolabtargetfolder?acl=lrs"
cacheto = /var/cache/kolab-freebusy/%mail.ifb
expires = 10m
loglevel = 100  ; Debug

So far, active-sync still working :-) and no major issues as the ones already known.



More the next days when I performed some tests


Greetz Andreas

Mittwoch, 6. August 2014

Kolab 3.3 beta1 released

Hi there,


+Kolab  just released the 3.3 beta1 version of kolab. (


My +Raspberry Pi is currently downloading and compiling all the packages.

Because of all the dependencies I solved during the first compile phase, I expect not so much errors during this installation.

Hope to tell you more tomorrow or even on friday.

Greets Andreas

Samstag, 3. Mai 2014

100 days and no mayor probs

Since now I'm using +Kolab on my +Raspberry Pi  for 100 days.

Syncroton (Active-Sync) is working like a charme, access to my files via WebDav is also working.

After changing the webserver from +Apache  to +Nginx the performance in using roundcube is now ok and after the logrotate during midnight I had no sync problems any more with my mobile.

Power consumption is below 3W so it costs only about 7€ per year (0,60€ per month) which is really cheap. Ok you have to add 1€ per month for the domain if you use +regfish for the domain. 

A few days ago I exported all my contacts hosted on the google server and imported them into Kolab. 
So if you don't like to let google know the phone number from your grandma and so on it's up to you to change this and get your own groupware on your server at your home :-)

BTW you can do a lot of other things with your Raspberry Pi.


Greetz

Donnerstag, 17. April 2014

Storing files in Kolab does not work

Hello,

yesterday I needed the functionality of storing files in +Kolab.

I found out that this does not work on my installation.


This is a known bug in cyrus.

https://lists.kolabsys.com/pipermail/packaging-commits/2012-November/007932.html
https://bugzilla.cyrusimap.org/show_bug.cgi?id=3754


Raspbian does not have an updated package :-( so I started the compile issue again but now for a raspbian package.

To do the changes I downloaded the package cyrus-imapd and tried to compile like I did for all the +Kolab packages. But that didn't fix the error because I had to modify imap/message.c.

Ok, googling showed me that I have to use the right method with quilt.

So here are the instructions
apt-get -y source cyrus-imapd
apt-get -y build-dep cyrus-imapd
cd cyrus-imapd-2.4-2.4.16
quilt push -a
quilt new failed_asserting_during_append
quilt add imap/message.c

Edit the file imap/message.c. In line 389 add the line:
message_guid_generate(&(*body)->guid, msg.base, msg.len);
And continue with the following commands
quilt refresh
debuild -us -uc -b

and now go for coffee break :-)

After less than 2 hours you can install the new package.


cd ..
dpkg -i cyrus-imapd-2.4_2.4.16-4+deb7u1_all.deb 

To get the indexes working on the existing files you have to reconstruct the mailboxes with the following command:
cyrreconstruct -C /etc/imapd.conf -fr 'user/name/Files@domain'

You can also mount the files in Windows. For me only the command line is working. So click on Start->run (or press Windows-R) and enter the following command:
net use x: https://example.com/iRony/files/ YourPasswordGoesHere /user:primary.email@example.com
The impatient people can you use my prebuild package on my APT-Repo
deb http://kolab-deb.zion-contro.org / 
greetz


Samstag, 12. April 2014

NGINX

Hello,

I create a new page with my nginx config to cover all changes and mods which I've done on my Raspberry Pi.

The instructions are based on http://kolab.org/blog/grote/2013/07/08/using-kolab-3-nginx and https://docs.kolab.org/howtos/nginx-webserver.html.


So feel free to leave any comments and to get your Kolab running on your Pi with a bit more performance.

More tuning tips are welcome. :-)

greetz

Freitag, 11. April 2014

XMPP now integrated in Kolab and working :-)

Now I got it.

I'm using converse.js.

Following the instructions on http://permalink.gmane.org/gmane.comp.kde.kolab.devel/12092  I got it.

Well, not only following the instructions but also to setup some more things:

First of all the config from the plugin. The main parts are
$config['converse_xmpp_bosh_prebind_url']= function($args) {
        return 'http://127.0.0.1:5280/http-bind';
};
$config['converse_xmpp_bosh_url']= function($args) {
        return '/http-bind';
};
$config['converse_xmpp_hostname']= function($args) {
        list($user,$host) = explode('@', $args['user']);
        return $host;
};
$config['converse_xmpp_username']= function($args) {
        list($user,$host) = explode('@', $args['user']);
        return $user;
};
Please check the variable name. It is in the config.inc.php from the plugin by default $rcmail_config, but the roundcubemail from kolab sources/binaries uses $config, so please change it :-)

To have the BOSH-Url available in roundcubemail, you have to redirect domain/http-bind to server:5280/htt-bind. My nginx config looks like this:
location /http-bind {
            proxy_pass  http://localhost:5280/http-bind;
            proxy_set_header Host $host;
            proxy_buffering off;
            tcp_nodelay on;
        }

And now the ejabberd.cfg. When you install ejabberd and connect it to kolab-ldap, binding also seems to work (domain:5280/http-bind) but it doesn't. You need explicitly to activate it in the "modules"-section!
I forgot this and struggled around nearly 4 hours to find the error.

So the changes in modules section are
  {mod_shared_roster,[
                {'ldap_base', 'ou=People,dc=example,dc=com'},
                {'ldap_rfilter', '(objectClass=kolabinetorgperson)'},
                {'ldap_memberattr', 'uid'},
                {'ldap_userdesc', 'cn'},
                {'ldap_filter', '(objectClass=kolabinetorgperson)'},
                {'ldap_useruid', 'uid'}
        ]},
  {mod_http_bind,[]}

greetz 

Dienstag, 8. April 2014

XMPP now working

Hi,


my eJabberd server is now up and running and I can receive messages and send messages.

My next step is to setup the chat functionality in roundcubemail so you can send messages through a Jabber client or roundcubemail. :-)

I had to find the correct settings for my domain and the client to get it to work. So it's necessary to have proper DNS records for your domain and the services jabber is running on.

You must have a A/CNAME record for your domain (no wildcard, -> "nslookup domain.com" should work) and 3 SRV records for your domain where you setup your jabber server where all the clients and servers have to connect to.

Also you should use SASL for authentication purpose.

I prefer to have my domain as the jabber ID and not a subdomain.


greetz

Montag, 31. März 2014

XMPP Integration with eJabberd

Hi,

yesterday I started to implement a chat into Kolab.
I decided to use an XMPP Server connected to the Kolab-Ldap and decided to use eJabberD.

Installation was quite simple and the connection to Kolab-Ldap as well.
Download and install with the following command:
apt-get install ejabberd
and follow the instructions.

Here are my specific parameter for the auth against Kolab-LDAP (the other remain as they are):
%%{auth_method, internal}.
{auth_method, ldap}.
{ldap_servers, ["localhost"]}.
{ldap_port, 389}.
{ldap_rootdn, "cn=Directory Manager"}.
{ldap_password, "DontEvenThinkAboutIt"}.
{ldap_filter, "(objectClass=mailrecipient)"}.
{ldap_uids, [{"mail", "%u@%d"}]}.
{acl, admin, {user, "admin", "zion-control.org"}}.
{hosts, ["zion-control.org"]}.
{ldap_base, "ou=People,dc=zion-control,dc=org"}.


It's not necessary to register user in eJabberd, just create one in your kolab-webadmin.

If you want to check your eJabberD, go to :
http://youraddress:5280/admin
and login with your full mail address and password which you use for Kolab.

Next part would be to have an IM in roundcube...

greets

Donnerstag, 13. März 2014

Kolab and vHosts

Today I played a little with the apache config to improve my performance using apache.

I noticed that my vHost setup was not working so I fixed this at first.  After a while I was wondering that I didn't receive any mail since then... Ok, something is now "kaputt" :-)

Now I had a look at the config of kolab in the apache sites-enabled directory. Kolab adds some entries in this directory, but thos "may" work for vHosts but not for my setup.

Simply moving the kolab-syncroton from sites-available to conf.d solved the problem for me.

Not the best, may be, but it's working.


greets

Dienstag, 11. März 2014

First impression - and thanks for the feedback

Hi,

first of all I wish to say thanks for your feedback on my posts :-)


So now the groupware is up and running and the next steps are planned already (XMPP = Chat/Messaging, OwnCloud).

The roundcube web frontend is a bit slow for daily work, and it reconnects to the imap server very often.

Sending mails from my own domain (dynamic IP) uses a smart host (mailjet, costs less and 200 mails/day are free :-)) and receiving mails also takes sometime because of Spam/Virus detection.

So the next parts are also performance improving.

Some topics to check are
memory usage (count of server process fro IMAP, Apache ...)
Proxy for roundcube connection to IMAP
deactivating Virus/Spam detection and use some header/body checks instead (not for production use of course)

If you have more cheats and hints to increase the performance, that would be nice.

greets

Montag, 10. März 2014

200 ok, it's working :-)

Hi there,

Yesterday I finished the compilation story and was able to setup kolab.

I had to install apache-2.2 and then compile 389-admin... but then...... 

Everything is available to install. :-)


Ok, I had some problems but here is a short summary:

Kolab needs some IMAP extensions which are available in cyrus-imap 2.5 (patches from kolab which are included un the next upstream) but currently the directories are not setup correctly.

Ok, just create some symlinks:
ln -s /var/lib/cyrus/ /var/lib/imap
ln -s /var/spool/cyrus/ /var/spool/imap
ln -s /usr/lib/cyrus /usr/lib/imap
And the SSL certificates are missing:
openssl req -new -x509 -nodes -out /etc/ssl/certs/cyrus-imaps.pem -keyout /etc/ssl/private/cyrus-imapd.key -days 3650
and change the filenames in the /etc/imapd.conf accordingly.

Now add postfix and cyrus to the ssl-cert group and also to the mail group.


Now it's time to start the command:
setup-kolab

Yeah, it's working. :-) (write down all the passwords, you'll need them)

I saw that my MySQL installation needs a password for the root user on localhost (got an error message during the setup) but nevertheless it's working.

You want to login after that?
Go to http://address/kolab-webadmin and login with "cn=directory manager" and the known password.

Now you can create a user and so on and it will receive mails just right after creation.

The cool stuff is, on my smartphone (Samsung Galaxy Note with Omni Rom = Android 4.4.2) I create a new account with "Microsoft Exchange", enter my eMail address and password, accepting all SSL certificates and that's it.

Now I can synch my mobile with my own groupware, including tasks, contacts, appointments.

In the past I loved to have a Catchall for my domain, so I created a new file in /etc/postfix/ldap called virtual_alias_maps_catchall.cf
server_host = localhost
server_port = 389
version = 3
search_base = dc=domain,dc=org
scope = sub
domain = ldap:/etc/postfix/ldap/mydestination.cf
bind_dn = uid=kolab-service,ou=Special Users,dc=domain,dc=org
bind_pw = ComeOn_I_wont_tell_you
query_filter = (&(alias=catchall@%d)(objectclass=kolabinetorgperson))
result_attribute = mail
In the kolab-webadmin page you can now add a new alias called catchall@domain.org

And now enjoy your groupware on your RaspberryPi.

For all of you who just want to download and install the DEBs:

Add my repo to your sources.
deb http://kolab-deb.zion-control.org /
and just install.

By the way, the docs on kolab.org are really helpful.

greets



Samstag, 8. März 2014

The compilation story continues

Ok,

not only pykolab was missing. The order which package to compile, install and compile again is important but we will manage this.

Now I had to compile libkolab, kolab-utils and may be some more.

I have my DEB directory in the sources.list so I know which package is currently missing (aptitude says "unavailable"). So I change into that directory, running "apt-get build-dep packagename" and it should now install all missing packages. The new one are now in my DEB directory and a "apt-get update" will take the new ones into account.

Don't forget a
dpkg-scanpackages .  | gzip -c9 > Packages.gz
before running apt-get update so the Packages.gz file is new and includes the newly created DEBs..


The story continues :-)

greets