<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Tue, 16 Dec 2014, at 09:09 AM, Patrick Goetz wrote:<br></div>
<blockquote type="cite"><div>I hope I got that right.&nbsp; The SMS/XMPP thing could be useful if it were<br></div>
<div>documented.&nbsp; I'm not sure I'm seeing the utility of the sievenotifier<br></div>
<div>setting (send an email to let you know an email has been sent?).<br></div>
</blockquote><div>&nbsp;</div>
<div>Its useful if you want to notify another address that a message arrived. FastMail's notifyd allows extra options like summarising the email. Imagine sending it through to bridging service like IFTTT.<br></div>
<div>&nbsp;</div>
<div>But yes, the SMS and IM options are far more useful.<br></div>
<div>&nbsp;</div>
<blockquote type="cite">I still have no idea how the Fastmail notifyd<br></blockquote><div>&nbsp;</div>
<div>This part is the same, just with more options. The various notify options we have are documented here:<br></div>
<div>&nbsp;</div>
<div><a href="https://beta.fastmail.com/help/technical/sieve.html?u=220c412f">https://www.fastmail.com/help/technical/sieve.html</a><br></div>
<div>&nbsp;</div>
<blockquote type="cite">works or how this is integrated with calendar functionality.<br></blockquote><div>&nbsp;</div>
<div>Calendar notifications are generated through mboxevents, which still arrive via the notifyd channel but with a slightly different format. The event has all the information about the calendar item in it, and we use that to create an email or generate an eventsource push to the web client.<br></div>
<div>&nbsp;</div>
<div><a href="https://github.com/brong/cyrus-imapd/blob/fastmail/imap/mboxevent.c#L146" defang_rel="noreferrer">https://github.com/brong/cyrus-imapd/blob/fastmail/imap/mboxevent.c#L146</a><br></div>
<div><a href="https://github.com/brong/cyrus-imapd/blob/fastmail/imap/mboxevent.c#L858" defang_rel="noreferrer">https://github.com/brong/cyrus-imapd/blob/fastmail/imap/mboxevent.c#L858</a><br></div>
<div>&nbsp;</div>
<div>For the alarms themselves, we keep a global database of the "next" alarm for each item, which gets updated when a calendar item is saved. There's a separate daemon (calalarmd) which periodically processes this database and sends the mboxevents.<br></div>
<div>&nbsp;</div>
<div><a href="https://github.com/brong/cyrus-imapd/blob/fastmail/imap/caldav_alarm.c" defang_rel="noreferrer">https://github.com/brong/cyrus-imapd/blob/fastmail/imap/caldav_alarm.c</a><br></div>
<div><a href="https://github.com/brong/cyrus-imapd/blob/fastmail/imap/calalarmd.c" defang_rel="noreferrer">https://github.com/brong/cyrus-imapd/blob/fastmail/imap/calalarmd.c</a><br></div>
<div>&nbsp;</div>
<div>mboxevents are in Cyrus master (unsure about 2.4, I've never actually looked at it) and of course calendar support is there. The alarm support is (currently) specific to the FastMail branch. And yes, this is all woefully undocumented.<br></div>
<div>&nbsp;</div>
<div>I am being a little vague about all of this because I'm not quite sure if you're just curious or seriously looking to hack on or deploy this. If you ask specific questions we'll try to help out :)<br></div>
<div>&nbsp;</div>
<div>Cheers,<br></div>
<div>Rob N.<br></div>
</body>
</html>