Skip to content

Instantly share code, notes, and snippets.

@ben221199
Last active October 26, 2024 21:04
Show Gist options
  • Save ben221199/98de76b64eb54ce2abad1db65efb1f35 to your computer and use it in GitHub Desktop.
Save ben221199/98de76b64eb54ce2abad1db65efb1f35 to your computer and use it in GitHub Desktop.
Mail

Mail Protocols

MTP

Mail Transfer Protocol

Standards
RFC 772
RFC 780

Ports:

  • 57 (TCP)

Commands

ABRT

Abort

ABRT

Since: RFC 780

CONT

Continue

CONT

Since: RFC 780

HELP

Help

HELP [${string}]

Since: RFC 772

MAIL

Mail

MAIL FROM:${sender-path} [TO:${receiver-path}]

Since: RFC 772

MRCP

Mail Recipient

MRCP TO:${receiver-path}

Since: RFC 772

MRSQ

Mail Recipient Scheme Question

MRSQ [${scheme}]

Since: RFC 772

QUIT

Quit

QUIT

Since: RFC 772

NOOP

No Operation

NOOP

Since: RFC 772

SMTP

Simple Mail Transfer Protocol

Standards Remarks
RFC 788 SMTP
RFC 821 SMTP
RFC 2821 (E)SMTP
RFC 5321 (E)SMTP

Ports:

  • 25 (TCP)

Commands

DATA

Data

DATA

Since: RFC 788

EXPN

Expand

EXPN ${string}

Since: RFC 788

HELO

Hello

HELO ${domain}

Since: RFC 788

HELP

Help

HELP [${string}]

Since: RFC 788

MAIL

Mail

MAIL FROM:${reverse-path}

Since: RFC 788

NOOP

No Operation

NOOP

Since: RFC 788

QUIT

Quit

QUIT

Since: RFC 788

RCPT

Recipient

RCPT TO:${forward-path}

Since: RFC 788

RSET

Reset

RSET

Since: RFC 788

SAML

Send And Mail

SAML FROM:${reverse-path}

Since: RFC 788

SEND

Send

SEND FROM:${reverse-path}

Since: RFC 788

SOML

Send Or Mail

SOML FROM:${reverse-path}

Since: RFC 788

TURN

Turn

TURN

Since: RFC 821

VRFY

Verify

VRFY ${string}

Since: RFC 788

Extended SMTP

Extended Simple Mail Transfer Protocol

Standards Remarks
RFC 1425 SMTP Service Extensions
RFC 1651 SMTP Service Extensions
RFC 1869 SMTP Service Extensions
RFC 2821 (E)SMTP
RFC 5321 (E)SMTP

Ports:

  • See SMTP
  • See Message Submision (via SMTP)
  • See LMTP

Commands

Same as SMTP. For extension commands, see extensions.

EHLO

Extended Hello

EHLO ${domain}

Since: RFC 1425

Message Submission (via SMTP)

Message Submission (via Simple Mail Transfer Protocol)

Standards
RFC 2476
RFC 4409
RFC 6409

Ports:

  • 587 (TCP)
  • 465 (TCP + SSL/TLS)

Commands

Same as SMTP. First version of the protocol defined after creation of ESMTP and mentioned in RFC, so extendible like SMTP.

LMTP

Local Mail Transfer Protocol

Standards
RFC 2033

Ports:

  • 24 (TCP, not assigned by IANA; see "any private mail system")

Commands

Same as SMTP. First version of the protocol defined after creation of ESMTP and mentioned in RFC, so extendible like SMTP. The existance of LHLO forbids HELO (and EHLO).

LHLO

Local Hello

LHLO ${domain}

Since: RFC 2033

POP

Post Office Protocol

Standards Version
RFC 918 POP

Ports:

  • 109 (TCP, also POP2)

Commands

NOOP

No Operation

NOOP

PASS

Password

PASS ${password}

QUIT

Quit

QUIT

RCEV

Receive

RCEV

RCVD

Received

RCVD

RDEL

Read & Delete

RDEL ${mailbox}

RETR

Read Transactopn

RETR ${mailbox}

RSET

Reset

RSET

USER

User

USER ${name}

POP2

Post Office Protocol 2

Standards Version
RFC 937 POP2

Ports:

  • 109 (TCP, also POP)

Commands

HELO

Hello

HELO ${user} ${passw}

FOLD

Folder

FOLD ${mailbox}

READ [n]

Read

READ [${n}]

RETR

Retrieve

RETR

ACKS

Acknowledge & Save

ACKS

ACKD

Acknowledge & Delete

ACKD

NACK

Negative Acknowledge

NACK

QUIT

Quit

QUIT

POP3

Post Office Protocol 3

Standards Version
RFC 1081 POP3
RFC 1225 POP3
RFC 1460 POP3
RFC 1725 POP3
RFC 1939 POP3

Ports:

  • 110 (TCP)
  • 995 (TCP + SSL/TLS)

Command

APOP

Authentication POP

APOP ${name} ${diges}

DELE

Delete

DELE ${msg}

LAST

Last

LAST

LIST

Listing

LIST ${msg}

NOOP

No Operation

NOOP

PASS

Password

PASS ${string}

QUIT

Quit

QUIT

RETR

RETR ${msg}

RPOP

Remote POP

RPOP ${user}

RSET

Reset

RSET

STAT

Statistics (or) State

STAT

TOP

Top

TOP ${msg} ${n}

UIDL

Unique ID Listing

UIDL ${msg}

USER

User

USER ${name}

IMAP

  • Interim Mail Access Protocol (IMAP1)
  • Interactive Mail Access Protocol (IMAP2 and IMAP3)
  • Internet Message Access Protocol (IMAP4)
Standards Version
RFC 1064 IMAP2
RFC 1176 IMAP2
RFC 1203 IMAP3
RFC 1730 IMAP4
RFC 2060 IMAP4rev1
RFC 3501 IMAP4rev1
RFC 9051 IMAP4rev2

Ports:

  • 143 (TCP)
  • 993 (TCP + SSL/TLS)

Commands

BBOARD

Bulletin Board

${tag} BBOARD bulletin_board

CHECK

${tag} CHECK

COPY

${tag} COPY ${sequence} ${mailbox}

EXPUNGE

${tag} EXPUNGE

FETCH

${tag} FETCH ${sequence} ${data}

FIND

${tag} FIND BBOARDS ${pattern} ${tag} FIND MAILBOXES ${pattern}

FLAGS

${tag} FLAGS

LOGIN

${tag} LOGIN ${user} ${password}

LOGOUT

${tag} LOGOUT

NOOP

${tag} NOOP

READONLY

${tag} READONLY

READWRITE

${tag} READWRITE

SEARCH

${tag} SEARCH ${criteria}

SELECT

${tag} SELECT ${mailbox}

SELECT.FEATURES

${tag} SELECT.FEATURES ${features}

SELECT.VERSION

${tag} SELECT.VERSION (${major_version} ${minor_version})

SET.FLAGS

${tag} SET.FLAGS

STORE

${tag} STORE ${sequence} ${data} ${value}

SUPPORTED.VERSIONS

${tag} SUPPORTED.VERSIONS

QMQP

Quick Mail Queueing Protocol

Standards
CR.YP.TO Protocol - QMQP

Ports:

  • 628 (TCP)

Commands

None. Messages are sent in netstring packages:

netstring(
	netstring(message),
	netstring(sender),
	netstring(recipient1),
	netstring(recipient2),
	netstring(recipient3)
)

QMTP

Quick Mail Transfer Protocol

Standards
CR.YP.TO Protocol - QMTP

Ports:

  • 209 (TCP)
  • 6209 (TCP + SSL/TLS, submitted by Erwin Hoffmann)

Commands

None. Messages are sent in netstring packages:

netstring(message),
netstring(sender),
netstring(
	netstring(recipient1),
	netstring(recipient2),
	netstring(recipient3)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment