docs: more info in readme
This commit is contained in:
parent
f96a7a5d7c
commit
34c1c5a57c
1 changed files with 51 additions and 2 deletions
53
README.md
53
README.md
|
@ -2,15 +2,64 @@
|
|||
|
||||
A simple SMTP server that forwards incoming emails to a Shoutrrr service.
|
||||
|
||||
## Installing
|
||||
|
||||
First generate a new configuration file following this example:
|
||||
|
||||
```toml
|
||||
# config.toml
|
||||
# Port the SMTP server will listen on
|
||||
Port = 11025
|
||||
|
||||
# Credentials for the SMTP server (default to username/password if not set/empty)
|
||||
Username = "user"
|
||||
Password = "nometokens"
|
||||
|
||||
# Shoutrrr service to forward emails to
|
||||
[[Recipients]]
|
||||
# Email addresses to forward emails from
|
||||
Addresses = ["some@email.com"]
|
||||
# Shoutrrr service to forward emails to
|
||||
Target = "ntfy://ntfy.sh/my-ntfy-topic?tags=thing"
|
||||
|
||||
# Note: Repeat [[Recipients]] as needed
|
||||
```
|
||||
|
||||
### From releases
|
||||
|
||||
- Grab the latest release from the [releases page](https://git.nakama.town/fmartingr/smtp2shoutrrr/releases)
|
||||
- Put the configuration file in the same directory as the binary
|
||||
- Run the binary for your appropriate platform
|
||||
|
||||
### From source (development)
|
||||
|
||||
- Clone [this repository](https://git.nakama.town/fmartingr/smtp2shoutrrr)
|
||||
- Put the configuration file in the repository folder
|
||||
- Run `make quick-run`
|
||||
|
||||
### Using docker
|
||||
|
||||
- Create a `config.toml` file as described above
|
||||
- Run the docker image mounting the `Config.toml` file as `/config.toml` and exposing the configured port:
|
||||
|
||||
```bash
|
||||
docker run -v /path/to/config.toml:/config.toml \
|
||||
-p 11025:11025 \
|
||||
git.nakama.town/fmartingr/smtp2shoutrrr:latest
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
Run the server with:
|
||||
|
||||
```
|
||||
go run main.go
|
||||
make quick-run
|
||||
```
|
||||
|
||||
Send a test email with:
|
||||
|
||||
> This will read the `config.toml` in the current directory to set the appropriate SMTP client configuration.
|
||||
|
||||
```
|
||||
go run ./cmd/sendmail/.
|
||||
```
|
||||
go run ./cmd/sendmail/main.go
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue