3 ms·
The ids follow a set format, so it probably scans the email for all strings of that format, then looks them up against a dictionary of existing mailbox ids
by lilyball 7y ago
The ids follow a set format, so it probably scans the email for all strings of that format, then looks them up against a dictionary of existing mailbox ids
- rosstex 7y agoGod forbid it be regex!
- lilyball 7y agoI may be wrong. I’m not the strongest with Haskell, but skimming the code, it appears to just dump all incoming email into the same dir and when you receive on a mailbox it scans the directory for any files containing the mailbox id. I’m not sure what code goes through and cleans up old emails though. Edit: it used a cron job that runs every minute and used `find` to delete any file that’s 5 minutes old. This both cleans up emails and deleted mailbox ids. This is a rather simple way to do this but you could just dump a massive amount of email on the service and it’ll run really slowly for the next 5 minutes.