This commit is contained in:
Christian Joergensen 2014-07-14 14:20:36 +02:00
parent ab4df6d73e
commit dd3db75d5c
4 changed files with 23 additions and 27 deletions

@ -1,8 +1,8 @@
package smtpd package smtpd
import ( import (
"strings"
"fmt" "fmt"
"strings"
) )
type MailAddress string type MailAddress string

@ -1,13 +1,13 @@
package smtpd package smtpd
import ( import (
"fmt"
"strings"
"crypto/tls"
"bufio" "bufio"
"log"
"bytes" "bytes"
"crypto/tls"
"encoding/base64" "encoding/base64"
"fmt"
"log"
"strings"
) )
type command struct { type command struct {
@ -145,7 +145,6 @@ func (session *session) handleRCPT(cmd command) {
} }
func (session *session) handleSTARTTLS(cmd command) { func (session *session) handleSTARTTLS(cmd command) {
if session.tls { if session.tls {

@ -7,12 +7,11 @@ import (
"fmt" "fmt"
"log" "log"
"net" "net"
"time"
"os" "os"
"time"
) )
type Server struct { type Server struct {
Addr string // Address to listen on when using ListenAndServe (default: "127.0.0.1:10025") Addr string // Address to listen on when using ListenAndServe (default: "127.0.0.1:10025")
WelcomeMessage string // Initial server banner (default: "<hostname> ESMTP ready.") WelcomeMessage string // Initial server banner (default: "<hostname> ESMTP ready.")
@ -55,7 +54,6 @@ type Envelope struct {
} }
type session struct { type session struct {
server *Server server *Server
peer Peer peer Peer
@ -242,7 +240,6 @@ func (session *session) error(err error) {
session.reply(502, fmt.Sprintf("%s", err)) session.reply(502, fmt.Sprintf("%s", err))
} }
func (session *session) extensions() []string { func (session *session) extensions() []string {
extensions := []string{ extensions := []string{