imap

package
v0.0.179 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 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{}

LibraryEnumerateIMAP implements NetworkApplicationLibrary for IMAP enumeration. Mode A only (pre-auth fingerprinting): greeting, CAPABILITY pre/post STARTTLS, advertised SASL mechanisms, TLS cert/cipher. Mode B (auth + folder/message enumeration) lives under `internal/pentest/imap/` and `pentest service imap`.

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