Simple example IMAP server and mutt config and wrapper.
This commit is contained in:
parent
d4d6b1ea12
commit
620316afd1
5
cmd/ximap/test.muttrc
Normal file
5
cmd/ximap/test.muttrc
Normal 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
2
cmd/ximap/tmutt
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
mutt -F test.muttrc
|
||||
21
cmd/ximap/ximap.go
Normal file
21
cmd/ximap/ximap.go
Normal 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)
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user