1
0
Fork 0
Commit Graph

24 Commits

Author SHA1 Message Date
chylex b32b44e77f
Update example config INI 2023-07-08 14:23:34 +02:00
chylex aad22aba76
Add support for multiple accounts with own SMTP remotes 2023-07-03 11:39:08 +02:00
Bernhard Froehlich c83544bd90
Add note how to use environment variables for configuration 2022-05-23 15:18:22 +00:00
Bernhard Froehlich f69d1f0114
Improve examples in ini file to not quote strings at all 2022-05-23 14:54:05 +00:00
Bernhard Froehlich 5e78bbe643
Improve remotes documentation in config 2022-04-25 14:19:31 +00:00
Mark Gardner cf927508dd Improve sample config to be more accurate 2022-04-21 11:28:16 -05:00
Mark Gardner 4221919689 Allow config to have multiple remotes.
This will enable development teams to test emails from
a system like mailcatcher while also having the email
delivered to the indented mailbox.
2022-04-21 10:52:03 -05:00
Rubin Raithel 016ef762fb
add: basic smtpd configuration options 2022-01-10 20:39:55 +01:00
Dries De Peuter 03d109ff8b
feat: Add support for ignoring certs 2021-12-09 21:38:38 +01:00
Ben Ubois d8860fc917 Added external command support. 2021-05-07 14:08:10 -07:00
Jonathon Reinhart 22ef0c2ee6 Move SMTP auth setup to ConfigLoad()
This has several benefits:
- Configuration errors are caught at startup rather than upon a connection
- mailHandler() has less work to do for each connection

Rather than relying on remote_user and remote_pass to control whether
authentication is used, introduce an explicit "none" type for
remote_auth, and make that the default. (This is effectively the same
default behavior since remote_user and remote_pass default to empty.)

Also, we are in a better position to more thoroughly check for
configuration errors or mismatches:
- If remote_auth is given, remote_user and remote_pass are required.
- If remote_auth is given, remote_host is also required (because it
  makes no sense to say we're going to authenticate if we have no server
  to which to authenticate.)
- If remote_user or remote_pass are given, remote_auth cannot be "none".
2021-03-14 18:41:54 -04:00
Jonathon Reinhart 76ef135d33 Clarify allowed_sender/allowed_recipient empty string behavior 2021-03-14 12:36:34 -04:00
Jonathon Reinhart 918df65a3a Require that networks in allowed_nets are networks and not hosts 2021-03-13 20:40:25 -05:00
Jonathon Reinhart 0503c12ccd Allow "allowed_nets" to be empty, meaning any network is allowed 2021-03-13 20:34:48 -05:00
Jonathon Reinhart 20ca816160 Discard mail if remote_host is not set
This is useful for test environments.
2021-03-13 09:28:04 -05:00
Jonathon Reinhart 9921b38046 Explicitly configure default logfile for stderr 2021-03-13 03:25:57 -05:00
Jonathon Reinhart 095fba119a Change default logfile to empty string (meaning stderr)
The causes logrus to write to stderr.
2021-03-13 03:25:57 -05:00
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
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
Simon Legner 999cfea307 Fix typo "addresses" 2020-09-03 14:06:20 +02: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
Carlos Alberto Costa Beppler 769193ea4d Adjust the description of remote_sender parameter.
It represents the e-mail address used while sending message to the outgoing SMTP server.
2019-09-06 21:00:35 -03:00
Bernhard Froehlich ade7cbca36
Rename to smtprelay 2018-12-29 12:39:56 +00:00