Skip to content

Commit

Permalink
updated examples for TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Nov 28, 2023
1 parent fab8497 commit bf05b15
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
21 changes: 20 additions & 1 deletion docs/Dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,23 @@ Note that if you change cour config.ini, the mail server needs to be restarted b

```bash
cat "tools/testmail.txt" | while read L; do sleep "0.2"; echo "$L"; done | "nc" -C -v "localhost" "2525"
```
```

### Via TLS

Testing with the TLS version (non-plaintext).
Needs config options `MAILPORT_TLS`, `TLS_CERTIFICATE` and `TLS_PRIVATE_KEY` set.

```bash
echo 'Testing' | swaks --to test@example.com --from "something@example.com" --server localhost --port 465 -tlsc
```

### Via STARTTLS

STARTTOS runs on the default plaintext port and is just a option for servers to upgrade to TLS but starts in plaintext.
Needs config options `TLS_CERTIFICATE` and `TLS_PRIVATE_KEY` set.

Testing STARTTLS version
```bash
echo 'Testing' | swaks --to test@example.com --from "something@example.com" --server localhost -tlsc
```
2 changes: 1 addition & 1 deletion example.config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ MAILPORT=25

; TLS settings
;
; MAILPORT_TLS=587
; MAILPORT_TLS=465
; TLS_CERTIFICATE=/path/to/your/fullchain.pem
; TLS_PRIVATE_KEY=/path/to/your/privkey.pem

Expand Down

0 comments on commit bf05b15

Please sign in to comment.