DESCRIPTION
This manual page documents the file format for the various tables used in the smtpd(8) mail daemon.The format described here applies to tables as defined in smtpd.conf(5).
TABLE TYPES
There are two types of tables: lists and mappings. A list consists of a series of values, while a mapping consists of a series of keys and their associated values. The following illustrates how to declare them as static tables:-
table mylist { value1, value2, value3 } table mymapping { key1 = value1, key2 = value2, key3 = value3 }
- value1 value2 value3
- key1 value1 key2 value2 key3 value3
- table name file:/path/to/file table name db:/path/to/file.db
Aliasing tables
Aliasing tables are mappings that associate a recipient to one or many destinations. They can be used in two contexts: primary domain aliases and virtual domain mapping.-
accept for domain example.org alias <myaliases> deliver to mbox accept for domain example.org virtual <myaliases> deliver to mbox
- user1 otheruser user2 otheruser1,otheruser2 user3 [email protected]
- user1 otheruser [email protected] otheruser1,otheruser2 @example.org [email protected] @ [email protected]
Domain tables
Domain tables are simple lists of domains. They can only be used in one context:-
accept for domain <mydomains> deliver to mbox
- example.org *.example.org
Credentials tables
Credentials tables are mappings of credentials. They can be used in two contexts:-
listen on tls [...] auth <credentials> accept for any relay tls+auth://label@host auth <credentials>
- user1 $2a$06$hIJ4QfMcp.90nJwKqGbKM.MybArjHOTpEtoTV.DgLYAiThuoYmTSe user2 $2a$06$bwSmUOBGcZGamIfRuXGTvuTo3VLbPG9k5yeKNMBtULBhksV5KdGsK
- label1 user:password label2 password
Netaddr tables
Netaddr tables are lists of IPv4 and IPv6 network addresses. They can only be used in the following context:-
accept from source <netaddr> for domain example.org deliver to mbox
- 192.168.1.1 ::1 ipv6:::1 192.168.1.0/24
Userinfo tables
User info tables are used to described virtual system users. They are used in rule context to specify an alternate user base, mapping virtual users to local system UID, GID and home directory.-
accept for domain example.org userbase <userinfo> deliver to maildir
- joe 1000:100:/home/virtual/joe jack 1000:100:/home/virtual/jack
Source tables
Source tables are lists of IPv4 and IPv6 addresses. They can only be used in the following context:-
accept for domain example.org relay source <addresses>
- 192.168.1.2 192.168.1.3 ::1 ::2 ipv6:::3 ipv6:::4
Mailaddr tables
Mailaddr tables are lists of email addresses. They can be used in the following contexts:-
accept sender <senders> for domain example.org deliver to mbox accept for domain example.org recipient <recipients> deliver to mbox
- user @domain user@domain user@*.domain
Addrname tables
Addrname tables are used to map IP addresses to hostnames. They can be used in both listen context and relay context:-
listen on 0.0.0.0 hostnames <addrname> accept for any relay hostnames <addrname>
- ::1 localhost 127.0.0.1 localhost 88.190.23.165 www.opensmtpd.org