Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

inbox : Process incoming emails

The lino_xl.lib.inbox plugin adds functionality for processing a mailbox of incoming emails.

It usually consumes the mailbox, i.e. deletes the messages from the inbox after processing them.

The lino.modlib.notify

Side note: Code snippets (lines starting with >>>) in this document get tested as part of our development workflow. The following initialization snippet tells you which demo project is being used in this document.

>>> import lino
>>> lino.startup('lino_book.projects.cms1.settings')
>>> from lino.api.doctest import *

Which means that code snippets in this document are tested using the lino_book.projects.cms1 demo project.

Plugin settings

inbox.subaddress_separator

The character sequence to use for separating the “local” from the “subaddress” part in email addresses. Default value is "+". See Subaddressing below.

inbox.mailbox_path

Default value is None

inbox.mailbox_type

This is any class that implements the mailbox.Mailbox interface of the mailbox package.

  • mailbox.Maildir

  • mailbox.mbox : the classic format for storing mail on Unix systems. All messages in an mbox mailbox are stored in a single file with the beginning of each message indicated by a line whose first five characters are “From “.

inbox.discard_processed_message

Default value is False

inbox.upload_area

Default value is 'general'. If this is None, files to attached incoming emails will be ignored.

inbox.upload_volume

Default value is 'inbox'. If this is None, files to attached incoming emails will be ignored.

Subaddressing

Lino uses subadressing RFC 2533 (also known as plus addressing) as follows (the examples assume that SERVER_EMAIL is 'inbox@example.com'):

  • inbox+123@example.com (one separator) means that replying to this email will create a comment that replies to the comment 123.

  • inbox+12+34@example.com (two separators) means that replying to this email will create a comment that is owner by the database object with content type 12 and primary key 34.