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.
 
 

289 lines
12 KiB

  1. # CANONICAL(5) CANONICAL(5)
  2. #
  3. # NAME
  4. # canonical - Postfix canonical table format
  5. #
  6. # SYNOPSIS
  7. # postmap /etc/postfix/canonical
  8. #
  9. # postmap -q "string" /etc/postfix/canonical
  10. #
  11. # postmap -q - /etc/postfix/canonical <inputfile
  12. #
  13. # DESCRIPTION
  14. # The optional canonical(5) table specifies an address map-
  15. # ping for local and non-local addresses. The mapping is
  16. # used by the cleanup(8) daemon, before mail is stored into
  17. # the queue. The address mapping is recursive.
  18. #
  19. # Normally, the canonical(5) table is specified as a text
  20. # file that serves as input to the postmap(1) command. The
  21. # result, an indexed file in dbm or db format, is used for
  22. # fast searching by the mail system. Execute the command
  23. # "postmap /etc/postfix/canonical" to rebuild an indexed
  24. # file after changing the corresponding text file.
  25. #
  26. # When the table is provided via other means such as NIS,
  27. # LDAP or SQL, the same lookups are done as for ordinary
  28. # indexed files.
  29. #
  30. # Alternatively, the table can be provided as a regu-
  31. # lar-expression map where patterns are given as regular
  32. # expressions, or lookups can be directed to TCP-based
  33. # server. In those cases, the lookups are done in a slightly
  34. # different way as described below under "REGULAR EXPRESSION
  35. # TABLES" or "TCP-BASED TABLES".
  36. #
  37. # By default the canonical(5) mapping affects both message
  38. # header addresses (i.e. addresses that appear inside mes-
  39. # sages) and message envelope addresses (for example, the
  40. # addresses that are used in SMTP protocol commands). This
  41. # is controlled with the canonical_classes parameter.
  42. #
  43. # NOTE: Postfix versions 2.2 and later rewrite message head-
  44. # ers from remote SMTP clients only if the client matches
  45. # the local_header_rewrite_clients parameter, or if the
  46. # remote_header_rewrite_domain configuration parameter spec-
  47. # ifies a non-empty value. To get the behavior before Post-
  48. # fix 2.2, specify "local_header_rewrite_clients =
  49. # static:all".
  50. #
  51. # Typically, one would use the canonical(5) table to replace
  52. # login names by Firstname.Lastname, or to clean up
  53. # addresses produced by legacy mail systems.
  54. #
  55. # The canonical(5) mapping is not to be confused with vir-
  56. # tual alias support or with local aliasing. To change the
  57. # destination but not the headers, use the virtual(5) or
  58. # aliases(5) map instead.
  59. #
  60. # CASE FOLDING
  61. # The search string is folded to lowercase before database
  62. # lookup. As of Postfix 2.3, the search string is not case
  63. # folded with database types such as regexp: or pcre: whose
  64. # lookup fields can match both upper and lower case.
  65. #
  66. # TABLE FORMAT
  67. # The input format for the postmap(1) command is as follows:
  68. #
  69. # pattern address
  70. # When pattern matches a mail address, replace it by
  71. # the corresponding address.
  72. #
  73. # blank lines and comments
  74. # Empty lines and whitespace-only lines are ignored,
  75. # as are lines whose first non-whitespace character
  76. # is a `#'.
  77. #
  78. # multi-line text
  79. # A logical line starts with non-whitespace text. A
  80. # line that starts with whitespace continues a logi-
  81. # cal line.
  82. #
  83. # TABLE SEARCH ORDER
  84. # With lookups from indexed files such as DB or DBM, or from
  85. # networked tables such as NIS, LDAP or SQL, each
  86. # user@domain query produces a sequence of query patterns as
  87. # described below.
  88. #
  89. # Each query pattern is sent to each specified lookup table
  90. # before trying the next query pattern, until a match is
  91. # found.
  92. #
  93. # user@domain address
  94. # Replace user@domain by address. This form has the
  95. # highest precedence.
  96. #
  97. # This is useful to clean up addresses produced by
  98. # legacy mail systems. It can also be used to pro-
  99. # duce Firstname.Lastname style addresses, but see
  100. # below for a simpler solution.
  101. #
  102. # user address
  103. # Replace user@site by address when site is equal to
  104. # $myorigin, when site is listed in $mydestination,
  105. # or when it is listed in $inet_interfaces or
  106. # $proxy_interfaces.
  107. #
  108. # This form is useful for replacing login names by
  109. # Firstname.Lastname.
  110. #
  111. # @domain address
  112. # Replace other addresses in domain by address. This
  113. # form has the lowest precedence.
  114. #
  115. # Note: @domain is a wild-card. When this form is
  116. # applied to recipient addresses, the Postfix SMTP
  117. # server accepts mail for any recipient in domain,
  118. # regardless of whether that recipient exists. This
  119. # may turn your mail system into a backscatter
  120. # source: Postfix first accepts mail for non-existent
  121. # recipients and then tries to return that mail as
  122. # "undeliverable" to the often forged sender address.
  123. #
  124. # RESULT ADDRESS REWRITING
  125. # The lookup result is subject to address rewriting:
  126. #
  127. # o When the result has the form @otherdomain, the
  128. # result becomes the same user in otherdomain.
  129. #
  130. # o When "append_at_myorigin=yes", append "@$myorigin"
  131. # to addresses without "@domain".
  132. #
  133. # o When "append_dot_mydomain=yes", append ".$mydomain"
  134. # to addresses without ".domain".
  135. #
  136. # ADDRESS EXTENSION
  137. # When a mail address localpart contains the optional recip-
  138. # ient delimiter (e.g., user+foo@domain), the lookup order
  139. # becomes: user+foo@domain, user@domain, user+foo, user, and
  140. # @domain.
  141. #
  142. # The propagate_unmatched_extensions parameter controls
  143. # whether an unmatched address extension (+foo) is propa-
  144. # gated to the result of table lookup.
  145. #
  146. # REGULAR EXPRESSION TABLES
  147. # This section describes how the table lookups change when
  148. # the table is given in the form of regular expressions. For
  149. # a description of regular expression lookup table syntax,
  150. # see regexp_table(5) or pcre_table(5).
  151. #
  152. # Each pattern is a regular expression that is applied to
  153. # the entire address being looked up. Thus, user@domain mail
  154. # addresses are not broken up into their user and @domain
  155. # constituent parts, nor is user+foo broken up into user and
  156. # foo.
  157. #
  158. # Patterns are applied in the order as specified in the ta-
  159. # ble, until a pattern is found that matches the search
  160. # string.
  161. #
  162. # Results are the same as with indexed file lookups, with
  163. # the additional feature that parenthesized substrings from
  164. # the pattern can be interpolated as $1, $2 and so on.
  165. #
  166. # TCP-BASED TABLES
  167. # This section describes how the table lookups change when
  168. # lookups are directed to a TCP-based server. For a descrip-
  169. # tion of the TCP client/server lookup protocol, see tcp_ta-
  170. # ble(5). This feature is not available up to and including
  171. # Postfix version 2.4.
  172. #
  173. # Each lookup operation uses the entire address once. Thus,
  174. # user@domain mail addresses are not broken up into their
  175. # user and @domain constituent parts, nor is user+foo broken
  176. # up into user and foo.
  177. #
  178. # Results are the same as with indexed file lookups.
  179. #
  180. # BUGS
  181. # The table format does not understand quoting conventions.
  182. #
  183. # CONFIGURATION PARAMETERS
  184. # The following main.cf parameters are especially relevant.
  185. # The text below provides only a parameter summary. See
  186. # postconf(5) for more details including examples.
  187. #
  188. # canonical_classes
  189. # What addresses are subject to canonical address
  190. # mapping.
  191. #
  192. # canonical_maps
  193. # List of canonical mapping tables.
  194. #
  195. # recipient_canonical_maps
  196. # Address mapping lookup table for envelope and
  197. # header recipient addresses.
  198. #
  199. # sender_canonical_maps
  200. # Address mapping lookup table for envelope and
  201. # header sender addresses.
  202. #
  203. # propagate_unmatched_extensions
  204. # A list of address rewriting or forwarding mecha-
  205. # nisms that propagate an address extension from the
  206. # original address to the result. Specify zero or
  207. # more of canonical, virtual, alias, forward,
  208. # include, or generic.
  209. #
  210. # Other parameters of interest:
  211. #
  212. # inet_interfaces
  213. # The network interface addresses that this system
  214. # receives mail on. You need to stop and start Post-
  215. # fix when this parameter changes.
  216. #
  217. # local_header_rewrite_clients
  218. # Rewrite message header addresses in mail from these
  219. # clients and update incomplete addresses with the
  220. # domain name in $myorigin or $mydomain; either don't
  221. # rewrite message headers from other clients at all,
  222. # or rewrite message headers and update incomplete
  223. # addresses with the domain specified in the
  224. # remote_header_rewrite_domain parameter.
  225. #
  226. # proxy_interfaces
  227. # Other interfaces that this machine receives mail on
  228. # by way of a proxy agent or network address transla-
  229. # tor.
  230. #
  231. # masquerade_classes
  232. # List of address classes subject to masquerading:
  233. # zero or more of envelope_sender, envelope_recipi-
  234. # ent, header_sender, header_recipient.
  235. #
  236. # masquerade_domains
  237. # List of domains that hide their subdomain struc-
  238. # ture.
  239. #
  240. # masquerade_exceptions
  241. # List of user names that are not subject to address
  242. # masquerading.
  243. #
  244. # mydestination
  245. # List of domains that this mail system considers
  246. # local.
  247. #
  248. # myorigin
  249. # The domain that is appended to locally-posted mail.
  250. #
  251. # owner_request_special
  252. # Give special treatment to owner-xxx and xxx-request
  253. # addresses.
  254. #
  255. # remote_header_rewrite_domain
  256. # Don't rewrite message headers from remote clients
  257. # at all when this parameter is empty; otherwise, re-
  258. # write message headers and append the specified
  259. # domain name to incomplete addresses.
  260. #
  261. # SEE ALSO
  262. # cleanup(8), canonicalize and enqueue mail
  263. # postmap(1), Postfix lookup table manager
  264. # postconf(5), configuration parameters
  265. # virtual(5), virtual aliasing
  266. #
  267. # README FILES
  268. # Use "postconf readme_directory" or "postconf html_direc-
  269. # tory" to locate this information.
  270. # DATABASE_README, Postfix lookup table overview
  271. # ADDRESS_REWRITING_README, address rewriting guide
  272. #
  273. # LICENSE
  274. # The Secure Mailer license must be distributed with this
  275. # software.
  276. #
  277. # AUTHOR(S)
  278. # Wietse Venema
  279. # IBM T.J. Watson Research
  280. # P.O. Box 704
  281. # Yorktown Heights, NY 10598, USA
  282. #
  283. # Wietse Venema
  284. # Google, Inc.
  285. # 111 8th Avenue
  286. # New York, NY 10011, USA
  287. #
  288. # CANONICAL(5)