---
name: "table_sqlite"
section: "5"
platform: "linux"
package: "opensmtpd-extras"
version: "5.7.1-4+b2"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/table_sqlite"
---

# table\_sqlite(5)

format description for smtpd sqlite tables

## NAME

**table\_sqlite** – format description for smtpd sqlite tables

## DESCRIPTION

This manual page documents the file format of sqlite tables used by the [smtpd(8)](/smtpd/8.md) mail daemon.

The format described here applies to tables as defined in [smtpd.conf(5)](/smtpd.conf/5.md).

## SQLITE TABLE

A SQLite table allows the storing of usernames, passwords, aliases, and domains in a format that is shareable across various machines that support SQLite3

The table is used by [smtpd(8)](/smtpd/8.md) when authenticating a user, when user information such as user-id and/or home directory is required for a delivery, when a domain lookup may be required, and/or when looking for an alias.

A SQLite table consists of one or more SQLite3 Databases with one or more tables.

If the table is used for authentication, the password should be  encrypted using the [crypt(3)](/crypt/3.md) function. Such passwords can be generated using the [encrypt(1)](/encrypt/1.md) utility or [smtpctl(8)](/smtpctl/8.md) encrypt command.

## SQLITE TABLE CONFIG FILE

**dbpath**

```
This is the path to where the DB is located with the dbname.
```

**query\_alias**

```
This is used to provide a query to look up aliases. All the question marks are replaced
```

```
with the appropriate data, in this case it would be the left hand side of the SMTP address.
```

```
This expects one varchar to be returned with the user name the alias resolves to.
```

**query\_domain**

```
This is used to provide a query for a domain query call. All the question marks are replaced
```

```
with the appropriate data, in this case it would be the right hand side of the SMTP address.
```

```
This expects one varchar to be returned with a matching domain name.
```

**query\_userinfo**

```
This is used to provide a query for looking up user information.
```

```
All the question marks are replaced with the appropriate data, in this case it
```

```
would be the left hand side of the SMTP address.
```

```
This expects three fields to be returned an int containing a UID, an int containing a GID
```

```
and a varchar containing the home directory for the user.
```

**query\_credentials**

```
This is used to provide a query for looking up credentials. All the question marks are replaced
```

```
with the appropriate data, in this case it would be the left hand side of the SMTP address.
```

```
the query expects that there are two varchars returned one with a
```

```
user name one with a password in
```

[encrypt(1)](/encrypt/1.md)

```
format.
```

## SEE ALSO

[encrypt(1)](/encrypt/1.md), [smtpd.conf(5)](/smtpd.conf/5.md), [smtpctl(8)](/smtpctl/8.md), [smtpd(8)](/smtpd/8.md)
