{
    "mode": "man",
    "parameter": "transport",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/transport/5/json",
    "generated": "2026-11-08T04:53:32Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "transport - Postfix transport table format\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "postmap /etc/postfix/transport",
                    "content": "postmap -q \"string\" /etc/postfix/transport\n\npostmap -q - /etc/postfix/transport <inputfile\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The  optional transport(5) table specifies a mapping from email addresses to message delivery\ntransports and next-hop destinations.  Message delivery transports such as local or smtp  are\ndefined in the master.cf file, and next-hop destinations are typically hosts or domain names.\nThe table is searched by the trivial-rewrite(8) daemon.\n\nThis mapping overrides the default transport:nexthop selection that is built into Postfix:\n",
            "subsections": [
                {
                    "name": "local_transport (default: local:$myhostname)",
                    "content": "This  is  the default for final delivery to domains listed with mydestination, and for\n[ipaddress] destinations that match $inetinterfaces or $proxyinterfaces. The default\nnexthop destination is the MTA hostname.\n"
                },
                {
                    "name": "virtual_transport (default: virtual:)",
                    "content": "This is the default for final delivery to domains listed with virtualmailboxdomains.\nThe default nexthop destination is the recipient domain.\n"
                },
                {
                    "name": "relay_transport (default: relay:)",
                    "content": "This is the default for remote delivery to domains listed with relaydomains. In order\nof decreasing precedence, the  nexthop  destination  is  taken  from  relaytransport,\nsenderdependentrelayhostmaps, relayhost, or from the recipient domain.\n"
                },
                {
                    "name": "default_transport (default: smtp:)",
                    "content": "This is the default for remote delivery to other destinations.  In order of decreasing\nprecedence,  the  nexthop  destination  is  taken from senderdependentdefaulttrans‐\nportmaps, defaulttransport, senderdependentrelayhostmaps, relayhost, or from  the\nrecipient domain.\n\nNormally,  the  transport(5)  table  is  specified as a text file that serves as input to the\npostmap(1) command.  The result, an indexed file in dbm  or  db  format,  is  used  for  fast\nsearching by the mail system. Execute the command \"postmap /etc/postfix/transport\" to rebuild\nan indexed file after changing the corresponding transport table.\n\nWhen  the  table  is  provided via other means such as NIS, LDAP or SQL, the same lookups are\ndone as for ordinary indexed files.\n\nAlternatively, the table can be provided as a regular-expression map where patterns are given\nas regular expressions, or lookups can be directed to a TCP-based server. In those case,  the\nlookups are done in a slightly different way as described below under \"REGULAR EXPRESSION TA‐\nBLES\" or \"TCP-BASED TABLES\".\n"
                }
            ]
        },
        "CASE FOLDING": {
            "content": "The  search  string  is  folded  to  lowercase before database lookup. As of Postfix 2.3, the\nsearch string is not case folded with database types such as regexp: or  pcre:  whose  lookup\nfields can match both upper and lower case.\n",
            "subsections": []
        },
        "TABLE FORMAT": {
            "content": "The input format for the postmap(1) command is as follows:\n\npattern result\nWhen pattern matches the recipient address or domain, use the corresponding result.\n\nblank lines and comments\nEmpty lines and whitespace-only lines are ignored, as are lines whose first non-white‐\nspace character is a `#'.\n\nmulti-line text\nA  logical  line  starts  with non-whitespace text. A line that starts with whitespace\ncontinues a logical line.\n\nThe pattern specifies an email address, a domain name, or a domain  name  hierarchy,  as  de‐\nscribed in section \"TABLE SEARCH ORDER\".\n\nThe  result is of the form transport:nexthop and specifies how or where to deliver mail. This\nis described in section \"RESULT FORMAT\".\n",
            "subsections": []
        },
        "TABLE SEARCH ORDER": {
            "content": "With lookups from indexed files such as DB or DBM, or from networked tables such as NIS, LDAP\nor SQL, patterns are tried in the order as listed below:\n\nuser+extension@domain transport:nexthop\nDeliver mail for user+extension@domain through transport to nexthop.\n\nuser@domain transport:nexthop\nDeliver mail for user@domain through transport to nexthop.\n\ndomain transport:nexthop\nDeliver mail for domain through transport to nexthop.\n\n.domain transport:nexthop\nDeliver mail for any subdomain of domain through transport to  nexthop.  This  applies\nonly  when the string transportmaps is not listed in the parentdomainmatchessubdo‐\nmains configuration setting.  Otherwise, a domain name matches itself and  its  subdo‐\nmains.\n\n* transport:nexthop\nThe  special pattern * represents any address (i.e. it functions as the wild-card pat‐\ntern, and is unique to Postfix transport tables).\n\nNote 1: the null recipient address is looked up as $emptyaddressrecipient@$myhostname  (de‐\nfault: mailer-daemon@hostname).\n\nNote 2: user@domain or user+extension@domain lookup is available in Postfix 2.0 and later.\n",
            "subsections": []
        },
        "RESULT FORMAT": {
            "content": "The lookup result is of the form transport:nexthop.  The transport field specifies a mail de‐\nlivery  transport such as smtp or local. The nexthop field specifies where and how to deliver\nmail.\n\nThe transport field specifies the name of a mail delivery transport (the first name of a mail\ndelivery service entry in the Postfix master.cf file).\n\nThe nexthop field usually specifies one recipient domain or hostname.  In  the  case  of  the\nPostfix  SMTP/LMTP client, the nexthop field may contain a list of nexthop destinations sepa‐\nrated by comma or whitespace (Postfix 3.5 and later).\n\nThe syntax of a nexthop destination is transport dependent.  With SMTP, specify a service  on\na  non-default  port as host:service, and disable MX (mail exchanger) DNS lookups with [host]\nor [host]:port. The [] form is required when you specify an IP address instead of a hostname.\n\nA null transport and null nexthop field means \"do not change\": use the delivery transport and\nnexthop information that would be used when the entire transport table did not exist.\n\nA non-null transport field with a null nexthop field resets the nexthop  information  to  the\nrecipient domain.\n\nA null transport field with non-null nexthop field does not modify the transport information.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "In  order  to  deliver  internal  mail directly, while using a mail relay for all other mail,\nspecify a null entry for internal destinations (do not change the delivery transport  or  the\nnexthop information) and specify a wildcard for all other destinations.\n\nmy.domain    :\n.my.domain   :\n*            smtp:outbound-relay.my.domain\n\nIn  order  to send mail for example.com and its subdomains via the uucp transport to the UUCP\nhost named example:\n\nexample.com      uucp:example\n.example.com     uucp:example\n\nWhen no nexthop host name is specified, the destination domain name is used instead. For  ex‐\nample,  the  following directs mail for user@example.com via the slow transport to a mail ex‐\nchanger for example.com.  The slow transport could be configured to run at most one  delivery\nprocess at a time:\n\nexample.com      slow:\n\nWhen  no  transport  is specified, Postfix uses the transport that matches the address domain\nclass (see DESCRIPTION above).  The following sends all mail for example.com and  its  subdo‐\nmains to host gateway.example.com:\n\nexample.com      :[gateway.example.com]\n.example.com     :[gateway.example.com]\n\nIn the above example, the [] suppress MX lookups.  This prevents mail routing loops when your\nmachine is primary MX host for example.com.\n\nIn  the  case  of  delivery  via SMTP or LMTP, one may specify host:service instead of just a\nhost:\n\nexample.com      smtp:bar.example:2025\n\nThis directs mail for user@example.com to host bar.example port 2025. Instead of a  numerical\nport  a  symbolic name may be used. Specify [] around the hostname if MX lookups must be dis‐\nabled.\n\nDeliveries via SMTP or LMTP support multiple destinations (Postfix >= 3.5):\n\nexample.com      smtp:bar.example, foo.example\n\nThis tries to deliver to bar.example before trying to deliver to foo.example.\n\nThe error mailer can be used to bounce mail:\n\n.example.com     error:mail for *.example.com is not deliverable\n\nThis causes all mail for user@anything.example.com to be bounced.\n",
            "subsections": []
        },
        "REGULAR EXPRESSION TABLES": {
            "content": "This section describes how the table lookups change when the table is given in  the  form  of\nregular  expressions.  For  a description of regular expression lookup table syntax, see reg‐\nexptable(5) or pcretable(5).\n\nEach pattern is a regular expression that is applied to the entire address being  looked  up.\nThus,  some.domain.hierarchy  is not looked up via its parent domains, nor is user+foo@domain\nlooked up as user@domain.\n\nPatterns are applied in the order as specified in the table, until a pattern  is  found  that\nmatches the search string.\n\nThe trivial-rewrite(8) server disallows regular expression substitution of $1 etc. in regular\nexpression  lookup  tables,  because that could open a security hole (Postfix version 2.3 and\nlater).\n",
            "subsections": []
        },
        "TCP-BASED TABLES": {
            "content": "This section describes how the table lookups change when lookups are directed to a  TCP-based\nserver.  For  a description of the TCP client/server lookup protocol, see tcptable(5).  This\nfeature is not available up to and including Postfix version 2.4.\n\nEach lookup operation uses the entire recipient address once.  Thus, some.domain.hierarchy is\nnot looked up via its parent domains, nor is user+foo@domain looked up as user@domain.\n\nResults are the same as with indexed file lookups.\n",
            "subsections": []
        },
        "CONFIGURATION PARAMETERS": {
            "content": "The following main.cf parameters are especially relevant.  The text below provides only a pa‐\nrameter summary. See postconf(5) for more details including examples.\n",
            "subsections": [
                {
                    "name": "empty_address_recipient (MAILER-DAEMON)",
                    "content": "The recipient of mail addressed to the null address.\n"
                },
                {
                    "name": "parent_domain_matches_subdomains (see 'postconf -d' output)",
                    "content": "A list of Postfix features where the pattern \"example.com\" also matches subdomains  of\nexample.com, instead of requiring an explicit \".example.com\" pattern.\n"
                },
                {
                    "name": "transport_maps (empty)",
                    "content": "Optional  lookup  tables  with  mappings  from  recipient address to (message delivery\ntransport, next-hop destination).\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "trivial-rewrite(8), rewrite and resolve addresses\nmaster(5), master.cf file format\npostconf(5), configuration parameters\npostmap(1), Postfix lookup table manager\n",
            "subsections": []
        },
        "README FILES": {
            "content": "Use \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nADDRESSREWRITINGREADME, address rewriting guide\nDATABASEREADME, Postfix lookup table overview\nFILTERREADME, external content filter\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "The Secure Mailer license must be distributed with this software.\n\nAUTHOR(S)\nWietse Venema\nIBM T.J. Watson Research\nP.O. Box 704\nYorktown Heights, NY 10598, USA\n\nWietse Venema\nGoogle, Inc.\n111 8th Avenue\nNew York, NY 10011, USA\n\nTRANSPORT(5)",
            "subsections": []
        }
    },
    "summary": "transport - Postfix transport table format",
    "flags": [],
    "examples": [
        "In  order  to  deliver  internal  mail directly, while using a mail relay for all other mail,",
        "specify a null entry for internal destinations (do not change the delivery transport  or  the",
        "nexthop information) and specify a wildcard for all other destinations.",
        "my.domain    :",
        ".my.domain   :",
        "*            smtp:outbound-relay.my.domain",
        "In  order  to send mail for example.com and its subdomains via the uucp transport to the UUCP",
        "host named example:",
        "example.com      uucp:example",
        ".example.com     uucp:example",
        "When no nexthop host name is specified, the destination domain name is used instead. For  ex‐",
        "ample,  the  following directs mail for user@example.com via the slow transport to a mail ex‐",
        "changer for example.com.  The slow transport could be configured to run at most one  delivery",
        "process at a time:",
        "example.com      slow:",
        "When  no  transport  is specified, Postfix uses the transport that matches the address domain",
        "class (see DESCRIPTION above).  The following sends all mail for example.com and  its  subdo‐",
        "mains to host gateway.example.com:",
        "example.com      :[gateway.example.com]",
        ".example.com     :[gateway.example.com]",
        "In the above example, the [] suppress MX lookups.  This prevents mail routing loops when your",
        "machine is primary MX host for example.com.",
        "In  the  case  of  delivery  via SMTP or LMTP, one may specify host:service instead of just a",
        "host:",
        "example.com      smtp:bar.example:2025",
        "This directs mail for user@example.com to host bar.example port 2025. Instead of a  numerical",
        "port  a  symbolic name may be used. Specify [] around the hostname if MX lookups must be dis‐",
        "abled.",
        "Deliveries via SMTP or LMTP support multiple destinations (Postfix >= 3.5):",
        "example.com      smtp:bar.example, foo.example",
        "This tries to deliver to bar.example before trying to deliver to foo.example.",
        "The error mailer can be used to bounce mail:",
        ".example.com     error:mail for *.example.com is not deliverable",
        "This causes all mail for user@anything.example.com to be bounced."
    ],
    "see_also": [
        {
            "name": "trivial-rewrite",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/trivial-rewrite/8/json"
        },
        {
            "name": "master",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/master/5/json"
        },
        {
            "name": "postconf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/postconf/5/json"
        },
        {
            "name": "postmap",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/postmap/1/json"
        }
    ]
}