import "github.com/gophish/gophish/imap"
Validate validates supplied IMAP model by connecting to the server
type Client interface { Login(username, password string) (cmd *imap.Command, err error) Logout(timeout time.Duration) (cmd *imap.Command, err error) Select(name string, readOnly bool) (mbox *imap.MailboxStatus, err error) Store(seq *imap.SeqSet, item imap.StoreItem, value interface{}, ch chan *imap.Message) (err error) Fetch(seqset *imap.SeqSet, items []imap.FetchItem, ch chan *imap.Message) (err error) }
Client interface for IMAP interactions
Email represents an email.Email with an included IMAP Sequence Number
type Mailbox struct { Host string TLS bool IgnoreCertErrors bool User string Pwd string Folder string // Read only mode, false (original logic) if not initialized ReadOnly bool }
Mailbox holds onto the credentials and other information needed for connecting to an IMAP server.
DeleteEmails will delete emails from the supplied slice of SeqNums
GetUnread will find all unread emails in the folder and return them as a list.
MarkAsUnread will set the UNSEEN flag on a supplied slice of SeqNums
type Monitor struct {
// contains filtered or unexported fields
}
Monitor is a worker that monitors IMAP servers for reported campaign emails
NewMonitor returns a new instance of imap.Monitor
Shutdown attempts to gracefully shutdown the IMAP monitor.
Start launches the IMAP campaign monitor
Package imap imports 16 packages (graph) and is imported by 4 packages. Updated 2020-10-03. Refresh now. Tools for package owners.