Dockerized postfix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

251 lines
10 KiB

  1. # GENERIC(5) GENERIC(5)
  2. #
  3. # NAME
  4. # generic - Postfix generic table format
  5. #
  6. # SYNOPSIS
  7. # postmap /etc/postfix/generic
  8. #
  9. # postmap -q "string" /etc/postfix/generic
  10. #
  11. # postmap -q - /etc/postfix/generic <inputfile
  12. #
  13. # DESCRIPTION
  14. # The optional generic(5) table specifies an address mapping
  15. # that applies when mail is delivered. This is the opposite
  16. # of canonical(5) mapping, which applies when mail is
  17. # received.
  18. #
  19. # Typically, one would use the generic(5) table on a system
  20. # that does not have a valid Internet domain name and that
  21. # uses something like localdomain.local instead. The
  22. # generic(5) table is then used by the smtp(8) client to
  23. # transform local mail addresses into valid Internet mail
  24. # addresses when mail has to be sent across the Internet.
  25. # See the EXAMPLE section at the end of this document.
  26. #
  27. # The generic(5) mapping affects both message header
  28. # addresses (i.e. addresses that appear inside messages) and
  29. # message envelope addresses (for example, the addresses
  30. # that are used in SMTP protocol commands).
  31. #
  32. # Normally, the generic(5) table is specified as a text file
  33. # that serves as input to the postmap(1) command. The
  34. # result, an indexed file in dbm or db format, is used for
  35. # fast searching by the mail system. Execute the command
  36. # "postmap /etc/postfix/generic" to rebuild an indexed file
  37. # after changing the corresponding text file.
  38. #
  39. # When the table is provided via other means such as NIS,
  40. # LDAP or SQL, the same lookups are done as for ordinary
  41. # indexed files.
  42. #
  43. # Alternatively, the table can be provided as a regu-
  44. # lar-expression map where patterns are given as regular
  45. # expressions, or lookups can be directed to TCP-based
  46. # server. In those case, the lookups are done in a slightly
  47. # different way as described below under "REGULAR EXPRESSION
  48. # TABLES" or "TCP-BASED TABLES".
  49. #
  50. # CASE FOLDING
  51. # The search string is folded to lowercase before database
  52. # lookup. As of Postfix 2.3, the search string is not case
  53. # folded with database types such as regexp: or pcre: whose
  54. # lookup fields can match both upper and lower case.
  55. #
  56. # TABLE FORMAT
  57. # The input format for the postmap(1) command is as follows:
  58. #
  59. # pattern result
  60. # When pattern matches a mail address, replace it by
  61. # the corresponding result.
  62. #
  63. # blank lines and comments
  64. # Empty lines and whitespace-only lines are ignored,
  65. # as are lines whose first non-whitespace character
  66. # is a `#'.
  67. #
  68. # multi-line text
  69. # A logical line starts with non-whitespace text. A
  70. # line that starts with whitespace continues a logi-
  71. # cal line.
  72. #
  73. # TABLE SEARCH ORDER
  74. # With lookups from indexed files such as DB or DBM, or from
  75. # networked tables such as NIS, LDAP or SQL, each
  76. # user@domain query produces a sequence of query patterns as
  77. # described below.
  78. #
  79. # Each query pattern is sent to each specified lookup table
  80. # before trying the next query pattern, until a match is
  81. # found.
  82. #
  83. # user@domain address
  84. # Replace user@domain by address. This form has the
  85. # highest precedence.
  86. #
  87. # user address
  88. # Replace user@site by address when site is equal to
  89. # $myorigin, when site is listed in $mydestination,
  90. # or when it is listed in $inet_interfaces or
  91. # $proxy_interfaces.
  92. #
  93. # @domain address
  94. # Replace other addresses in domain by address. This
  95. # form has the lowest precedence.
  96. #
  97. # RESULT ADDRESS REWRITING
  98. # The lookup result is subject to address rewriting:
  99. #
  100. # o When the result has the form @otherdomain, the
  101. # result becomes the same user in otherdomain.
  102. #
  103. # o When "append_at_myorigin=yes", append "@$myorigin"
  104. # to addresses without "@domain".
  105. #
  106. # o When "append_dot_mydomain=yes", append ".$mydomain"
  107. # to addresses without ".domain".
  108. #
  109. # ADDRESS EXTENSION
  110. # When a mail address localpart contains the optional recip-
  111. # ient delimiter (e.g., user+foo@domain), the lookup order
  112. # becomes: user+foo@domain, user@domain, user+foo, user, and
  113. # @domain.
  114. #
  115. # The propagate_unmatched_extensions parameter controls
  116. # whether an unmatched address extension (+foo) is propa-
  117. # gated to the result of table lookup.
  118. #
  119. # REGULAR EXPRESSION TABLES
  120. # This section describes how the table lookups change when
  121. # the table is given in the form of regular expressions. For
  122. # a description of regular expression lookup table syntax,
  123. # see regexp_table(5) or pcre_table(5).
  124. #
  125. # Each pattern is a regular expression that is applied to
  126. # the entire address being looked up. Thus, user@domain mail
  127. # addresses are not broken up into their user and @domain
  128. # constituent parts, nor is user+foo broken up into user and
  129. # foo.
  130. #
  131. # Patterns are applied in the order as specified in the ta-
  132. # ble, until a pattern is found that matches the search
  133. # string.
  134. #
  135. # Results are the same as with indexed file lookups, with
  136. # the additional feature that parenthesized substrings from
  137. # the pattern can be interpolated as $1, $2 and so on.
  138. #
  139. # TCP-BASED TABLES
  140. # This section describes how the table lookups change when
  141. # lookups are directed to a TCP-based server. For a descrip-
  142. # tion of the TCP client/server lookup protocol, see tcp_ta-
  143. # ble(5). This feature is not available up to and including
  144. # Postfix version 2.4.
  145. #
  146. # Each lookup operation uses the entire address once. Thus,
  147. # user@domain mail addresses are not broken up into their
  148. # user and @domain constituent parts, nor is user+foo broken
  149. # up into user and foo.
  150. #
  151. # Results are the same as with indexed file lookups.
  152. #
  153. # EXAMPLE
  154. # The following shows a generic mapping with an indexed
  155. # file. When mail is sent to a remote host via SMTP, this
  156. # replaces his@localdomain.local by his ISP mail address,
  157. # replaces her@localdomain.local by her ISP mail address,
  158. # and replaces other local addresses by his ISP account,
  159. # with an address extension of +local (this example assumes
  160. # that the ISP supports "+" style address extensions).
  161. #
  162. # /etc/postfix/main.cf:
  163. # smtp_generic_maps = hash:/etc/postfix/generic
  164. #
  165. # /etc/postfix/generic:
  166. # his@localdomain.local hisaccount@hisisp.example
  167. # her@localdomain.local heraccount@herisp.example
  168. # @localdomain.local hisaccount+local@hisisp.example
  169. #
  170. # Execute the command "postmap /etc/postfix/generic" when-
  171. # ever the table is changed. Instead of hash, some systems
  172. # use dbm database files. To find out what tables your sys-
  173. # tem supports use the command "postconf -m".
  174. #
  175. # BUGS
  176. # The table format does not understand quoting conventions.
  177. #
  178. # CONFIGURATION PARAMETERS
  179. # The following main.cf parameters are especially relevant.
  180. # The text below provides only a parameter summary. See
  181. # postconf(5) for more details including examples.
  182. #
  183. # smtp_generic_maps
  184. # Address mapping lookup table for envelope and
  185. # header sender and recipient addresses while deliv-
  186. # ering mail via SMTP.
  187. #
  188. # propagate_unmatched_extensions
  189. # A list of address rewriting or forwarding mecha-
  190. # nisms that propagate an address extension from the
  191. # original address to the result. Specify zero or
  192. # more of canonical, virtual, alias, forward,
  193. # include, or generic.
  194. #
  195. # Other parameters of interest:
  196. #
  197. # inet_interfaces
  198. # The network interface addresses that this system
  199. # receives mail on. You need to stop and start Post-
  200. # fix when this parameter changes.
  201. #
  202. # proxy_interfaces
  203. # Other interfaces that this machine receives mail on
  204. # by way of a proxy agent or network address transla-
  205. # tor.
  206. #
  207. # mydestination
  208. # List of domains that this mail system considers
  209. # local.
  210. #
  211. # myorigin
  212. # The domain that is appended to locally-posted mail.
  213. #
  214. # owner_request_special
  215. # Give special treatment to owner-xxx and xxx-request
  216. # addresses.
  217. #
  218. # SEE ALSO
  219. # postmap(1), Postfix lookup table manager
  220. # postconf(5), configuration parameters
  221. # smtp(8), Postfix SMTP client
  222. #
  223. # README FILES
  224. # Use "postconf readme_directory" or "postconf html_direc-
  225. # tory" to locate this information.
  226. # ADDRESS_REWRITING_README, address rewriting guide
  227. # DATABASE_README, Postfix lookup table overview
  228. # STANDARD_CONFIGURATION_README, configuration examples
  229. #
  230. # LICENSE
  231. # The Secure Mailer license must be distributed with this
  232. # software.
  233. #
  234. # HISTORY
  235. # A genericstable feature appears in the Sendmail MTA.
  236. #
  237. # This feature is available in Postfix 2.2 and later.
  238. #
  239. # AUTHOR(S)
  240. # Wietse Venema
  241. # IBM T.J. Watson Research
  242. # P.O. Box 704
  243. # Yorktown Heights, NY 10598, USA
  244. #
  245. # Wietse Venema
  246. # Google, Inc.
  247. # 111 8th Avenue
  248. # New York, NY 10011, USA
  249. #
  250. # GENERIC(5)