From 43598c5a7b0705a67c6cc3cbbd448613a3d37ffc Mon Sep 17 00:00:00 2001 From: James Houlahan Date: Wed, 9 Nov 2022 15:40:08 +0100 Subject: [PATCH] docs: Update README.md --- README.md | 63 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 2eaf6b99..e2ebb50f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Gluon

An IMAP4rev1 library focusing on correctness, stability and performance.

-

This is work in progress. It will eventually be integrated into the Proton Bridge.

+

This is work in progress. It will eventually be integrated into the Proton Mail Bridge.

CI Status GoDoc @@ -14,45 +14,48 @@ The demo server can be started with: ``` -$ go run demo/demo.go -INFO[0000] User added to server userID=d5a706ae-c7bf-4cfd-bad3-982eafcdfe39 -INFO[0000] User added to server userID=622e121e-c9c7-43f9-b0ee-22bf868e8429 +$ GLUON_LOG_LEVEL=trace go run demo/demo.go +DEBU[0000] Applying update update="MailboxCreated: Mailbox.ID = 0, Mailbox.Name = INBOX" user-id=ac8970c5-cdb7-4043-ad85-ad9b9defcfb8 +DEBU[0000] Applying update update="MessagesCreated: MessageCount=0 Messages=[]" user-id=ac8970c5-cdb7-4043-ad85-ad9b9defcfb8 +INFO[0000] User added to server userID=ac8970c5-cdb7-4043-ad85-ad9b9defcfb8 +DEBU[0000] Applying update update="MailboxCreated: Mailbox.ID = 0, Mailbox.Name = INBOX" user-id=a51fad46-9bde-462a-a467-6c30f9a40a63 +DEBU[0000] Applying update update="MessagesCreated: MessageCount=0 Messages=[]" user-id=a51fad46-9bde-462a-a467-6c30f9a40a63 +INFO[0000] User added to server userID=a51fad46-9bde-462a-a467-6c30f9a40a63 INFO[0000] Server is listening on 127.0.0.1:1143 ``` -The demo server includes two demo users, -the first has addresses `user1@example.com` and `alias1@example.com` and password `password1`, -the second has addresses `user2@example.com` and `alias2@example.com` and password `password2`: +By default, the demo server includes two demo users, both with password `pass`. +The first has addresses `user1@example.com` and `alias1@example.com`. +The second has addresses `user2@example.com` and `alias2@example.com`. +Once started, connect to the demo server with an email client (e.g. thunderbird) or via telnet: ``` $ telnet 127.0.0.1 1143 Trying 127.0.0.1... -Connected to 127.0.0.1. +Connected to localhost. Escape character is '^]'. -* OK [CAPABILITY IDLE IMAP4rev1 MOVE UIDPLUS UNSELECT] gluon session ID 1 -tag login user1@example.com password1 -tag OK [CAPABILITY IDLE IMAP4rev1 MOVE UIDPLUS UNSELECT] (^_^) - -... - -tag login alias1@example.com password1 -tag OK [CAPABILITY IDLE IMAP4rev1 MOVE UIDPLUS UNSELECT] (^_^) - -... - -tag login user2@example.com password2 -tag OK [CAPABILITY IDLE IMAP4rev1 MOVE UIDPLUS UNSELECT] (^_^) - -... - -tag login alias2@example.com password2 -tag OK [CAPABILITY IDLE IMAP4rev1 MOVE UIDPLUS UNSELECT] (^_^) +* OK [CAPABILITY IDLE IMAP4rev1 MOVE UIDPLUS UNSELECT] 00.00.00 - gluon session ID 2 +tag login user1@example.com pass +tag OK [CAPABILITY IDLE IMAP4rev1 MOVE UIDPLUS UNSELECT] Logged in +tag append inbox (\Seen) {14} ++ Ready +To: user@pm.me +tag OK [APPENDUID 1 1] APPEND +tag select inbox +* FLAGS (\Answered \Deleted \Flagged \Seen) +* 1 EXISTS +* 1 RECENT +* OK [PERMANENTFLAGS (\Answered \Deleted \Flagged \Seen)] Flags permitted +* OK [UIDNEXT 2] Predicted next UID +* OK [UIDVALIDITY 1] UIDs valid +tag OK [READ-WRITE] SELECT +tag fetch 1:* (UID BODY.PEEK[]) +* 1 FETCH (UID 1 BODY[] {32} +X-Pm-Gluon-Id: 1 +To: user@pm.me) +tag OK command completed in 1.030958ms ``` -The demo accounts contain no messages. You can connect an IMAP client (e.g. thunderbird) and use it to copy in -messages from another mail server. - - # Changing DB schema Do not forget to re-generate ent code after changing the DB schema in `./internal/db/ent/schema`.