News for hackers. Stuff that matters.
Re:Show HN: Switchboard – open-source email processing in Er... by christophe971 on Tuesday June 17, 2014 @12:32PM (#7905366)
Looks nice so far, worked with IMAP for a while, not fun... So is it on top of IMAP or ... ?
Re:Show HN: Switchboard – open-source email processing in Er... by jtmoulia on Tuesday June 17, 2014 @12:39PM (#7905411)
Yup, IMAP is powerful, but it's gathered some baggage over the years.

Switchboard uses a simplified interface based on JMAP[1] for client's and workers, which it does proxy into IMAP commands. One of the conveniences of Switchboard is it manages the IMAP connections: restarting them as they fail and allowing concurrent access.

[1] http://jmap.io/

Re:Show HN: Switchboard – open-source email processing in Er... by oelmekki on Tuesday June 17, 2014 @12:40PM (#7905414)
It seems to be, as far as I understand.

If that's actually the case, how do you handle the case where someone read a new mail (and thus, mark it as read) before app processed it ?

Re:Show HN: Switchboard – open-source email processing in Er... by jtmoulia on Tuesday June 17, 2014 @12:55PM (#7905496)
The application uses IMAP UID/UIDVALIDITY values, typically along with IDLE, to identify new emails in a mailbox. These don't change when an email is read, so marking as read doesn't introduce any race conditions in this case.