1GENERIC(5) File Formats Manual GENERIC(5)
2
3
4
6 generic - Postfix generic table format
7
9 postmap /etc/postfix/generic
10
11 postmap -q "string" /etc/postfix/generic
12
13 postmap -q - /etc/postfix/generic <inputfile
14
16 The optional generic(5) table specifies an address mapping that applies
17 when mail is delivered. This is the opposite of canonical(5) mapping,
18 which applies when mail is received.
19
20 Typically, one would use the generic(5) table on a system that does not
21 have a valid Internet domain name and that uses something like localdo‐
22 main.local instead. The generic(5) table is then used by the smtp(8)
23 client to transform local mail addresses into valid Internet mail
24 addresses when mail has to be sent across the Internet. See the EXAM‐
25 PLE section at the end of this document.
26
27 The generic(5) mapping affects both message header addresses (i.e.
28 addresses that appear inside messages) and message envelope addresses
29 (for example, the addresses that are used in SMTP protocol commands).
30
31 Normally, the generic(5) table is specified as a text file that serves
32 as input to the postmap(1) command. The result, an indexed file in dbm
33 or db format, is used for fast searching by the mail system. Execute
34 the command "postmap /etc/postfix/generic" to rebuild an indexed file
35 after changing the corresponding text file.
36
37 When the table is provided via other means such as NIS, LDAP or SQL,
38 the same lookups are done as for ordinary indexed files.
39
40 Alternatively, the table can be provided as a regular-expression map
41 where patterns are given as regular expressions, or lookups can be
42 directed to TCP-based server. In those case, the lookups are done in a
43 slightly different way as described below under "REGULAR EXPRESSION
44 TABLES" or "TCP-BASED TABLES".
45
47 The search string is folded to lowercase before database lookup. As of
48 Postfix 2.3, the search string is not case folded with database types
49 such as regexp: or pcre: whose lookup fields can match both upper and
50 lower case.
51
53 The input format for the postmap(1) command is as follows:
54
55 pattern result
56 When pattern matches a mail address, replace it by the corre‐
57 sponding result.
58
59 blank lines and comments
60 Empty lines and whitespace-only lines are ignored, as are lines
61 whose first non-whitespace character is a `#'.
62
63 multi-line text
64 A logical line starts with non-whitespace text. A line that
65 starts with whitespace continues a logical line.
66
68 With lookups from indexed files such as DB or DBM, or from networke