Convert from BoltDB to Maildir storage for emails
This commit is contained in:
@@ -66,12 +66,12 @@ func (m *msa) Login(user, pass string) (smtp.User, error) {
|
||||
Handler: &sender{msa: m, account: account},
|
||||
}
|
||||
|
||||
log.Printf("Beginning session %d for username=%s", session.ID, account.Username)
|
||||
log.Printf("Beginning session %s for username=%s", session.ID, account.Username)
|
||||
// FIXME: TODO: Track ongoing sessions for termination or notifications
|
||||
|
||||
return session, nil
|
||||
}
|
||||
|
||||
func (m *msa) AnonymousLogin() (smtp.User, error) {
|
||||
return nil, smtp.AuthRequiredErr
|
||||
return nil, smtp.ErrAuthRequired
|
||||
}
|
||||
|
@@ -15,14 +15,14 @@ type Session struct {
|
||||
}
|
||||
|
||||
func (s *Session) Send(from string, to []string, r io.Reader) error {
|
||||
log.Printf("session=%d from=%s to=%s", s.ID, from, to)
|
||||
log.Printf("session=%s from=%s to=%#v", s.ID, from, to)
|
||||
|
||||
// TODO: a chain of middlewares here
|
||||
return s.Handler.ServeSMTP(from, to, r)
|
||||
}
|
||||
|
||||
func (s *Session) Logout() error {
|
||||
log.Printf("Ending session %d", s.ID)
|
||||
log.Printf("Ending session %s", s.ID)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user