## MailFront

# IMAP Front End

## imapfront-auth

Usage: `imapfront-auth PROGRAM [ ARGS ... ]`

`imapfront-auth` provides IMAP authentication using CVM modules. The `LOGIN` command is authenticated via the CVM named by `$CVM_SASL_PLAIN`. If authentication succeeds, it sets up the environment and executes `PROGRAM`. It also offers RFC 1734 compliant AUTH support through cvm-sasl.

Connections are timed out after `$AUTH_TIMEOUT` (or `$TIMEOUT` if that is not set) seconds of inactivity (defaults to 1200 seconds or 20 minutes), or `$AUTH_SESSION_TIMEOUT` (or `$SESSION_TIMEOUT` if that is not set) seconds after the connection was established (defaults to 86400 seconds or 24 hours).

If `$MAXAUTHFAIL` is set, no more than the specified number of authentication failures may occur. After this limits are reached, the client is disconnected.

By default, the environment for the executed `PROGRAM` is set up for use with Courier IMAP. If `$SETUP_ENV` is set to `dovecot`, `imapfront-auth` will try to detect the type of mailbox in use and set `$MAIL` accordingly. See the Dovecot documentation for version 2 and version 1 for more details.