194daa594d
more refractoring, adding makefile for tests
2025-03-14 12:46:30 +01:00
71409bf7cd
slight refractoring
2025-03-14 12:13:06 +01:00
fb16a3fc81
moved from log.Logger to slog.Logger
2025-03-14 12:07:44 +01:00
33c7d9338e
re-added SSL3.0 to envelope
2025-03-13 15:07:09 +01:00
e4e75cf975
cleaned up deprecations and warnings
2025-03-13 14:40:39 +01:00
Christian Joergensen
006a4f9d6d
Cleanup actions. ( #15 )
2022-09-30 12:51:37 -04:00
Christian Joergensen
737dbc490e
Run tests daily. ( #14 )
2022-09-27 20:24:12 -04:00
Alex SZAKALY
166abaf187
chore: add leading underscore to examples directory ( #13 )
...
Unfortunately the dependency github.com/eaigner/dkim
is no longer available
As a temporary solution we need to put leading underscore
to let Go recursively ignore it
Signed-off-by: Alex Szakaly <alex.szakaly@gmail.com>
2021-11-22 00:56:59 +01:00
Jonathon Reinhart
b5f17a69f6
Implement graceful shutdown ( #11 )
...
* Implement graceful shutdown
This borrows heavily from the implementation of net/http Server.Shutdown().
Closes #10
* Add Server.Address() function to return listener address of a Server
This is useful for logging, etc.
* Refactor out Server.Wait() and add 'wait' param to Shutdown()
This allows a consumer which runs multiple Servers (decke/smtprelay) to
first shut down all servers (passing wait=false) so no new connections are
accepted, and then wait for outstanding client connections to finish.
2021-03-29 10:24:55 +02: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
7c73bd1d49
Add go.yml ( #8 )
2020-05-23 10:26:20 +02:00
Christian Joergensen
74ef92e4ba
Merge pull request #5 from decke/received-header-fixes
...
Use new tls.CipherSuiteName() from Go 1.14 instead of own map
2020-05-21 18:49:32 +02:00
Christian Joergensen
c6661acb7e
Merge pull request #7 from chrj/ssl-testing
...
New test SSL certificate, better logging in tests
2020-05-21 18:44:49 +02:00
Christian Joergensen
724b678a1a
New test certificate. Better logging in tests.
2020-05-21 18:44:04 +02:00
Bernhard Froehlich
d975e4449b
Use new tls.CipherSuiteName() from Go 1.14 instead of own outdated map and add tls.VersionTLS13 to version list
2020-05-11 12:36:56 +00:00
Christian Joergensen
9c93a62f1a
Merge branch 'decke-fixes-for-upstream'
2018-12-16 22:10:16 +01:00
Bernhard Froehlich
6323615a6b
Fix testsuite for Received line test
2018-12-14 13:43:03 +00:00
Bernhard Froehlich
21709bf51f
Add list of cipher suites to show them in proper text and gracefully
...
handle if cipher suite or TLS version are not defined in our map.
2018-12-14 13:31:43 +00:00
Bernhard Froehlich
52710f748c
Improve compatibility of Received line
2018-12-14 13:06:11 +00:00
Bernhard Froehlich
0002b7c334
Format timestamp according to RFC 5322 as described in RFC 5321 (chapter 4.4):
...
Time-stamp-line = "Received:" FWS Stamp <CRLF>
Stamp = From-domain By-domain Opt-info [CFWS] ";"
FWS date-time
; where "date-time" is as defined in RFC 5322 [4]
; but the "obs-" forms, especially two-digit
; years, are prohibited in SMTP and MUST NOT be used.
...
2018-12-14 11:20:58 +00:00
Bernhard Froehlich
e7d1686eae
Fix client IP in Received line for IPv6 IP addresses
2018-12-14 11:08:42 +00:00
Bernhard Froehlich
9fccea2351
Ensure that the TLS handshake has been done before using tls.ConnectionState()
...
otherwise handshake is performed on first read/write and peer.TLS is invalid.
2018-12-14 11:04:35 +00:00
Christian Joergensen
0857b2e4ed
Updated readme to reflect versioning scheme.
2018-09-26 21:24:54 +02:00
Christian Joergensen
f70a0c8d52
Removing personal e-mail from comments and tests.
2018-09-26 21:22:28 +02:00
Christian Joergensen
8ff45117c6
Adding support for go modules.
2018-09-26 21:16:44 +02:00
Christian Joergensen
99fb19190d
Merge pull request #3 from matjam/master
...
Handle address validation better.
2018-09-26 21:14:46 +02:00
Christian Joergensen
6441050e00
Added extra and cleaned old test cases for pull request #3 .
2018-09-26 21:10:58 +02:00
Nathan Ollerenshaw
eb300d92cc
Allow the '<>' null sender.
2018-06-29 14:41:59 -07:00
Nathan Ollerenshaw
c009354c02
Removed check for single '@' in address.
2018-06-29 14:32:02 -07:00
Nathan Ollerenshaw
752519b0c8
Modified address parsing to use the net/mail ParseAddress function.
2018-06-29 14:13:01 -07:00
Christian Joergensen
722e9f7848
Also set Peer.TLS connection state on raw TLS connections.
...
Fix double underscore typo.
2017-10-10 10:10:59 +02:00
Christian Joergensen
52e449011b
Support TLS listeners (fixes issue #2 ).
2017-10-09 20:05:15 +02:00
Christian Joergensen
b2cb7a02c3
Removed old hgignore file.
2017-08-24 11:45:08 +02:00
Christian Joergensen
3ad0b67af6
Add Go Report Card, fix a couple of golint warnings.
2017-08-24 11:41:02 +02:00
Christian Joergensen
470c2fc1cb
Updated readme.
2017-08-22 23:58:03 +02:00
Christian Joergensen
7c67aa254c
Merge pull request #1 from cgt/importpaths
...
Update import paths for move to GitHub
2017-08-20 21:32:57 +02:00
Christoffer G. Thomsen
2987b286a4
Update import paths for move to GitHub
2017-08-20 18:05:24 +02:00
Christian Joergensen
68adb5dd88
Change readme to github links.
2017-08-17 20:23:29 +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
24e6eeee9d
Add synopsis for dkim-proxy.
2014-07-27 14:35:08 +02:00
Christian Joergensen
bca0c8ba29
Example DKIM proxy using the smtpd package.
2014-07-27 13:47:32 +02:00
Christian Joergensen
6ea6ce2c75
go fmt
2014-07-27 13:47:14 +02:00
Christian Joergensen
16f0241d5e
Refactored ssl test setup.
2014-07-27 09:37:42 +02:00
Christian Joergensen
c0d4dc204d
Tests refactoring, readme updated.
2014-07-26 18:29:14 +02:00
Christian Joergensen
437121004c
Fix panic on blank line.
2014-07-22 08:49:12 +02:00