SOGo Outlook Free/Busy information


(Gerald Brandt) #1

Hi,

I’ve been wanting SOGo’s free/busy info to show up in Outlook for a long time. I finally wrote something.

It requires sogo-tool to get every users calendars, libical to generate freebusy info. I borrowed code from Citadel to get libical to generate the free busy info for me.

It’s a single C++ file. Simply compile with g++ and link with libical.

I have it running under NethServer and generating new freebusy files every 15 minutes, then scp’ing the final files to a web server where Outlook can find them. Certain things are hardcoded into the source:

const string SOURCE_DIRECTORY = "/root/sogo/" ;  // location of sogo-tool backup files
const string VFB_DIRECTORY = "/root/vfb/" ;      // location of final freebusy files
const string DOMAIN = "xxxx.com" ;           // domain for ORGANIZER information

Is anyone interested? What should I do with the source?

Gerald

sample freebusy file:

BEGIN:VCALENDAR
PRODID:GBR - SOGo FreeBusy Generator
VERSION:2.0
BEGIN:VFREEBUSY
METHOD:PUBLISH
DTSTAMP:20170510T171507
ORGANIZER: xxxx@xxx.com
FREEBUSY:20170215T172100Z/20170215T182100Z
DTSTART:20170106T160000Z
DTEND:20170721T133000Z
FREEBUSY:20170510T190000Z/20170510T210000Z
FREEBUSY:20170116T213000Z/20170116T223000Z
FREEBUSY:20170307T160000Z/20170307T170000Z
FREEBUSY:20170106T160000Z/20170106T173000Z
FREEBUSY:20170315T150000Z/20170315T160000Z
FREEBUSY:20170315T150000Z/20170315T160000Z
FREEBUSY:20170330T153000Z/20170330T163000Z
FREEBUSY:20170316T193000Z/20170316T210000Z
FREEBUSY:20170505T203000Z/20170505T210000Z
FREEBUSY:20170502T170000Z/20170502T180000Z
FREEBUSY:20170720T130000Z/20170721T133000Z
FREEBUSY:20170330T153000Z/20170330T163000Z
END:VFREEBUSY
END:VCALENDAR

(Giacomo Sanchietti) #2

Excellent work!

I think you could propose an upstream patch :wink:


(Gerald Brandt) #3

And how would I go about doing that?


(Alessio Fattorini) #4

That’s the right place:
https://sogo.nu/bugs/my_view_page.php


(Rongten) #5

Hello Gerald,

was this code disseminated somewhere? There is some issue currently with free-busy on sogo and repeated events and it would be nice to have a look at your code to see if it could be used instead.


(Gerald Brandt) #6

The code is nowhere, as far as I know. I basically run a script from crontab that runs sogo-tool backup
into a known directory, and then I run my code. The script and code
(with makefile) are attached. You will need libical installed.
I run this code once an hour, and Outlook is happy with what it
generates (uploaded to a web site for Outlook to access).
There’s no license attached to the source.
Gerald


(Rongten) #7

Hello Gerald,

Thank you very much for your willingness to help!

Unfortunately it seems that Discourse stripped the email attachments…

Cheers


(Gerald Brandt) #8

Hmmm. Ok, I’ll put the file somewhere else and post here when it’s available.

Gerald


(Rongten) #9

Thanks!

Much appreciated.

Regards