{"id":1039,"date":"2017-01-28T20:55:12","date_gmt":"2017-01-29T01:55:12","guid":{"rendered":"http:\/\/easy-admin.ca\/?p=1039"},"modified":"2017-01-28T20:55:12","modified_gmt":"2017-01-29T01:55:12","slug":"postfixanvil","status":"publish","type":"post","link":"https:\/\/easy-admin.ca\/index.php\/2017\/01\/28\/postfixanvil\/","title":{"rendered":"postfix\/anvil"},"content":{"rendered":"<pre>ANVIL(8)                                                              ANVIL(8)\r\n\r\n<b>NAME<\/b>\r\n       anvil - Postfix session count and request rate control\r\n\r\n<b>SYNOPSIS<\/b>\r\n       <b>anvil<\/b> [generic Postfix daemon options]\r\n\r\n<b>DESCRIPTION<\/b>\r\n       The  Postfix  <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server maintains statistics about client connec-\r\n       tion counts or client request rates. This information can  be  used  to\r\n       defend against clients that hammer a server with either too many simul-\r\n       taneous sessions, or with too many successive requests within a config-\r\n       urable  time interval.  This server is designed to run under control by\r\n       the Postfix <a href=\"http:\/\/www.postfix.org\/master.8.html\"><b>master<\/b>(8)<\/a> server.\r\n\r\n       In the following text, <b>ident<\/b> specifies a (service, client) combination.\r\n       The  exact  syntax  of  that  information is application-dependent; the\r\n       <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server does not care.\r\n\r\n<b>CONNECTION COUNT\/RATE CONTROL<\/b>\r\n       To register a new connection send the following request to the <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a>\r\n       server:\r\n\r\n           <b>request=connect<\/b>\r\n           <b>ident=<\/b><i>string<\/i>\r\n\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server answers with the number of simultaneous connections\r\n       and the number of connections per unit time for the  (service,  client)\r\n       combination specified with <b>ident<\/b>:\r\n\r\n           <b>status=0<\/b>\r\n           <b>count=<\/b><i>number<\/i>\r\n           <b>rate=<\/b><i>number<\/i>\r\n\r\n       To  register  a  disconnect  event  send  the  following request to the\r\n       <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server:\r\n\r\n           <b>request=disconnect<\/b>\r\n           <b>ident=<\/b><i>string<\/i>\r\n\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server replies with:\r\n\r\n           <b>status=0<\/b>\r\n\r\n<b>MESSAGE RATE CONTROL<\/b>\r\n       To register a message delivery request send the  following  request  to\r\n       the <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server:\r\n\r\n           <b>request=message<\/b>\r\n           <b>ident=<\/b><i>string<\/i>\r\n\r\n       The  <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a>  server  answers  with  the  number  of  message delivery\r\n       requests per unit time for the (service, client) combination  specified\r\n       with <b>ident<\/b>:\r\n\r\n           <b>status=0<\/b>\r\n           <b>rate=<\/b><i>number<\/i>\r\n\r\n<b>RECIPIENT RATE CONTROL<\/b>\r\n       To  register  a  recipient  request  send  the following request to the\r\n       <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server:\r\n\r\n           <b>request=recipient<\/b>\r\n           <b>ident=<\/b><i>string<\/i>\r\n\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server answers with the number of recipient addresses  per\r\n       unit time for the (service, client) combination specified with <b>ident<\/b>:\r\n\r\n           <b>status=0<\/b>\r\n           <b>rate=<\/b><i>number<\/i>\r\n\r\n<b>TLS SESSION NEGOTIATION RATE CONTROL<\/b>\r\n       The  features  described in this section are available with Postfix 2.3\r\n       and later.\r\n\r\n       To register a request for a new (i.e. not cached) TLS session send  the\r\n       following request to the <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server:\r\n\r\n           <b>request=newtls<\/b>\r\n           <b>ident=<\/b><i>string<\/i>\r\n\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server answers with the number of new TLS session requests\r\n       per unit time for the  (service,  client)  combination  specified  with\r\n       <b>ident<\/b>:\r\n\r\n           <b>status=0<\/b>\r\n           <b>rate=<\/b><i>number<\/i>\r\n\r\n       To  retrieve  new TLS session request rate information without updating\r\n       the counter information, send:\r\n\r\n           <b>request=newtls_report<\/b>\r\n           <b>ident=<\/b><i>string<\/i>\r\n\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server answers with the number of new TLS session requests\r\n       per  unit  time  for  the  (service, client) combination specified with\r\n       <b>ident<\/b>:\r\n\r\n           <b>status=0<\/b>\r\n           <b>rate=<\/b><i>number<\/i>\r\n\r\n<b>AUTH RATE CONTROL<\/b>\r\n       To register an AUTH request send the following request to the  <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a>\r\n       server:\r\n\r\n           <b>request=auth<\/b>\r\n           <b>ident=<\/b><i>string<\/i>\r\n\r\n       The  <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a>  server answers with the number of auth requests per unit\r\n       time for the (service, client) combination specified with <b>ident<\/b>:\r\n\r\n           <b>status=0<\/b>\r\n           <b>rate=<\/b><i>number<\/i>\r\n\r\n<b>SECURITY<\/b>\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server does not talk to the network or to local users, and\r\n       can run chrooted at fixed low privilege.\r\n\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server maintains an in-memory table with information about\r\n       recent clients requests.  No persistent state is kept because  standard\r\n       system  library  routines are not sufficiently robust for update-inten-\r\n       sive applications.\r\n\r\n       Although the in-memory state is kept only temporarily, this may require\r\n       a  lot  of  memory  on systems that handle connections from many remote\r\n       clients.  To reduce memory usage, reduce the time unit over which state\r\n       is kept.\r\n\r\n<b>DIAGNOSTICS<\/b>\r\n       Problems and transactions are logged to <b>syslogd<\/b>(8).\r\n\r\n       Upon  exit, and every <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#anvil_status_update_time\">anvil_status_update_time<\/a><\/b> seconds, the server logs\r\n       the maximal count and rate values  measured,  together  with  (service,\r\n       client)  information  and the time of day associated with those events.\r\n       In order to avoid unnecessary overhead, no measurements  are  done  for\r\n       activity that isn't concurrency limited or rate limited.\r\n\r\n<b>BUGS<\/b>\r\n       Systems behind network address translating routers or proxies appear to\r\n       have the same client address and can run into connection  count  and\/or\r\n       rate limits falsely.\r\n\r\n       In  this  preliminary  implementation, a count (or rate) limited server\r\n       process can have only one remote client at a time. If a server  process\r\n       reports  multiple simultaneous clients, state is kept only for the last\r\n       reported client.\r\n\r\n       The <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server automatically discards client  request  information\r\n       after  it  expires.   To  prevent  the  <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> server from discarding\r\n       client request rate information too early or too late, a  rate  limited\r\n       service  should  always register connect\/disconnect events even when it\r\n       does not explicitly limit them.\r\n\r\n<b>CONFIGURATION PARAMETERS<\/b>\r\n       On low-traffic mail systems, changes to <a href=\"http:\/\/www.postfix.org\/postconf.5.html\"><b>main.cf<\/b><\/a> are picked up automati-\r\n       cally  as  <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> processes run for only a limited amount of time. On\r\n       other mail systems, use the command \"<b>postfix  reload<\/b>\"  to  speed  up  a\r\n       change.\r\n\r\n       The  text  below provides only a parameter summary. See <a href=\"http:\/\/www.postfix.org\/postconf.5.html\"><b>postconf<\/b>(5)<\/a> for\r\n       more details including examples.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#anvil_rate_time_unit\">anvil_rate_time_unit<\/a> (60s)<\/b>\r\n              The time unit over which client connection rates and other rates\r\n              are calculated.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#anvil_status_update_time\">anvil_status_update_time<\/a> (600s)<\/b>\r\n              How  frequently the <a href=\"http:\/\/www.postfix.org\/anvil.8.html\"><b>anvil<\/b>(8)<\/a> connection and rate limiting server\r\n              logs peak usage information.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#config_directory\">config_directory<\/a> (see 'postconf -d' output)<\/b>\r\n              The default location of the Postfix <a href=\"http:\/\/www.postfix.org\/postconf.5.html\">main.cf<\/a> and  <a href=\"http:\/\/www.postfix.org\/master.5.html\">master.cf<\/a>  con-\r\n              figuration files.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#daemon_timeout\">daemon_timeout<\/a> (18000s)<\/b>\r\n              How  much  time  a  Postfix  daemon process may take to handle a\r\n              request before it is terminated by a built-in watchdog timer.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#ipc_timeout\">ipc_timeout<\/a> (3600s)<\/b>\r\n              The time limit for sending  or  receiving  information  over  an\r\n              internal communication channel.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#max_idle\">max_idle<\/a> (100s)<\/b>\r\n              The  maximum  amount of time that an idle Postfix daemon process\r\n              waits for an incoming connection before terminating voluntarily.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#max_use\">max_use<\/a> (100)<\/b>\r\n              The maximal number of incoming connections that a Postfix daemon\r\n              process will service before terminating voluntarily.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#process_id\">process_id<\/a> (read-only)<\/b>\r\n              The process ID of a Postfix command or daemon process.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#process_name\">process_name<\/a> (read-only)<\/b>\r\n              The process name of a Postfix command or daemon process.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#syslog_facility\">syslog_facility<\/a> (mail)<\/b>\r\n              The syslog facility of Postfix logging.\r\n\r\n       <b><a href=\"http:\/\/www.postfix.org\/postconf.5.html#syslog_name\">syslog_name<\/a> (see 'postconf -d' output)<\/b>\r\n              A prefix that  is  prepended  to  the  process  name  in  syslog\r\n              records, so that, for example, \"smtpd\" becomes \"prefix\/smtpd\".\r\n\r\n<b>SEE ALSO<\/b>\r\n       <a href=\"http:\/\/www.postfix.org\/smtpd.8.html\">smtpd(8)<\/a>, Postfix SMTP server\r\n       <a href=\"http:\/\/www.postfix.org\/postconf.5.html\">postconf(5)<\/a>, configuration parameters\r\n       <a href=\"http:\/\/www.postfix.org\/master.5.html\">master(5)<\/a>, generic daemon options\r\n\r\n<b>README FILES<\/b>\r\n       <a href=\"http:\/\/www.postfix.org\/TUNING_README.html\">TUNING_README<\/a>, performance tuning\r\n\r\n<b>LICENSE<\/b>\r\n       The Secure Mailer license must be distributed with this software.\r\n\r\n<b>HISTORY<\/b>\r\n       The anvil service is available in Postfix 2.2 and later.\r\n\r\n<b>AUTHOR(S)<\/b>\r\n       Wietse Venema\r\n       IBM T.J. Watson Research\r\n       P.O. Box 704\r\n       Yorktown Heights, NY 10598, USA\r\n\r\n       Wietse Venema\r\n       Google, Inc.\r\n       111 8th Avenue\r\n       New York, NY 10011, USA<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ANVIL(8) ANVIL(8) NAME anvil &#8211; Postfix session count and request rate control SYNOPSIS anvil [generic Postfix daemon options] DESCRIPTION The Postfix anvil(8) server maintains statistics about client connec- tion counts or client request rates. This information can be used to defend against clients that hammer a server with either too many simul- taneous sessions, or &hellip; <a href=\"https:\/\/easy-admin.ca\/index.php\/2017\/01\/28\/postfixanvil\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">postfix\/anvil<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1039","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1039"}],"version-history":[{"count":0,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/posts\/1039\/revisions"}],"wp:attachment":[{"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easy-admin.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}