{"action":"opened","issue":{"url":"https://api.github.com/repos/alienscience/imapsrv/issues/30","labels_url":"https://api.github.com/repos/alienscience/imapsrv/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/alienscience/imapsrv/issues/30/comments","events_url":"https://api.github.com/repos/alienscience/imapsrv/issues/30/events","html_url":"https://github.com/alienscience/imapsrv/issues/30","id":91829548,"number":30,"title":"Saving emails","user":{"login":"EtienneBruines","id":3962174,"avatar_url":"https://avatars.githubusercontent.com/u/3962174?v=3","gravatar_id":"","url":"https://api.github.com/users/EtienneBruines","html_url":"https://github.com/EtienneBruines","followers_url":"https://api.github.com/users/EtienneBruines/followers","following_url":"https://api.github.com/users/EtienneBruines/following{/other_user}","gists_url":"https://api.github.com/users/EtienneBruines/gists{/gist_id}","starred_url":"https://api.github.com/users/EtienneBruines/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EtienneBruines/subscriptions","organizations_url":"https://api.github.com/users/EtienneBruines/orgs","repos_url":"https://api.github.com/users/EtienneBruines/repos","events_url":"https://api.github.com/users/EtienneBruines/events{/privacy}","received_events_url":"https://api.github.com/users/EtienneBruines/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alienscience/imapsrv/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/alienscience/imapsrv/milestones/1","html_url":"https://github.com/alienscience/imapsrv/milestones/Version%200.1","labels_url":"https://api.github.com/repos/alienscience/imapsrv/milestones/1/labels","id":849925,"number":1,"title":"Version 0.1","description":"Functional MVP (can login on simple email client) and test suite","creator":{"login":"twitchyliquid64","id":6328589,"avatar_url":"https://avatars.githubusercontent.com/u/6328589?v=3","gravatar_id":"","url":"https://api.github.com/users/twitchyliquid64","html_url":"https://github.com/twitchyliquid64","followers_url":"https://api.github.com/users/twitchyliquid64/followers","following_url":"https://api.github.com/users/twitchyliquid64/following{/other_user}","gists_url":"https://api.github.com/users/twitchyliquid64/gists{/gist_id}","starred_url":"https://api.github.com/users/twitchyliquid64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitchyliquid64/subscriptions","organizations_url":"https://api.github.com/users/twitchyliquid64/orgs","repos_url":"https://api.github.com/users/twitchyliquid64/repos","events_url":"https://api.github.com/users/twitchyliquid64/events{/privacy}","received_events_url":"https://api.github.com/users/twitchyliquid64/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":2,"state":"open","created_at":"2014-11-02T09:40:26Z","updated_at":"2015-06-29T15:00:42Z","due_on":"2014-11-30T08:00:00Z","closed_at":null},"comments":0,"created_at":"2015-06-29T15:00:42Z","updated_at":"2015-06-29T15:00:42Z","closed_at":null,"body":"According to #29 I've implemented a way for our server to receive incoming emails from Postfix (SMTP server), using the LMTP protocol. This means we can serve actual emails to end-users.\r\n\r\nWhat we receive from Postfix:\r\n* The sender (e-mail address)\r\n* The recipients (plural, and we can process them individually); meaning we can:\r\n    * deny it for user A because we don't know him;\r\n    * accept it for user B because we like him;\r\n    * deny it for user C because his quota is reached;\r\n    * accept it for user D because we like him too;\r\n    * ... and the MTA (SMTP server) will be OK with that. \r\n* Raw message, i.e.:\r\n\r\n```\r\nReceived: from there (localhost [IPv6:::1])\r\n        by receiver.local (Postfix) with SMTP id EE9EB416D4\r\n        for <postmaster@receiver.local>; Mon, 29 Jun 2015 15:35:31 +0200 (CEST)\r\nMessage-Id: <20150629133541.EE9EB416D4@receiver.local>\r\nDate: Mon, 29 Jun 2015 15:35:31 +0200 (CEST)\r\nFrom: hello@sender.local\r\n\r\nhi there\r\n\r\n```\r\n\r\nWe should probably have an interface that stores this information, so anyone can implement it any way they like. The message should go inside the \"mailboxes\" of the recipients, so we can eventually serve them to the end-users. Should we do any preprocessing? (such as timestamp, name of sender, name of receiver, optional subject, etc.) -- and if so, which attributes?\r\n\r\nOr do we simply store the raw data somewhere?\r\n\r\nThoughts? @alienscience @waffle-iron (or anyone for that matter?)"}}