table_redis
format description for smtpd redis tables
- Provided by: opensmtpd-table-redis (Version: 1.0.1-1)
- Report a bug
format description for smtpd redis tables
This manual page documents the file format of redis tables used by the smtpd(8) mail daemon.
The format described here applies to tables as defined in smtpd.conf(5).
A Redis table allows the storing of usernames, passwords, aliases, and domains in a redis server.
The table is used by smtpd(8) 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 Redis table consists of one Redis Databases with one or more keys.
If the table is used for authentication, the password should be encrypted using the crypt(3) function. Such passwords can be generated using the encrypt(1) utility or smtpctl(8) encrypt command.
mastermaster_portslaveslave_portdatabasepasswordquery_domainquery_userinfoquery_credentialsquery_aliasquery_mailaddrDue to the nature of redis, multiple schemas can be used. Those provided here a known to work.
domain# redis-cli sadd domains
example.netquery_domain SISMEMBER domains
%suserinfo# redis-cli HSET user:foo uid
1001# redis-cli HSET user:foo gid
1001# redis-cli HSET user:foo maildir
/mail/fooquery_userinfo HMGET user:%s uid
gid maildircredentials# redis-cli HSET user:foo login
foo# redis-cli HSET user:foo passwd
encrypted_passwordquery_credentials HMGET user:%s
login passwdalias# redis-cli LPUSH
aliases:foo@example.net foo# redis-cli LPUSH
aliases:bar@example.net fooquery_alias LRANGE aliases:%s 0
-1mailaddr# redis-cli sadd mailaddr
foo@example.netquery_mailaddr SISMEMBER mailaddr
%sThe first version of table_redis was
written in 2015. It was converted to the stdio protocol in 2024.
table_redis was initially written by
Emmanuel Vadot
<elbarto@bocal.org>.
The conversion to the stdio table protocol was done by Omar
Polo
<op@openbsd.org>.