fork of github.com/chrj/smtpd
Find a file
Christian Joergensen 03861efdd8 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 Add synopsis for dkim-proxy. 2014-07-27 14:35:08 +02:00
.hgignore Send the HELO hostname to the HeloChecker. 2014-07-18 08:46:39 +02:00
address.go Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
envelope.go Added new Server field Hostname for the FQDN over the server (and updated various uses of the hostname). Moved Server.Addr to a parameter for ListenAndServe, as it was only used there. 2014-07-21 12:43:42 +02:00
example_test.go Added new Server field Hostname for the FQDN over the server (and updated various uses of the hostname). Moved Server.Addr to a parameter for ListenAndServe, as it was only used there. 2014-07-21 12:43:42 +02:00
LICENSE Cleanup, added license. 2014-07-15 12:37:25 +02: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 Tests refactoring, readme updated. 2014-07-26 18:29:14 +02: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 Added TLS param to Peer. Added option to prepend Received header to envelope data. 2014-07-21 00:06:56 +02:00
wrap_test.go Added TLS param to Peer. Added option to prepend Received header to envelope data. 2014-07-21 00:06:56 +02: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.