imap

package
v0.0.173 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package imap implements IMAP4rev1/IMAP4rev2 mail server enumeration.

Index

Constants

View Source
const (
	DefaultImapPort  = 143
	DefaultImapsPort = 993
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LibraryEnumerateIMAP

type LibraryEnumerateIMAP struct {
	Username                  string
	Password                  string
	Mechanism                 string
	MaxMessages               int
	Search                    string
	TargetFolder              string
	AllowPlaintextCredentials bool
}

LibraryEnumerateIMAP implements NetworkApplicationLibrary for IMAP enumeration.

func (*LibraryEnumerateIMAP) EnumerateTarget

EnumerateTarget performs IMAP enumeration against a single target.

Flow:

  1. Parse target (host:port, default port 143)
  2. Try plain TCP; on failure try implicit TLS (port 993 or any port with TLS)
  3. Run CAPABILITY; detect STARTTLS; upgrade if available
  4. Re-CAPABILITY after TLS upgrade
  5. Detect IMAP version, extract TLS cert info
  6. If Username set: authenticate and enumerate folders, statuses, messages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL