fork of github.com/chrj/smtpd
Find a file
Christian Joergensen b564e87572 Improve the command parser to try to parse malformed commands.
Timon Relitzki reported that some systems, for example the Synology
DSM Rackstations, will send an extra space character with their SMTP
commands.

MAIL FROM:<christian@technobabble.dk>

Becomes:

MAIL FROM: <christian@technobabble.dk>

This confused the command parser. In the spirit of the robustness
principle if have choosen to improve the command parse to also handle
these extra spaces.

The command parser has also been extended with some extra unit tests,
to demonstrate the problem.
2017-05-23 21:42:13 +02:00
examples/dkim-proxy Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
.hgignore Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
address.go Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
envelope.go Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
example_test.go Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
LICENSE Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
protocol.go Improve the command parser to try to parse malformed commands. 2017-05-23 21:42:13 +02:00
protocol_test.go Improve the command parser to try to parse malformed commands. 2017-05-23 21:42:13 +02:00
README.md Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
smtpd.go Merge. 2017-05-22 19:54:10 +02:00
smtpd_test.go Improve the command parser to try to parse malformed commands. 2017-05-23 21:42:13 +02:00
wrap.go Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
wrap_test.go Fix several panics on invalid input 2016-02-12 01:26:50 +00:00

Go smtpd GoDoc

Package smtpd implements an SMTP server in golang.

Features

  • STARTTLS (using crypto/tls)
  • Authentication (PLAIN/LOGIN, only after STARTTLS)
  • XCLIENT (for running behind a proxy)
  • Connection, HELO, sender and recipient checks for rejecting e-mails using callbacks
  • Configurable limits for: connection count, message size and recipient count
  • Hands incoming e-mail off to a configured callback function

Feedback

If you end up using this package or have any feedback, I'd very much like to hear about it. You can reach me by email.