Wietse Venema: > Christian Roessner: > > Aug 11 14:57:11 mx0 postfix-loopback/smtpd[10241]: event: SMFIC_CONNECT; > > macros: j=mx0.roessner-net.de {daemon_name}=mx0.ro > > essner-net.de {client_ptr}=localhost {client_connections}=570245840 > > v=Postfix 2.8.4 > > The client_connections macro reports some uninitialized value. This > happens because the anvil daemon was not queried for the remote > SMTP client connection count, as the remote SMTP client was excluded > from connection count limits. > > Workaround: don't exclude clients from connection count limits. > > /etc/postfix/main.cf: > smtpd_client_connection_count_limit = 1000 > smtpd_client_event_limit_exceptions =
[20110811-milter-connection-count-patch] follows. Wietse 20110811 Workaround: report a {client_connections} Milter macro value of zero instead of garbage, when the remote SMTP client is excluded from connection count limits. Problem reported by Christian Roessner. File: smtpd/smtpd_state,c, diff -cr /var/tmp/postfix-2.9-20110729-nonprod/src/smtpd/smtpd_state.c src/smtpd/smtpd_state.c *** /var/tmp/postfix-2.9-20110729-nonprod/src/smtpd/smtpd_state.c Thu Jan 6 07:12:49 2011 --- src/smtpd/smtpd_state.c Thu Aug 11 14:56:52 2011 *************** *** 84,89 **** --- 84,90 ---- state->service = mystrdup(service); state->buffer = vstring_alloc(100); state->addr_buf = vstring_alloc(100); + state->conn_count = state->conn_rate = 0; state->error_count = 0; state->error_mask = 0; state->notify_mask = name_mask(VAR_NOTIFY_CLASSES, mail_error_masks,