{
    "mode": "man",
    "parameter": "anvil",
    "section": "8postfix",
    "url": "https://www.chedong.com/phpMan.php/man/anvil/8postfix/json",
    "generated": "2026-06-14T07:25:54Z",
    "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)  pro‐\ncesses run for only a limited amount of time. On other mail systems, use the command \"postfix\nreload\" to speed up a change.\n\nThe text below provides only a parameter summary. See postconf(5) for more details  including\nexamples.\n\nanvilratetimeunit (60s)\nThe time unit over which client connection rates and other rates are calculated.\n\nanvilstatusupdatetime (600s)\nHow frequently the anvil(8) connection and rate limiting server logs peak usage infor‐\nmation.\n\nconfigdirectory (see 'postconf -d' output)\nThe default location of the Postfix main.cf and master.cf configuration files.\n\ndaemontimeout (18000s)\nHow much time a Postfix daemon process may take to handle a request before it is  ter‐\nminated by a built-in watchdog timer.\n\nipctimeout (3600s)\nThe  time  limit  for  sending or receiving information over an internal communication\nchannel.\n\nmaxidle (100s)\nThe maximum amount of time that an idle Postfix daemon process waits for  an  incoming\nconnection before terminating voluntarily.\n\nmaxuse (100)\nThe  maximal number of incoming connections that a Postfix daemon process will service\nbefore terminating voluntarily.\n\nprocessid (read-only)\nThe process ID of a Postfix command or daemon process.\n\nprocessname (read-only)\nThe process name of a Postfix command or daemon process.\n\nsyslogfacility (mail)\nThe syslog facility of Postfix logging.\n\nsyslogname (see 'postconf -d' output)\nA 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\nservicename (read-only)\nThe master.cf service name of a Postfix daemon process.\n",
            "subsections": []
        },
        "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\n\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"
        }
    ]
}