-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mail is now stored using a bolt database. (#29)
Fetching does not yet work because of the parsing of the body types. WIP (#2)
- Loading branch information
1 parent
1ba3111
commit a173575
Showing
18 changed files
with
363 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package auth | |
|
||
import ( | ||
"fmt" | ||
|
||
"golang.org/x/crypto/bcrypt" | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package main | ||
|
||
import ( | ||
"io/ioutil" | ||
"log" | ||
|
||
imap "github.com/alienscience/imapsrv" | ||
"github.com/alienscience/imapsrv/auth/boltstore" | ||
"github.com/alienscience/imapsrv/mailstore/boltmail" | ||
"io/ioutil" | ||
"log" | ||
) | ||
|
||
func main() { | ||
|
@@ -21,14 +22,17 @@ func main() { | |
if err != nil { | ||
log.Fatalln("Could not create BoltAuthStore:", err) | ||
} | ||
// Add a user | ||
authStore.CreateUser("[email protected]", "password") | ||
|
||
// Initialize mailstorage backend | ||
mailStore, err := boltmail.NewBoltMailstore(tmpFile.Name() + "_mailstore") | ||
if err != nil { | ||
log.Fatalln("Could not create BoltMailstore:", err) | ||
} | ||
|
||
// Add a user | ||
authStore.CreateUser("[email protected]", "password") | ||
mailStore.NewUser("[email protected]") | ||
|
||
// Put everything together | ||
s := imap.NewServer( | ||
// AUTH | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.