Extremely WIP, but now messages appear in the evolution list pane
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"gopkg.in/urfave/cli.v1"
|
||||
|
||||
"ur.gs/crockery/internal/imap"
|
||||
"ur.gs/crockery/internal/store"
|
||||
)
|
||||
|
||||
@@ -69,13 +70,24 @@ func crockeryInit(c *cli.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
postmaster := &store.Account{
|
||||
Username: "postmaster@" + domain,
|
||||
Admin: true,
|
||||
PasswordHash: hash,
|
||||
username := "postmaster@" + domain
|
||||
mailbox := store.Mailbox{
|
||||
Account: username,
|
||||
Name: imap.InboxName,
|
||||
}
|
||||
|
||||
if err := datastore.CreateAccount(postmaster); err != nil {
|
||||
if err := datastore.CreateMailbox(&mailbox); err != nil {
|
||||
return fmt.Errorf("Failed to create admin mailbox %s: %v", mailbox.Name, err)
|
||||
}
|
||||
|
||||
postmaster := store.Account{
|
||||
Username: username,
|
||||
Admin: true,
|
||||
PasswordHash: hash,
|
||||
DefaultMailbox: mailbox.ID, // Automatically filled in by the store
|
||||
}
|
||||
|
||||
if err := datastore.CreateAccount(&postmaster); err != nil {
|
||||
return fmt.Errorf("Failed to create admin account %s: %v", postmaster.Username, err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user