Forbid logins on the SMTP-STARTTLS port

Also, introduce the outline of a framework to handle message sending
differently to message receipt.
This commit is contained in:
2018-03-06 01:32:06 +00:00
parent bf9df9fc9f
commit 697e90ab99
4 changed files with 71 additions and 16 deletions

20
internal/smtp/receiver.go Normal file
View File

@@ -0,0 +1,20 @@
package smtp
import (
"fmt"
"io"
)
type Receiver struct{}
func (r *Receiver) Name() string {
return "smtp-starttls"
}
// It seems odd to have a Receiver called Send, but what we're looking for is an
// attempt from an arbitrary source to send an email to known accounts.
//
// We might want to clean this interface
func (r *Receiver) Send(from string, to []string, reader io.Reader) error {
return fmt.Errorf("Not yet implemented")
}