LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-08-2016, 05:14 PM   #16
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled

Owncloud the calendar and use tbird from there.
 
Old 01-09-2016, 09:37 PM   #17
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,588

Original Poster
Rep: Reputation: 179Reputation: 179
Quote:
Originally Posted by Habitual View Post
Owncloud the calendar and use tbird from there.
No can do. Our organization is a public pension fund manager and nothing goes into any cloud -- policy.

Nevertheless, I assume Tbird/Lightning must work better with CalDEV than WebDAV calendars, hence the reason it would work with Owncloud or google calendar. I will probably experiment with TB and CalDEV, but setting up a self-hosted CalDEV server seems non-trivial compared with a WebDAV server, esp. with Apache (which is our current WebDAV server).

Last edited by mfoley; 01-09-2016 at 09:42 PM.
 
Old 01-09-2016, 09:54 PM   #18
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Owncloud can easily be self-hosted and is a really easy way to get a CalDAV server - you might also find it's other functionality useful.

DaviCAL is another stand alone server that is fairly straitforward to get up and running.
 
1 members found this post helpful.
Old 01-09-2016, 10:53 PM   #19
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,588

Original Poster
Rep: Reputation: 179Reputation: 179
I guess I didn't read far enough about owncloud. Thanks for that tip and DaviCAL also! I'm going to first try getting Apache working with CalDEV (since it's the devil I know), but if that gives me no joy I'll check out these others.
 
Old 01-10-2016, 08:15 AM   #20
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by mfoley View Post
No can do. Our organization is a public pension fund manager and nothing goes into any cloud -- policy.
I don't know how to respond to this.

Good Luck!

And I didn't read all of today's updates:
Quote:
Originally Posted by mfoley View Post
I guess I didn't read far enough about owncloud.
It's a good thing.

Last edited by Habitual; 01-10-2016 at 08:16 AM.
 
Old 01-10-2016, 09:29 AM   #21
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,588

Original Poster
Rep: Reputation: 179Reputation: 179
Quote:
Originally Posted by mfoley View Post
I guess I didn't read far enough about owncloud. Thanks for that tip and DaviCAL also! I'm going to first try getting Apache working with CalDEV (since it's the devil I know), but if that gives me no joy I'll check out these others.
I might as well continue with my blow-by-blow update. The mod-caldev for Apache on Sourceforge appears to be for Apache 2.2.12 whereas the latest Apache source is 2.4.18. Since the mod-dav-acl is a souce patch to mod_dav, I'm very skeptical the 2.2.12 patches will work on 2.4.18.

So, moving on ... my next attempt will be to try DaviCAL per one of descendant_command's recommendations. This currently appears to work with Apache: http://wiki.davical.org/index.php/Apache_Config.

Stay tooned!
 
Old 01-14-2016, 08:31 PM   #22
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,588

Original Poster
Rep: Reputation: 179Reputation: 179
Final (maybe) update. In the end, I decided not to go with CalDAV and try to get WebDAV working. The problem is that we will have a mixed Outlook / Thunderbird-Lightning workstation environment. I'm concerned that after all the effort to get a CalDEV or DaviCAL server going, Outlook won't work since Outlook is said to only work with WebDAV. On the other hand, Lightning does not update the server .ics file when changes are made to the Calendar if using WebDAV, so, catch 22, I can't use a CalDAV server with Outlook and I can't use a WebDAV server with Lightning ...

or can I?

In fact, my solution didn't take that long. Since my WebDAV server is self-hosted on the AD/DC, and since the Calendar databases for all users also resides in their Thunderbird profile location on the AC/DC, I have physical access to the calendar source and the ics destination. So, I looked at the published output of the .ics file and perused the local.sqlite database and came up with a script which I can run from root's cron that checks for updates in the sqlite calendar database and creates a new .ics file. The new timestamp on the ics file causes both Outlook and Lightning subscribers to refresh the workstation calendars! Now I basically have WebDAV working for Lightning.

(btw I consider Lightning's inability to update published WebDAV calendars when the calendar owner makes a change to be a bug. This provides no difference between WebDAV publishing and simple exporting.)

Below is the core code without all the extra scanning of everyone's ics files, checking for changes and copy new files.

I'm going to bookmark this thread because when everyone is moved off Outlook, I can follow-through with the DaviCAL server and finally let calendar subscribers update subscribed calendars like they used to do with Exchange.

Feedback welcome

Code:
# calendar database is e.g. /redirectedFolders/Users/mark/.thunderbird/28ngbwvw.default/calendar-data/local.sqlite

if [ -z "$1" ]
then
  echo syntax: `basename $0` databaseFile
  exit
fi

DATABASE="$1"

# Time formats and timezone info. I know I'm -5 hours GMT, so I'm just hard-coding that
FMT="Y%m%dT%H%M%SZ"
FMT2="%Y%m%dT%H%M%S"
TZADJ=18000

# The original published .ics file seems to not have lines longer than 70 character.
# This function chop lines into 70 characters or less. The tilde (~) character is
# assumed to be a newline substitute and is replaced by a litteral "\n" after splitting.

function emit70
{
    t=`echo "$1"`
    while [ ${#t} -gt 0 ]
    do
        if [ ${#1} -ne ${#t} ]; then echo -n " "; fi
        echo "$t" | cut -c1-70 | sed 's/~/\\n/g'
        t=`echo "$t" | cut -c71-`
    done
}

# The following "boilderplate" is copied directly from the originally published .ics file.

cat <<EOF
BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:America/New_York
BEGIN:DAYLIGHT
TZOFFSETFROM:-0500
TZOFFSETTO:-0400
TZNAME:EDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0400
TZOFFSETTO:-0500
TZNAME:EST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
END:STANDARD
END:VTIMEZONE
EOF

# GET EVENTS
# Note that this query does not take into account the possibility of multiple
# calendars stored in the local.sqlite database. Possibly need to first
# 'select distinct cal_id' then loop through those. A "todo" for the future.

sqlite3 "$DATABASE"  \
"select cal_id, id, time_created, last_modified, title, priority, privacy, event_start, event_end,
  event_stamp, event_start_tz, event_end_tz
  from cal_events" | \
while read event
do
    x=`echo $event`
    if [ -z "$x" ]; then continue; fi

    # icalString is multi-line. Get separately to make parsing easier

    cal_id=`echo "$event" | cut "-d|" -f1`
    id=`echo "$event" | cut "-d|" -f2`

    icalString=`sqlite3 "$DATABASE" \
    "select icalString from cal_alarms where cal_id = '$cal_id' and item_id = '$id';"`

    time_created=`echo $event | cut "-d|" -f3 | cut -c1-10`
    time_created=$[ $time_created + $TZADJ ]
    time_created=`date -d@$time_created +$FMT`

    last_modified=`echo "$event" | cut "-d|" -f4 | cut -c1-10`
    last_modified=$[ $last_modified + $TZADJ ]
    last_modified=`date -d@$last_modified +$FMT`

    title=`echo "$event" | cut "-d|" -f5`
    priority=`echo "$event" | cut "-d|" -f6`
    privacy=`echo "$event" | cut "-d|" -f7`
    event_start=`echo "$event" | cut "-d|" -f8 | cut -c1-10`
    event_start=`date -d@$event_start +$FMT2`
    event_end=`echo "$event" | cut "-d|" -f9 | cut -c1-10`
    event_end=`date -d@$event_end +$FMT2`

    event_stamp=`echo "$event" | cut "-d|" -f10 | cut -c1-10`
    event_stamp=$[ $event_stamp + $TZADJ ]
    event_stamp=`date -d@$event_stamp +$FMT`

    event_start_tz=`echo "$event" | cut "-d|" -f11`
    event_end_tz=`echo "$event" | cut "-d|" -f12`

    cat << EOF
BEGIN:VEVENT
CREATED:$time_created
LAST_MODIFIED:$last_modified
DTSTAMP:$event_stamp
EOF

    # Split up UIDs longer than 70 characters (could have used emit70() function)

    echo UID:`echo $id | cut -c1-70`
    if [ ${#id} -gt 70 ]; then echo " "`echo $id | cut -c71-`; fi

    echo "SUMMARY:$title"

    if [ -n "$priority" ]; then echo "PRIORITY:$priority"; fi
    echo "DTSTART;TZID=$event_start_tz:$event_start"
    echo "DTEND;TZID=$event_end_tz:$event_end"

    # Get additional calendar properties (LOCATION, PRIVACY, etc.)
    # Some have multi-line entries such as X-ALT-DESC. Substitute
    # tilde (~) for newline (char(10)) to get everything on one
    # line. emit70() will put litteral "\n" (not newline) back in.

    sqlite3 "$DATABASE" "select key, value from cal_properties where cal_id = '$cal_id' and item_id = '$id';" | \
    while read xtra
    do
        k=`echo $xtra | cut "-d|" -f1`
        v=`echo $xtra | cut "-d|" -f2-`
        x=`echo $v`

        if [ -n "$x" ]; then emit70 "$k:$v"; fi
    done

    x=`echo $icalString`
    if [ -n "$x" ]; then echo "$icalString"; fi

    echo END:VEVENT
done

echo END:VCALENDAR

exit
 
  


Reply

Tags
clients, mail



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need mass-email provider recommendation peter576 General 8 04-10-2015 03:29 PM
Command based email client to send email through secure smtp havolinec Linux - Newbie 2 07-27-2010 07:40 AM
Recommendation for virtualization for email sendout servers mvidberg Linux - Enterprise 2 03-21-2008 06:32 AM
Recommendation of dedicated email blasting server? StevenO General 4 09-28-2007 02:08 AM
Email server recommendation mustangfanatic01 Linux - Software 1 05-26-2006 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration