Skip to content

calternal_imap::submission

Authenticated, non-sending submission compatibility for Apple profiles (#428). This is deliberately a stub: there is no envelope, DATA mode, queue or write. Only implicit TLS callers may run it. Frames, writes and whole AUTH exchanges have deadlines; a partial line cannot renew a deadline.

Source: crates/calternal-imap/src/submission.rs

pub trait Security

The transport shares IMAP security state, rate limits and connection caps. A false result terminates AUTH; valid rechecks revocation per command.

fn authenticate<'a>(
&'a mut self,
username: &'a str,
password: &'a str,
) -> StoreFuture<'a, bool>;

Verify a Notes App Password and reserve that User’s connection slot.

fn valid(&self) -> StoreFuture<'_, bool>;

Check current scope, enablement and revocation before each command.

fn command(&self) -> StoreFuture<'_, ()>;

Charge one bounded command against the shared IP or User budget.

Source: crates/calternal-imap/src/submission.rs:13

pub async fn serve<S: AsyncRead + AsyncWrite + Unpin>(
stream: S,
security: &mut impl Security,
max_line: usize,
timeout: Duration,
) -> io::Result<()>

Serve the validation subset over an already established TLS stream (#428). All commands share the transport’s IP/User limiter. There is no plaintext upgrade command and no advertised PIPELINING or mail-sending capability.

Source: crates/calternal-imap/src/submission.rs:78