I finally got around to streamline the import of my work calendar into my Nextcloud. What I do is:
- Create a ‘Work’ calendar in Nextcloud
- Create a unique e-mail address that will process incoming e-mail. For example: aWZg3CoZ@example.org. The idea is that the address is the secret itself protecting my calendar (an attacker that guesses the address can’t really do much anyway, besides corrupting the copy of my work calendar).
- A procmail rule pipes incoming e-mail to a processing script:
:0: * ^TOaWZg3CoZ@example.org | /home/yves/bin/update_work_cal.sh
The script just extracts all MIME parts, and pushes the calendar using ics_tools.
#! /bin/bash ripmime --overwrite --no-nameless -d tmp -i - ics_put --replace --cal work tmp/RUTSCHLE\ YVES\ Calendar.ics
And presto! In the Outlook calendar pane, ‘Email calendar’ to your magic address, and a few minutes later the ‘work’ calendar has been updated with whatever Outlook thinks you should be doing instead of reading my blog.