This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.

Configure Incoming Mail


IMAP can be used to fetch mails periodically from an inbox or any other folder.

The following configuration is required to setup IMAP:

# How often to check for new mails (cron syntax, every two minutes in this example)
nice2.optional.mailintegration.schedule=*/2 * * * *

# Whether to actually fetch mails via IMAP

# URL of the IMAP server

# Whether to fetch mails from subfolders

# Whether to remove mails after fetching them
# Iff false, mails are marked read.

The URL specified as nice2.optional.mailintegration.mailbox.default.url comprises these parts:



Either imap for explicit TLS (port 143) or imaps for implicit TLS (port 993).


Username. The @ character needs to be percentage encoded as %40. So, would becomes


Password of ${USER}


Name of the IMAP server


(optional) Specify a custom port to use. See ${PROTOCOL} for default ports.


Folder from which to fetch mails. The inbox is called INBOX. Folder separator is usually /. Thus, INBOX/tocco selects the subfolder tocco of the INBOX folder.

Office 365 Mail Accounts

Microsoft disabled the basic authentication. In the Azure portal an “app registration” for the mailbox must be created and mailbox access permission must be added via PowerShell. (see official help page from Microsoft and step by step instructions with screenshots). We require the {TENANT-ID}, {CLIENT-ID} and {CLIENT-SECRET} from the app which should be set in the application properties as followed:


In nice2.optional.mailintegration.mailbox.default.url no <password> is required so the syntax is:




While pop3 support is implemented, it is not used actively and has not been tested. Thus, do not expect pop3 support to just work.

POP3 is an older alternative to IMAP. Use IMAP whenever possible.

The setup is the same as for IMAP described above except the url given as nice2.optional.mailintegration.mailbox.default.url differs slightly:



Either pop3 for explicit TLS (port 110) or pop3s for implicit TLS (port 995).


See IMAP above.