> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# mail_in_filter table

> This table contains entries for the mailboxes the eJournal system is fetching mail from (POP3 or IMAP).

## mail\_in\_filter Table (271)

This table contains entries for the mailboxes the eJournal system is fetching mail from (POP3 or IMAP).

## Fields

| Name                  | Description                                                                                                                                      | Type                                         | Nullable |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | :------: |
| id                    | The primary key (auto-incremented)                                                                                                               | PK                                           |    No    |
| server\_type          | Enum indicating the protocol to use (POP/IMAP).                                                                                                  | Enum [MailboxType](./enums/mailboxtype.mdx)  |    Yes   |
| pop\_server           | The hostname/IP address of the server.                                                                                                           | String(255)                                  |    Yes   |
| pop\_user             | The username used to login.                                                                                                                      | String(255)                                  |    Yes   |
| pop\_password         | The password used to login.                                                                                                                      | String(255)                                  |    Yes   |
| domain                | The domain used to login.                                                                                                                        | String(255)                                  |    Yes   |
| address               | The address associated with this mailbox (used as FROM: address when sending emails).                                                            | String(255)                                  |    Yes   |
| category\_id          | The id of the category this mailbox assigns tickets to (unless overridden by a sortfilter).                                                      | FK [ej\_category](./ej-category.mdx)         |    Yes   |
| priority              | The id of the priority tickets are assigned when imported from this mailbox.                                                                     | FK [ticket\_priority](./ticket-priority.mdx) |    Yes   |
| reply\_template\_id   | ID of the reply template used on this mail box.                                                                                                  | FK [reply\_template](./reply-template.mdx)   |    No    |
| checkwait             | How often (in minutes) to check this mailbox.                                                                                                    | Int                                          |    No    |
| next\_check           | When this mailbox should be checked the next time.                                                                                               | DateTime                                     |    Yes   |
| noautoreply           | If set, then this mailbox should not send an autoreply.                                                                                          | Bool                                         |    Yes   |
| last\_success         | Datetime indicating the last time email was sucessfully imported from this mailbox. Used to display warnings when this value is getting too old. | DateTime                                     |    Yes   |
| last\_try             | Datetime indicating the last time this mailbox tried (but possibly failed) to fetch email.                                                       | DateTime                                     |    Yes   |
| importmail\_pid       | The process id of the importMail instance processing this mailbox                                                                                | Int                                          |    Yes   |
| status                | Status indicated whether this mailbox is deleted or not.                                                                                         | status                                       |    Yes   |
| last\_error           | The last error message recieved from the underlying email system (such as POP3 protocol errors, etc).                                            | Clob                                         |    Yes   |
| num\_seq\_failures    | The number of sequential failures for this mailbox.                                                                                              | Int                                          |    Yes   |
| keep\_headers         | A commaseparated list of headers to store for emails imported. E.g. \&apos;to,from,recieved-by,subject\&apos;.                                   | String(255)                                  |    Yes   |
| language\_id          | The id of the customer language entry this entry is connected to.                                                                                | FK [cust\_lang](./cust-lang.mdx)             |    Yes   |
| autofaq               | Whether to suggest FAQ entries for this email account or not                                                                                     | Bool                                         |    Yes   |
| autofaq\_kb\_category | The root folder for the auto faq search.                                                                                                         | FK [kb\_category](./kb-category.mdx)         |    Yes   |
| mailgun\_dsn          | If this is set to 1, the route created in Mailgun will be set up to deliver emails of type auto-replies, system messsages etc                    | Bool                                         |    Yes   |
| ai\_suggest\_category | If this is set to 0 (false), then there will be no AI for suggesting categories on incoming emails                                               | Bool                                         |    No    |
| ai\_text\_analysis    | If this is set to 0 (false), then there will be no AI text analysis on incoming emails                                                           | Bool                                         |    No    |
| ticket\_type          | Tickettype of the ticket                                                                                                                         | FK [ticket\_type](./ticket-type.mdx)         |    Yes   |

<img src="https://mintcdn.com/superofficeas/6OcOTPa_ISkjXJg4/media/loc/en/database/tables/mail_in_filter.png?fit=max&auto=format&n=6OcOTPa_ISkjXJg4&q=85&s=de93968e08a226e3fb2dbbcd685c42cf" alt="mail_in_filter table relationship diagram" width="898" height="783" data-path="media/loc/en/database/tables/mail_in_filter.png" />

## Indexes

| Fields              | Types | Description |
| ------------------- | ----- | ----------- |
| category\_id        | FK    | Index       |
| priority            | FK    | Index       |
| reply\_template\_id | FK    | Index       |
| language\_id        | FK    | Index       |

## Relationships

| Table                                 | Description                                                                                                                                                                                                                                                                                                            |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [cust\_lang](./cust-lang)             | This table contains entries for customer languages.                                                                                                                                                                                                                                                                    |
| [ej\_category](./ej-category)         | This table contains categories, in which tickets are categorized. The categories are organized in a hierarchial manner.                                                                                                                                                                                                |
| [inbox](./inbox)                      | Info and status for safe email import                                                                                                                                                                                                                                                                                  |
| [kb\_category](./kb-category)         | Knowledge base folder hierarchy                                                                                                                                                                                                                                                                                        |
| [mail\_alias](./mail-alias)           | This table contains the alias\&apos;es for each mailbox, one-to-many-relation. It is in so we can substract the alias\&apos;es when when listing the recipients of a message.                                                                                                                                          |
| [mail\_in\_uidl](./mail-in-uidl)      | This table is used to avoid spamming the system by importing the same message several times (normally a result of a crash somewhere). When a mailbox is openede, then unique id for each message is stored in this table, and then removed only when the message has been correctly imported and deleted from mailbox. |
| [ms\_filter\_mail](./ms-filter-mail)  | This table connects mail filters (ms\_filter) to mailboxes (mail\_in\_filter).                                                                                                                                                                                                                                         |
| [ms\_trashbin](./ms-trashbin)         | This table contains entries for emails which have been trashed by a filter, waiting for confirmation of deletion or import.                                                                                                                                                                                            |
| [reply\_template](./reply-template)   | Templates for automatic and manual replies to emails/sms organized hierachically                                                                                                                                                                                                                                       |
| [ticket](./ticket)                    | This table contains the tickets (requests) of the system. Its purpose should be evident.                                                                                                                                                                                                                               |
| [ticket\_priority](./ticket-priority) | This table contains the ticket priorities.                                                                                                                                                                                                                                                                             |
| [ticket\_type](./ticket-type)         | A ticket (request) type                                                                                                                                                                                                                                                                                                |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [ms_filter_mail table](/en/database/tables/ms-filter-mail.md)
- [mail_alias table](/en/database/tables/mail-alias.md)
- [ms_filter table](/en/database/tables/ms-filter.md)
- [mail_in_uidl table](/en/database/tables/mail-in-uidl.md)
- [ms_trashbin table](/en/database/tables/ms-trashbin.md)
- [inbox table](/en/database/tables/inbox.md)
