3 ms·
>The mailbox_id from the above setup should be included somewhere in the text of the email, the subject, the bcc address, the headers, or any other field (even
by rosstex 7y ago
>The mailbox_id from the above setup should be included somewhere in the text of the email, the subject, the bcc address, the headers, or any other field (even email address of the sender or recipient will do).
Sorry... how does it know what mailbox id to look for?
- phnofive 7y agoThe mailbox_id can be anywhere in any field you send, apparently.
- rosstex 7y agoNo no, but... nowhere in the PUT request is there a mailbox ID. In fact the PUT doesn't contain any token from the mailbox creation. So how does it link your email without searching for every mailbox ID that currently exists within your email? I mean, maybe that's how it works, since they expire in a fairly short amount of time... seems ripe for DDoSing.
- lilyball 7y agoThe 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.
- moltar 7y agoI really don’t like this part. Having to include this ID means that there’s something extra needs to be done in tests. And the tests become not so real anymore.