Oasis/developer documentation/SMTP and IMAP

SMTP and IMAP

How Oasis receives, accepts and serves mail.

SMTP

The smtp handler in core runs up to three listeners. Its settings are in the smtp config group.

ListenerSign inAccepts
Inbound, port 25Not offeredMail for local domains only. Anything else is refused as relaying.
Submission, port 587Required, after STARTTLSMail from a mailbox, sent as one of its own addresses or aliases.
Secure, port 465RequiredSame as 587, over TLS from the start.

Inbound mail is checked with SPF, DKIM and DMARC. A DMARC reject policy failure is refused when reject_dmarc is on, and a quarantine failure goes to Junk. The results are added as an Authentication-Results header.

Submitted mail gets Date and Message-ID headers when missing, is handed to outbound.send and a copy is saved to Sent.

SMTP replies are phrases in the core smtp lang package, so they can be translated or reworded from the dashboard.

IMAP

The imap handler in core is an IMAP4rev1 server written for Oasis. Its settings are in the imap config group. Mail apps sign in with the mailbox address and password.

CapabilityNotes
IDLEPushes new mail, expunges and flag changes as they happen.
UIDPLUSAPPENDUID and COPYUID codes.
MOVEMoves keep their size and update the quota once.
SPECIAL-USESent, Drafts, Junk, Trash and Archive are flagged in LIST.
LITERAL+, SASL-IRFewer round trips for sign in and APPEND.
AUTH=PLAIN, AUTH=LOGINOnly after TLS. Port 143 offers STARTTLS and LOGINDISABLED until then.

FETCH supports ENVELOPE, BODYSTRUCTURE, BODY[...] sections including HEADER.FIELDS and partial ranges, and the RFC822 forms. BODY[...] sets \Seen, BODY.PEEK[...] does not. SEARCH supports flags, dates, sizes, addresses, subject, header, body and text keys with NOT and OR.