{
    "mode": "man",
    "parameter": "anvil",
    "section": "8postfix",
    "url": "https://www.chedong.com/phpMan.php/man/anvil/8postfix/json",
    "generated": "2026-10-07T15:38:01Z",
    "synopsis": "anvil [generic Postfix daemon options]",
    "sections": {
        "NAME": {
            "content": "anvil - Postfix session count and request rate control\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "anvil [generic Postfix daemon options]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The Postfix anvil(8) server maintains statistics about client connection counts or client re‐\nquest rates. This information can be used to defend against clients that hammer a server with\neither  too many simultaneous sessions, or with too many successive requests within a config‐\nurable time interval.  This server is designed to run under control by the Postfix  master(8)\nserver.\n\nIn  the  following text, ident specifies a (service, client) combination. The exact syntax of\nthat information is application-dependent; the anvil(8) server does not care.\n",
            "subsections": []
        },
        "CONNECTION COUNT/RATE CONTROL": {
            "content": "To register a new connection send the following request to the anvil(8) server:\n\nrequest=connect\nident=string\n\nThe anvil(8) server answers with the number of simultaneous connections  and  the  number  of\nconnections per unit time for the (service, client) combination specified with ident:\n\nstatus=0\ncount=number\nrate=number\n\nTo register a disconnect event send the following request to the anvil(8) server:\n\nrequest=disconnect\nident=string\n\nThe anvil(8) server replies with:\n\nstatus=0\n",
            "subsections": []
        },
        "MESSAGE RATE CONTROL": {
            "content": "To register a message delivery request send the following request to the anvil(8) server:\n\nrequest=message\nident=string\n\nThe  anvil(8)  server  answers with the number of message delivery requests per unit time for\nthe (service, client) combination specified with ident:\n\nstatus=0\nrate=number\n",
            "subsections": []
        },
        "RECIPIENT RATE CONTROL": {
            "content": "To register a recipient request send the following request to the anvil(8) server:\n\nrequest=recipient\nident=string\n\nThe anvil(8) server answers with the number of recipient addresses  per  unit  time  for  the\n(service, client) combination specified with ident:\n\nstatus=0\nrate=number\n",
            "subsections": []
        },
        "TLS SESSION NEGOTIATION RATE CONTROL": {
            "content": "The features described in this section are available with Postfix 2.3 and later.\n\nTo  register  a request for a new (i.e. not cached) TLS session send the following request to\nthe anvil(8) server:\n\nrequest=newtls\nident=string\n\nThe anvil(8) server answers with the number of new TLS session requests per unit time for the\n(service, client) combination specified with ident:\n\nstatus=0\nrate=number\n\nTo retrieve new TLS session request rate information without updating  the  counter  informa‐\ntion, send:\n\nrequest=newtlsreport\nident=string\n\nThe anvil(8) server answers with the number of new TLS session requests per unit time for the\n(service, client) combination specified with ident:\n\nstatus=0\nrate=number\n",
            "subsections": []
        },
        "AUTH RATE CONTROL": {
            "content": "To register an AUTH request send the following request to the anvil(8) server:\n\nrequest=auth\nident=string\n\nThe  anvil(8) server answers with the number of auth requests per unit time for the (service,\nclient) combination specified with ident:\n\nstatus=0\nrate=number\n",
            "subsections": []
        },
        "SECURITY": {
            "content": "The anvil(8) server does not talk to the network or to local users, and can run  chrooted  at\nfixed low privilege.\n\nThe  anvil(8)  server  maintains an in-memory table with information about recent clients re‐\nquests.  No persistent state is kept because standard system library routines are not  suffi‐\nciently robust for update-intensive applications.\n\nAlthough  the  in-memory  state is kept only temporarily, this may require a lot of memory on\nsystems that handle connections from many remote clients.  To reduce memory usage, reduce the\ntime unit over which state is kept.\n",
            "subsections": []
        },
        "DIAGNOSTICS": {
            "content": "Problems and transactions are logged to syslogd(8) or postlogd(8).\n\nUpon exit, and every anvilstatusupdatetime seconds, the server logs the maximal count  and\nrate values measured, together with (service, client) information and the time of day associ‐\nated with those events.  In order to avoid unnecessary overhead, no measurements are done for\nactivity that isn't concurrency limited or rate limited.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Systems  behind network address translating routers or proxies appear to have the same client\naddress and can run into connection count and/or rate limits falsely.\n\nIn this preliminary implementation, a count (or rate) limited server process  can  have  only\none remote client at a time. If a server process reports multiple simultaneous clients, state\nis kept only for the last reported client.\n\nThe  anvil(8)  server automatically discards client request information after it expires.  To\nprevent the anvil(8) server from discarding client request rate information too early or  too\nlate,  a  rate  limited service should always register connect/disconnect events even when it\ndoes not explicitly limit them.\n",
            "subsections": []
        },
        "CONFIGURATION PARAMETERS": {
            "content": "On low-traffic mail systems, changes to main.cf  are  picked  up  automatically  as  anvil(8)\nprocesses  run  for  only  a  limited  amount of time. On other mail systems, use the command\n\"postfix reload\" to speed up a change.\n\nThe text below provides only a parameter summary. See postconf(5) for more details  including\nexamples.\n",
            "subsections": [
                {
                    "name": "anvil_rate_time_unit (60s)",
                    "content": "The time unit over which client connection rates and other rates are calculated.\n"
                },
                {
                    "name": "anvil_status_update_time (600s)",
                    "content": "How frequently the anvil(8) connection and rate limiting server logs peak usage infor‐\nmation.\n"
                },
                {
                    "name": "config_directory (see 'postconf -d' output)",
                    "content": "The default location of the Postfix main.cf and master.cf configuration files.\n"
                },
                {
                    "name": "daemon_timeout (18000s)",
                    "content": "How  much time a Postfix daemon process may take to handle a request before it is ter‐\nminated by a built-in watchdog timer.\n"
                },
                {
                    "name": "ipc_timeout (3600s)",
                    "content": "The time limit for sending or receiving information  over  an  internal  communication\nchannel.\n"
                },
                {
                    "name": "max_idle (100s)",
                    "content": "The  maximum  amount of time that an idle Postfix daemon process waits for an incoming\nconnection before terminating voluntarily.\n"
                },
                {
                    "name": "max_use (100)",
                    "content": "The maximal number of incoming connections that a Postfix daemon process will  service\nbefore terminating voluntarily.\n"
                },
                {
                    "name": "process_id (read-only)",
                    "content": "The process ID of a Postfix command or daemon process.\n"
                },
                {
                    "name": "process_name (read-only)",
                    "content": "The process name of a Postfix command or daemon process.\n"
                },
                {
                    "name": "syslog_facility (mail)",
                    "content": "The syslog facility of Postfix logging.\n"
                },
                {
                    "name": "syslog_name (see 'postconf -d' output)",
                    "content": "A  prefix  that is prepended to the process name in syslog records, so that, for exam‐\nple, \"smtpd\" becomes \"prefix/smtpd\".\n\nAvailable in Postfix 3.3 and later:\n"
                },
                {
                    "name": "service_name (read-only)",
                    "content": "The master.cf service name of a Postfix daemon process.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "smtpd(8), Postfix SMTP server\npostconf(5), configuration parameters\nmaster(5), generic daemon options\n",
            "subsections": []
        },
        "README FILES": {
            "content": "Use \"postconf readmedirectory\" or \"postconf htmldirectory\" to locate this information.\nTUNINGREADME, performance tuning\n",
            "subsections": []
        },
        "LICENSE": {
            "content": "The Secure Mailer license must be distributed with this software.\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "The anvil service is available in Postfix 2.2 and later.\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\nANVIL(8postfix)",
            "subsections": []
        }
    },
    "summary": "anvil - Postfix session count and request rate control",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "smtpd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/smtpd/8/json"
        },
        {
            "name": "postconf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/postconf/5/json"
        },
        {
            "name": "master",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/master/5/json"
        }
    ]
}