Skip to content

Commit

Permalink
docs: Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshoulahan committed Nov 9, 2022
1 parent 60a88e1 commit 43598c5
Showing 1 changed file with 33 additions and 30 deletions.
63 changes: 33 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">
<h1 align="center">Gluon</h1>
<p align="center">An <a href="https://datatracker.ietf.org/doc/html/rfc3501">IMAP4rev1</a> library focusing on correctness, stability and performance.</p>
<p align="center">This is work in progress. It will eventually be integrated into the Proton Bridge.</p>
<p align="center">This is work in progress. It will eventually be integrated into the Proton Mail Bridge.</p>
<p align="center">
<a href="https://github.com/ProtonMail/gluon/actions/workflows/release.yml"><img src="https://github.com/ProtonMail/gluon/actions/workflows/release.yml/badge.svg?branch=master" alt="CI Status"></a>
<a href="https://pkg.go.dev/github.com/ProtonMail/gluon"><img src="https://pkg.go.dev/badge/github.com/ProtonMail/gluon" alt="GoDoc"></a>
Expand All @@ -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`.
Expand Down

0 comments on commit 43598c5

Please sign in to comment.