Skip to content

Commit

Permalink
Merge pull request #200 from gvde/gvde-patch-1
Browse files Browse the repository at this point in the history
 Accept milter-reject as action on NOQUEUE logs
  • Loading branch information
whyscream authored Jul 4, 2024
2 parents 4fd5d81 + 056216d commit de15798
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion postfix.grok
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
12 changes: 12 additions & 0 deletions test/smtpd_0038.yaml
Original file line number Diff line number Diff line change
@@ -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=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mailrelay.example.com>"
results:
postfix_queueid: NOQUEUE
postfix_status_code_enhanced: 4.7.1
postfix_keyvalue_data: from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mailrelay.example.com>
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

0 comments on commit de15798

Please sign in to comment.