Commit Graph

28 Commits

Author SHA1 Message Date
23f0d67abe
Remove broken example, refactor code, fix module path 2022-02-01 05:19:11 -08:00
Bernhard Fröhlich
32be721d71
Verify that user is properly authenticated before sending mail if AUTH is required (#6)
* Verify that user is properly authenticated before sending mail if AUTH is required

* Add testcase to verify that user is properly authenticated before sending mail if authenticator is setup

* Fix TestErrors() to not misuse auth bypass
2020-06-07 18:48:25 +02:00
Christian Joergensen
f70a0c8d52 Removing personal e-mail from comments and tests. 2018-09-26 21:22:28 +02:00
Nathan Ollerenshaw
eb300d92cc Allow the '<>' null sender. 2018-06-29 14:41:59 -07:00
Christian Joergensen
3ad0b67af6 Add Go Report Card, fix a couple of golint warnings. 2017-08-24 11:41:02 +02:00
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
Christian Joergensen
3cbf67409f Merge. 2017-05-22 19:54:10 +02:00
Christian Joergensen
843d673448 Proxy protocol support, go vet. 2017-05-22 19:45:42 +02:00
Marcel Voigt
f4b9300d6a Add ProtocolLogger to Server
- If set, logs received and sent SMTP messages
2016-05-01 15:37:06 +02:00
Craig
12d460e481 fix error messages 2016-02-12 01:35:10 +00:00
Craig
66f94a07ae Fix several panics on invalid input 2016-02-12 01:26:50 +00:00
Christian Joergensen
437121004c Fix panic on blank line. 2014-07-22 08:49:12 +02:00
Christian Joergensen
1d5d658be6 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
Christian Joergensen
d28767953f Added TLS param to Peer. Added option to prepend Received header to envelope data. 2014-07-21 00:06:56 +02:00
Christian Joergensen
9695f7c734 XCLIENT support. 2014-07-20 21:51:39 +02:00
Christian Joergensen
0fa1acf706 Handle too long lines. Make envelope reset into a session method. 2014-07-19 20:55:40 +02:00
Christian Joergensen
97b38af3b4 Send the HELO hostname to the HeloChecker. 2014-07-18 08:46:39 +02:00
Christian Joergensen
46b3a7668e Reset envelope on duplicate HELO/EHLO and after DATA. 2014-07-17 16:49:58 +02:00
Christian Joergensen
a0c514f12d Different fixes.
Handle empty e-mail addresses.
Implemented MaxRecipients check.
Announce PIPELINING support.
Corrected error code on Too Busy error.
Implemented DataTimeout for timeouts on DATA.
Use textproto.DotReader in handleDATA to implement dot-stuffing.
Reset deadlines on old socket in STARTTLS, add new deadlines to new TLS socket.
2014-07-17 16:00:44 +02:00
Christian Joergensen
3b49f5e70d Add Authenticator test in AUTH handler. 2014-07-15 20:14:29 +02:00
Christian Joergensen
64d201aecb Implemented MaxConnections, corrected examples, removed MailAddress. 2014-07-15 10:07:58 +02:00
Christian Joergensen
587b6ad4ac Examples. 2014-07-14 20:44:14 +02:00
Christian Joergensen
b78de3a03e Extra tests. 2014-07-14 20:06:32 +02:00
Christian Joergensen
be03306860 Test cases, fixes. 2014-07-14 19:44:10 +02:00
Christian Joergensen
4bb7e21f40 Fixes. 2014-07-14 14:51:31 +02:00
Christian Joergensen
dd3db75d5c go fmt. 2014-07-14 14:20:36 +02:00
Christian Joergensen
ab4df6d73e Authentication support. 2014-07-14 14:20:08 +02:00
Christian Joergensen
3127bd4ed8 Refactor. 2014-07-14 13:55:41 +02:00