Simple example IMAP server and mutt config and wrapper.

This commit is contained in:
Bill Thiede 2015-10-12 20:10:48 -07:00
parent d4d6b1ea12
commit 620316afd1
3 changed files with 28 additions and 0 deletions

5
cmd/ximap/test.muttrc Normal file
View File

@ -0,0 +1,5 @@
set spoolfile=imap://testuser:testpassword@localhost:10143/INBOX
set folder="imap://localhost:10143/INBOX"
set record="=Sent"
set postponed="=Drafts"

2
cmd/ximap/tmutt Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
mutt -F test.muttrc

21
cmd/ximap/ximap.go Normal file
View File

@ -0,0 +1,21 @@
package main
import (
"fmt"
"os"
"github.com/jordwest/imap-server"
"github.com/jordwest/imap-server/mailstore"
)
func main() {
store := mailstore.NewDummyMailstore()
s := imap.NewServer(store)
s.Transcript = os.Stdout
s.Addr = ":10143"
err := s.ListenAndServe()
if err != nil {
fmt.Printf("Error creating test connection: %s\n", err)
}
}