_ = XLATOR.gettext
ngettext = XLATOR.ngettext
-__version__ = '0.6.1'
+__version__ = '0.6.3'
# =============================================================================
r'\s+with\s+cipher\s+(?P<tls_cipher>\S.*\S)', re.IGNORECASE)
re_client = re.compile(r'^client=\S+\s*$', re.IGNORECASE)
+ smtpd_ignore_regexes = (
+ re.compile(r'^SSL_accept:', re.IGNORECASE),
+ re.compile(r'table\s+.*\s+has\s+changed\s+--\s+restarting', re.IGNORECASE),
+ re.compile(r'^auto_clnt_(?:open|close):', re.IGNORECASE),
+ re.compile(r'^connection\s+(?:closed|established)', re.IGNORECASE),
+ re.compile(r'^(?:master_notify|match_list_match|dict_cidr_lookup):', re.IGNORECASE),
+ re.compile(r'^match_host(?:addr|name):', re.IGNORECASE),
+ re.compile(
+ r'^(?:xsasl_dovecot_server_create|xsasl_dovecot_server_mech_filter|name_mask):',
+ re.IGNORECASE),
+ re.compile(r'^(?:send\s+attr|input\s+attribute)\s', re.IGNORECASE),
+ re.compile(r'^(?:[<>]|>>>)\s', re.IGNORECASE),
+ re.compile(r'^(?:private/tlsmgr|cfg_get_\S+|dict_open):', re.IGNORECASE),
+ re.compile(r'^error:\s+unsupported\s+dictionary\s+type', re.IGNORECASE),
+ re.compile(r'^(?:dict_cidr_open|match_string|been_here):', re.IGNORECASE),
+ re.compile(r'^(?:smtp_stream_setup|public/cleanup\s+socket):', re.IGNORECASE),
+ re.compile(r'^(?:(?:before|after)\s+input_transp_cleanup):', re.IGNORECASE),
+ re.compile(r'^connect\s+to\s+subsystem\s+\S+', re.IGNORECASE),
+ re.compile(r'^(?:mail_addr_find|maps_find|dict_ldap_lookup):', re.IGNORECASE),
+ re.compile(r'^(?:dict_ldap_open|dict_proxy_open):', re.IGNORECASE),
+ re.compile(r'^(?:dict_ldap_get_values\[\d+\]|dict_pcre_lookup):', re.IGNORECASE),
+ re.compile(r'^(?:dict_ldap_connect|ctable_locate|generic_checks):', re.IGNORECASE),
+ re.compile(
+ r'^(?:smtpd_acl_permit|permit_mynetworks|reject_non_fqdn_address):', re.IGNORECASE),
+ re.compile(
+ r'^(?:check_namadr_access|check_domain_access|check_addr_access):', re.IGNORECASE),
+ re.compile(
+ r'^(?:reject_invalid_hostname|check_mail_access|smtpd_check_addr):', re.IGNORECASE),
+ re.compile(
+ r'^(?:extract_addr|smtpd_check_queue|fsspace|permit_inet_interfaces):', re.IGNORECASE),
+ re.compile(
+ r'^(?:smtpd_check_rewrite|resolve_clnt|private/rewrite\s+socket):', re.IGNORECASE),
+ re.compile(r'^\S+\s+stream\s+disconnect', re.IGNORECASE),
+ re.compile(r'^(?:rewrite_clnt|xsasl_dovecot_server_connect):', re.IGNORECASE),
+ re.compile(r'^auto_clnt_create:', re.IGNORECASE),
+ re.compile(
+ r'^(?:unknown_address_tempfail_action|unknown_helo_hostname_tempfail_action)',
+ re.IGNORECASE),
+ re.compile(r'^unverified_sender_tempfail_action\s+', re.IGNORECASE),
+ re.compile(r'^unverified_recipient_tempfail_action\s+', re.IGNORECASE),
+ re.compile(r'^(?:Compiled|Run-time\s+linked)\s+against\s+', re.IGNORECASE),
+ re.compile(r'^private/proxymap\s+socket:', re.IGNORECASE),
+ re.compile(r'^(?:inet_addr_local|mynetworks_core|process\s+generation):', re.IGNORECASE),
+ re.compile(r'^warning:\s+SASL:\s+', re.IGNORECASE),
+ re.compile(r'^fatal:\s+no\s+SASL\s+authentication\s+mechanisms', re.IGNORECASE),
+ )
+
re_dis_ehlo = re.compile(r'\sehlo=(\d+)', re.IGNORECASE)
re_dis_starttls = re.compile(r'\sstarttls=(\d+)', re.IGNORECASE)
re_dis_quit = re.compile(r'\squit=(\d+)', re.IGNORECASE)
pid = entry['pid']
message = entry['message']
timestamp = entry['timestamp']
+
+ for regex in self.smtpd_ignore_regexes:
+ if not entry['postfix_id'] and regex.search(message):
+ return False
+
m_conn = self.re_connect.search(message)
if m_conn:
if self.re_client.match(message):
return True
+ if not entry['postfix_id']:
+ return False
+
if self.verbose > 1:
LOG.debug('Evaluating further smtpd entry:\n' + pp(entry))