Skip to content

Commit ef62f56

Browse files
feat: add additional config paths
1 parent dc77427 commit ef62f56

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Config file is loaded from one of the following locations.
4343
- `.smtpbridge.yml`
4444
- `~/.smtpbridge.yaml`
4545
- `~/.smtpbridge.yml`
46+
- `/etc/smtpbridge.yaml`
47+
- `/etc/smtpbridge.yml`
4648

4749
### Starter Config
4850

@@ -60,7 +62,7 @@ rules:
6062
### Full Config
6163
6264
```yaml
63-
# Max message size for envelopes
65+
# Maximum message size for envelopes
6466
max_payload_size: 25 MB
6567

6668
# Directory for storing data
@@ -191,7 +193,6 @@ docker run -d \
191193
- Reload on config change
192194
- Add [Apprise](https://github.com/caronc/apprise) endpoint
193195
- HTTP and SMTP auth
194-
- Remove placeholder [Pico CSS](https://picocss.com/) for custom CSS
195196
- Better HTTP error handling with [HTMX](https://htmx.org/)
196197
- CRUD endpoints and rules
197198
- SQLite full text search

config/config.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,16 @@ type RawRule struct {
183183
func Read(cli CLI) (Raw, error) {
184184
var configFiles []string
185185
if cli.Config == nil {
186+
// DEPS: ../README.md
186187
configFile, err := resolve([]string{
187188
"config.yaml",
188189
"config.yml",
189190
".smtpbridge.yaml",
190191
".smtpbridge.yml",
191192
"~/.smtpbridge.yaml",
192193
"~/.smtpbridge.yml",
194+
"/etc/smtpbridge.yaml",
195+
"/etc/smtpbridge.yml",
193196
})
194197
if err != nil {
195198
return Raw{}, err
@@ -258,10 +261,10 @@ type CLI struct {
258261
DataDirectory string `name:"data-directory" help:"Path to data directory." type:"path"`
259262
SMTPDisable *bool `name:"smtp-disable" help:"Disable SMTP server."`
260263
SMTPHost *string `name:"smtp-host" help:"SMTP host address to listen on."`
261-
SMTPPort *uint16 `name:"smtp-port" help:"SMTP port to listen on"`
264+
SMTPPort *uint16 `name:"smtp-port" help:"SMTP port to listen on."`
262265
HTTPDisable *bool `name:"http-disable" help:"Disable HTTP server."`
263266
HTTPHost *string `name:"http-host" help:"HTTP host address to listen on."`
264-
HTTPPort *uint16 `name:"http-port" help:"HTTP port to listen on"`
267+
HTTPPort *uint16 `name:"http-port" help:"HTTP port to listen on."`
265268
Version bool `name:"version" help:"Show version."`
266269
}
267270

0 commit comments

Comments
 (0)