Add -passwordHash support (#42)

* Update main.go

* Update main.go

* Set

* Set password to db

* Main

- Password hash, after trimming, cannot be empty

* Backend

- Assume incoming data is already a hash

* Main

- CLeaned up

* README

- Updated command-line argument documentation

* Menton this

* lower case

* SQLITE Driver

- Removed comments

* Main

- `passwordhash` only valiud when non-""

* Main

- Try running `Cost([]byte)` on the UTF-8 bytes to verify the hash
This commit is contained in:
Tristan B. Velloza Kildaire
2025-12-01 22:43:35 +02:00
committed by GitHub
parent 59426fabf1
commit 12c153a364
3 changed files with 34 additions and 7 deletions

View File

@@ -68,6 +68,7 @@ The following command line switches are supported by the `yggmail` binary:
* `-smtp=listenaddr:port` — listen for SMTP on a specific address/port
* `-imap=listenaddr:port` — listen for IMAP on a specific address/port;
* `-password` — set your IMAP/SMTP password (doesn't matter if Yggmail is running or not, just make sure that Yggmail is pointing at the right database file or that you are in the right working directory).
* `-passwordHash` — Like `-password` however this sets what must be directly in the database. This assumes you passed a bcrypt hash
## Notes