{
    "content": [
        {
            "type": "text",
            "text": "# memcache_table (man)\n\n## NAME\n\nmemcachetable - Postfix memcache client configuration\n\n## SYNOPSIS\n\npostmap -q \"string\" memcache:/etc/postfix/filename\npostmap -q - memcache:/etc/postfix/filename <inputfile\n\n## DESCRIPTION\n\nThe Postfix mail system uses optional tables for address rewriting or mail routing. These ta‐\nbles are usually in dbm or db format.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **MEMCACHE MAIN PARAMETERS** (4 subsections)\n- **MEMCACHE KEY PARAMETERS** (2 subsections)\n- **MEMCACHE ERROR CONTROLS** (5 subsections)\n- **BUGS**\n- **SEE ALSO**\n- **README FILES**\n- **LICENSE**\n- **HISTORY**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "memcache_table",
        "section": "",
        "mode": "man",
        "summary": "memcachetable - Postfix memcache client configuration",
        "synopsis": "postmap -q \"string\" memcache:/etc/postfix/filename\npostmap -q - memcache:/etc/postfix/filename <inputfile",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "postmap",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/postmap/1/json"
            },
            {
                "name": "postconf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/postconf/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "MEMCACHE MAIN PARAMETERS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "memcache (default: inet:localhost:11211)",
                        "lines": 13
                    },
                    {
                        "name": "backup (default: undefined)",
                        "lines": 26
                    },
                    {
                        "name": "flags (default: 0)",
                        "lines": 3
                    },
                    {
                        "name": "ttl (default: 3600)",
                        "lines": 11
                    }
                ]
            },
            {
                "name": "MEMCACHE KEY PARAMETERS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "key_format (default: %s)",
                        "lines": 41
                    },
                    {
                        "name": "domain (default: no domain list)",
                        "lines": 8
                    }
                ]
            },
            {
                "name": "MEMCACHE ERROR CONTROLS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "data_size_limit (default: 10240)",
                        "lines": 2
                    },
                    {
                        "name": "line_size_limit (default: 1024)",
                        "lines": 2
                    },
                    {
                        "name": "max_try (default: 2)",
                        "lines": 3
                    },
                    {
                        "name": "retry_pause (default: 1)",
                        "lines": 2
                    },
                    {
                        "name": "timeout (default: 2)",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "README FILES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 14,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "memcachetable - Postfix memcache client configuration\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "postmap -q \"string\" memcache:/etc/postfix/filename\n\npostmap -q - memcache:/etc/postfix/filename <inputfile\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The Postfix mail system uses optional tables for address rewriting or mail routing. These ta‐\nbles are usually in dbm or db format.\n\nAlternatively,  lookup  tables  can  be  specified  as  memcache  instances.  To use memcache\nlookups, define a memcache source as a lookup table in main.cf, for example:\n\nvirtualaliasmaps = memcache:/etc/postfix/memcache-aliases.cf\n\nThe file /etc/postfix/memcache-aliases.cf has the same format as the  Postfix  main.cf  file,\nand specifies the parameters described below.\n\nThe Postfix memcache client supports the lookup, update, delete and sequence (first/next) op‐\nerations. The sequence operation requires a backup database that supports the operation.\n",
                "subsections": []
            },
            "MEMCACHE MAIN PARAMETERS": {
                "content": "",
                "subsections": [
                    {
                        "name": "memcache (default: inet:localhost:11211)",
                        "content": "The  memcache  server (note: singular) that Postfix will try to connect to.  For a TCP\nserver specify \"inet:\" followed by a hostname or address, \":\", and a port name or num‐\nber.  Specify an IPv6 address inside \"[]\".  For a UNIX-domain server  specify  \"unix:\"\nfollowed by the socket pathname. Examples:\n\nmemcache = inet:memcache.example.com:11211\nmemcache = inet:127.0.0.1:11211\nmemcache = inet:[fc00:8d00:189::3]:11211\nmemcache = unix:/path/to/socket\n\nNOTE:  to  access a UNIX-domain socket with the proxymap(8) server, the socket must be\naccessible by the unprivileged postfix user.\n"
                    },
                    {
                        "name": "backup (default: undefined)",
                        "content": "An optional Postfix database that provides persistent backup for  the  memcache  data‐\nbase.  The Postfix memcache client will update the memcache database whenever it looks\nup or changes information in the persistent database. Specify a  Postfix  \"type:table\"\ndatabase. Examples:\n\n# Non-shared postscreen cache.\nbackup = btree:/var/lib/postfix/postscreencachemap\n\n# Shared postscreen cache for processes on the same host.\nbackup = proxy:btree:/var/lib/postfix/postscreencachemap\n\nAccess to remote proxymap servers is under development.\n\nNOTE  1: When sharing a persistent postscreen(8) or verify(8) cache, disable automatic\ncache cleanup (set *cachecleanupinterval = 0) except with one Postfix instance that\nwill be responsible for cache cleanup.\n\nNOTE 2: When multiple tables share the same memcache database, each table  should  use\nthe keyformat feature (see below) to prepend its own unique string to the lookup key.\nOtherwise, automatic postscreen(8) or verify(8) cache cleanup may not work.\n\nNOTE  3:  When  the backup database is accessed with \"proxy:\" lookups, the full backup\ndatabase name (including the \"proxy:\"  prefix)  must  be  specified  in  the  proxymap\nserver's  proxyreadmaps or proxywritemaps setting (depending on whether the access\nis read-only or read-write).\n"
                    },
                    {
                        "name": "flags (default: 0)",
                        "content": "Optional flags that should be stored along with a memcache update. The flags  are  ig‐\nnored when looking up information.\n"
                    },
                    {
                        "name": "ttl (default: 3600)",
                        "content": "The expiration time in seconds of memcache updates.\n\nNOTE  1:  When using a memcache table as postscreen(8) or verify(8) cache without per‐\nsistent backup, specify a zero *cachecleanupinterval value  with  all  Postfix  in‐\nstances  that  use  the memcache, and specify the largest postscreen(8) *ttl value or\nverify(8) *expiretime value as the memcache table's ttl value.\n\nNOTE 2: According to memcache protocol documentation, a value  greater  than  30  days\n(2592000  seconds)  specifies  absolute  UNIX time. Smaller values are relative to the\ntime of the update.\n"
                    }
                ]
            },
            "MEMCACHE KEY PARAMETERS": {
                "content": "",
                "subsections": [
                    {
                        "name": "key_format (default: %s)",
                        "content": "Format of the lookup and update keys that the Postfix memcache  client  sends  to  the\nmemcache  server.   By  default, these are the same as the lookup and update keys that\nthe memcache client receives from Postfix applications.\n\nNOTE 1: The keyformat feature is not used for backup database requests.\n\nNOTE 2: When multiple tables share the  same  memcache  database,  each  table  should\nprepend  its  own unique string to the lookup key.  Otherwise, automatic postscreen(8)\nor verify(8) cache cleanup may not work.\n\nExamples:\n\nkeyformat = aliases:%s\nkeyformat = verify:%s\nkeyformat = postscreen:%s\n\nThe keyformat parameter supports the following '%' expansions:\n\n%%     This is replaced by a literal '%' character.\n\n%s     This is replaced by the memcache client input key.\n\n%u     When the input key is an address of the form user@domain, %u is replaced by the\nSQL quoted local part of the address.  Otherwise, %u is replaced by the  entire\nsearch  string.  If the localpart is empty, a lookup is silently suppressed and\nreturns no results (an update is skipped with a warning).\n\n%d     When the input key is an address of the form user@domain, %d is replaced by the\ndomain part of the address.  Otherwise, a lookup is silently suppressed and re‐\nturns no results (an update is skipped with a warning).\n\n%[SUD] The upper-case equivalents of the above expansions behave in the keyformat pa‐\nrameter identically to their lower-case counter-parts.\n\n%[1-9] The patterns %1, %2, ... %9 are replaced by the corresponding most  significant\ncomponent of the input key's domain. If the input key is user@mail.example.com,\nthen  %1  is com, %2 is example and %3 is mail. If the input key is unqualified\nor does not have enough domain components to satisfy  all  the  specified  pat‐\nterns,  a  lookup  is  silently suppressed and returns no results (an update is\nskipped with a warning).\n"
                    },
                    {
                        "name": "domain (default: no domain list)",
                        "content": "This feature can significantly reduce database server load.  Specify a list of  domain\nnames,  paths  to files, or \"type:table\" databases.  When specified, only fully quali‐\nfied search keys with a *non-empty* localpart and a matching domain are  eligible  for\nlookup  or  update: bare 'user' lookups, bare domain lookups and \"@domain\" lookups are\nsilently skipped (updates are skipped with a warning).  Example:\n\ndomain = example.com, hash:/etc/postfix/searchdomains\n"
                    }
                ]
            },
            "MEMCACHE ERROR CONTROLS": {
                "content": "",
                "subsections": [
                    {
                        "name": "data_size_limit (default: 10240)",
                        "content": "The maximal memcache reply data length in bytes.\n"
                    },
                    {
                        "name": "line_size_limit (default: 1024)",
                        "content": "The maximal memcache reply line length in bytes.\n"
                    },
                    {
                        "name": "max_try (default: 2)",
                        "content": "The number of times to try a memcache command before giving up.  The  memcache  client\ndoes not retry a command when the memcache server accepts no connection.\n"
                    },
                    {
                        "name": "retry_pause (default: 1)",
                        "content": "The time in seconds before retrying a failed memcache command.\n"
                    },
                    {
                        "name": "timeout (default: 2)",
                        "content": "The time limit for sending a memcache command and for receiving a memcache reply.\n"
                    }
                ]
            },
            "BUGS": {
                "content": "The  Postfix  memcache client cannot be used for security-sensitive tables such as aliasmaps\n(these may contain  \"|command  and  \"/file/name\"  destinations),  or  virtualuidmaps,  vir‐\ntualgidmaps and virtualmailboxmaps (these specify UNIX process privileges or \"/file/name\"\ndestinations).   In  a typical deployment a memcache database is writable by any process that\ncan talk to the memcache  server;  in  contrast,  security-sensitive  tables  must  never  be\nwritable by the unprivileged Postfix user.\n\nThe  Postfix  memcache client requires additional configuration when used as postscreen(8) or\nverify(8) cache.  For details see the backup and ttl parameter discussions  in  the  MEMCACHE\nMAIN PARAMETERS section above.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "postmap(1), Postfix lookup table manager\npostconf(5), configuration parameters\n",
                "subsections": []
            },
            "README FILES": {
                "content": "Use \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nDATABASEREADME, Postfix lookup table overview\nMEMCACHEREADME, Postfix memcache client guide\n",
                "subsections": []
            },
            "LICENSE": {
                "content": "The Secure Mailer license must be distributed with this software.\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "Memcache support was introduced with Postfix version 2.9.\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\nMEMCACHETABLE(5)",
                "subsections": []
            }
        }
    }
}