diff --git a/postfix.grok b/postfix.grok index d3996d4..11db0b4 100644 --- a/postfix.grok +++ b/postfix.grok @@ -12,7 +12,7 @@ POSTFIX_QUEUEID ([0-9A-F]{6,}|[0-9a-zA-Z]{12,}|NOQUEUE) POSTFIX_CLIENT %{HOSTNAME:postfix_client_hostname}?\[(%{IP_UNKNOWN:postfix_client_ip_unknown}|%{IP:postfix_client_ip})\](:%{INT:postfix_client_port})? POSTFIX_RELAY %{HOSTNAME:postfix_relay_hostname}?\[(%{IP:postfix_relay_ip}|%{DATA:postfix_relay_service})\](:%{INT:postfix_relay_port})?|%{WORD:postfix_relay_service} POSTFIX_SMTP_STAGE (CONNECT|HELO|EHLO|STARTTLS|AUTH|MAIL( FROM)?|RCPT( TO)?|(end of )?DATA|BDAT|RSET|UNKNOWN|END-OF-MESSAGE|VRFY|\.) -POSTFIX_ACTION (accept|defer|discard|filter|header-redirect|reject|reject_warning) +POSTFIX_ACTION (accept|defer|discard|filter|header-redirect|milter-reject|reject|reject_warning) POSTFIX_STATUS_CODE \d{3} POSTFIX_STATUS_CODE_ENHANCED \d\.\d+\.\d+ POSTFIX_DNSBL_MESSAGE Service unavailable; .* \[%{GREEDYDATA:postfix_status_data}\] %{GREEDYDATA:postfix_status_message}; diff --git a/test/smtpd_0038.yaml b/test/smtpd_0038.yaml new file mode 100644 index 0000000..4a91cf9 --- /dev/null +++ b/test/smtpd_0038.yaml @@ -0,0 +1,12 @@ +pattern: ^%{POSTFIX_SMTPD}$ +data: "NOQUEUE: milter-reject: RCPT from mailrelay.example.com[8.8.8.8]: 451 4.7.1 Greylisting in action, please come back later; from= to= proto=ESMTP helo=" +results: + postfix_queueid: NOQUEUE + postfix_status_code_enhanced: 4.7.1 + postfix_keyvalue_data: from= to= proto=ESMTP helo= + postfix_action: milter-reject + postfix_smtp_stage: RCPT + postfix_status_code: 451 + postfix_client_ip: 8.8.8.8 + postfix_status_message: "Greylisting in action, please come back later" + postfix_client_hostname: mailrelay.example.com