Jonathon Reinhart
34cb47c364
Implement structured logs using logrus
...
This was based loosely on an earlier implementation by
Danny Kopping <danny.kopping@grafana.com >
2021-03-13 03:25:57 -05:00
Bernhard Froehlich
5ba64c5c6e
Add new Release Workflow using Github Actions and wangyoucao577/go-release-action
2021-02-17 12:49:24 +00:00
Bernhard Froehlich
fefeccec39
Remove weak CBC cipher suites and bump minimum TLS version to TLS 1.2
2021-02-16 15:31:53 +00:00
Jonathon Reinhart
70dfe6b128
Only call AuthLoadFile() once at startup
2021-02-15 00:08:37 -05:00
Jonathon Reinhart
7fa0eebf95
Simplify range code for setting up listeners
2021-02-15 00:00:38 -05:00
Jonathon Reinhart
ecf830865c
Add helpful log messages for various error cases
2021-02-14 23:49:17 -05:00
Jonathon Reinhart
4fd6bb1004
Refactor common code in listener setup
2021-02-14 23:30:31 -05:00
Jonathon Reinhart
fd3f513b18
Don't run ListenAndServe in a goroutine
...
Any errors returned in ListenAndServe() (e.g. port already in use) will be
swallowed and not evident to the user.
2021-02-14 23:24:25 -05:00
Jonathon Reinhart
b202a2209e
Refactor out getTLSConfig()
2021-02-14 23:21:42 -05:00
Jonathon Reinhart
0e8986ca79
Expand allowedUsers email field to support comma-separated and domains ( #9 )
...
* Expand allowedUsers email field to support comma-separated and domains
Closes #8
* Refactor AuthFetch() to return AuthUser struct
Also, this breaks out a parseLine() function which can be easily tested.
* Ignore empty addrs after splitting commas
This ignores a trailing comma
* Add tests for auth parseLine()
* Update documentation in smtprelay.ini
* Fix bug where addrAllowed() was incorrectly case-sensitive
* Update allowedUsers allowed domain format to require leading @
This disambiguates a local user ('john.smith') from a domain ('example.com')
2021-02-14 22:16:18 +01:00
Jonathon Reinhart
f33105f83c
Allow email field to be empty in allowedUsers file
...
In this case, it is not checked.
2021-02-09 00:00:36 -05:00
Bernhard Froehlich
6f3bd16988
The check if authentication was properly done is redundant now as of smtpd v0.2.0
...
See: 32be721d71
2020-06-07 17:17:28 +00:00
Bernhard Froehlich
53c2c27647
Support LOGIN authentication on outgoing SMTP server
...
PR: #1
Obtained from: https://gist.github.com/andelf/5118732
2020-05-15 21:08:17 +00:00
Bernhard Froehlich
00b96161b3
Remove duplication of TLS cipher suites for tls:// and startssl://
2020-05-11 13:52:25 +00:00
Bernhard Froehlich
324585c63c
Update list of cipher suites and add ciphers for TLS 1.3
2020-03-02 10:45:02 +00:00
Carlos Alberto Costa Beppler
0b65e904d8
Allows specify the sender used on SMTP conversation with outgoing server.
2019-09-06 17:07:37 -03:00
Bernhard Froehlich
770e819e2b
Improve error checking
2019-02-21 08:29:49 +00:00
Bernhard Froehlich
d11f8d81ea
Fix formatting
2019-02-21 08:27:12 +00:00
Bernhard Froehlich
6270d75571
Improve TLS Config to prefer server ciphers, remove 3DES ciphers and require TLS 1.1 or higher
2019-01-08 15:09:29 +00:00
Bernhard Froehlich
b9d1663a18
Fixes for new authentication code
2019-01-07 11:52:25 +00:00
Bernhard Froehlich
3a96014c70
Revert package renaming
2018-12-29 13:08:10 +00:00
Bernhard Froehlich
ade7cbca36
Rename to smtprelay
2018-12-29 12:39:56 +00:00
Bernhard Froehlich
ab341c697d
Code refactoring and rename package
2018-12-29 12:24:32 +00:00
Bernhard Froehlich
a82b0faf96
Check sender email against auth file when user is authenticated
2018-12-28 15:30:55 +00:00
Bernhard Froehlich
76a04a2001
Authentication checker converted to store passwords as bcrypt hashes
2018-12-28 15:18:50 +00:00
Bernhard Froehlich
0df376e54a
Bump to 1.1.1-dev
2018-12-26 21:20:51 +00:00
Bernhard Froehlich
c05e5779a8
Bump version to 1.1.0
2018-12-26 21:07:01 +00:00
Bernhard Froehlich
571e9ea942
Fork net/smtp package
2018-12-26 20:10:19 +00:00
Bernhard Froehlich
38aa14ddbf
Ensure that authentication was successfull before we relay mails
2018-12-26 19:35:38 +00:00
Bernhard Froehlich
72dad9fb70
Handle error cases for user supplied regexp
2018-12-21 14:10:34 +00:00
Bernhard Froehlich
a0e357c0de
Add log message for successful delivery
2018-12-21 09:09:41 +00:00
Bernhard Froehlich
3d648a2ce7
Adjust SMTP error codes and messages to be aligned with the RFCs
2018-12-21 09:06:22 +00:00
Bernhard Froehlich
66fb86be7a
Improve logging for received emails
2018-12-20 14:16:39 +00:00
Bernhard Froehlich
1d1c617161
Remove debug logging from smtpd
2018-12-20 13:53:06 +00:00
Bernhard Froehlich
e87b1e7168
Implement authentication checker against a plaintext file
2018-12-20 13:52:19 +00:00
Bernhard Froehlich
926c681bdf
Implement Sender and Recipient checker against regular expressions
2018-12-20 11:36:26 +00:00
Bernhard Froehlich
dbe4c3bc50
More formatting fixes
2018-12-20 11:13:05 +00:00
Bernhard Froehlich
6427f0ec23
Fix whitespace
2018-12-20 11:11:28 +00:00
Bernhard Froehlich
a5f3c2bd3f
Implement connection checker to restrict which networks are allowed to send mails to us
2018-12-20 11:09:06 +00:00
Bernhard Froehlich
b03ecbb02d
Introduce VERSION to be able to identify ourselves
2018-12-20 09:58:04 +00:00
Bernhard Froehlich
3b643b3927
Improve logging and make sure smtpd is also logging
2018-12-20 09:44:41 +00:00
Bernhard Froehlich
88d85458dc
Implement logfile and print on stdout and the logfile per default
2018-12-20 09:17:40 +00:00
Bernhard Froehlich
58d124b20d
Switch dependency back to chrj/smtpd since my fixes were merged
2018-12-20 08:45:12 +00:00
Bernhard Froehlich
5004734404
Temporary switch to my own fork of smtpd which contains a few fixes
2018-12-14 12:48:23 +00:00
Bernhard Froehlich
72fe85dea9
Add Received line to comply with RFC 5321
2018-12-14 11:26:48 +00:00
Bernhard Froehlich
b55f5569b9
Repair totally broken STARTTLS and TLS listeners
2018-12-13 13:11:55 +00:00
Bernhard Froehlich
a70b148821
Allow remote authentication to be optional
2018-12-12 08:38:13 +00:00
Bernhard Froehlich
ba30ddd83c
Remove separate remote_port config value and add it to remote_host
2018-12-12 08:37:44 +00:00
Bernhard Froehlich
b53d620dd5
Do not share Server instance with multiple listeners
...
to avoid mixing TLS and non TLS configurations in the same server.
2018-12-11 15:30:12 +00:00
Bernhard Froehlich
5da54ccf31
Implement multiple listeners and improve documentation in ini file
2018-12-10 14:54:57 +00:00