Skip to content

Commit de15798

Browse files
authored
Merge pull request #200 from gvde/gvde-patch-1
Accept milter-reject as action on NOQUEUE logs
2 parents 4fd5d81 + 056216d commit de15798

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

postfix.grok

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ POSTFIX_QUEUEID ([0-9A-F]{6,}|[0-9a-zA-Z]{12,}|NOQUEUE)
1212
POSTFIX_CLIENT %{HOSTNAME:postfix_client_hostname}?\[(%{IP_UNKNOWN:postfix_client_ip_unknown}|%{IP:postfix_client_ip})\](:%{INT:postfix_client_port})?
1313
POSTFIX_RELAY %{HOSTNAME:postfix_relay_hostname}?\[(%{IP:postfix_relay_ip}|%{DATA:postfix_relay_service})\](:%{INT:postfix_relay_port})?|%{WORD:postfix_relay_service}
1414
POSTFIX_SMTP_STAGE (CONNECT|HELO|EHLO|STARTTLS|AUTH|MAIL( FROM)?|RCPT( TO)?|(end of )?DATA|BDAT|RSET|UNKNOWN|END-OF-MESSAGE|VRFY|\.)
15-
POSTFIX_ACTION (accept|defer|discard|filter|header-redirect|reject|reject_warning)
15+
POSTFIX_ACTION (accept|defer|discard|filter|header-redirect|milter-reject|reject|reject_warning)
1616
POSTFIX_STATUS_CODE \d{3}
1717
POSTFIX_STATUS_CODE_ENHANCED \d\.\d+\.\d+
1818
POSTFIX_DNSBL_MESSAGE Service unavailable; .* \[%{GREEDYDATA:postfix_status_data}\] %{GREEDYDATA:postfix_status_message};

test/smtpd_0038.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pattern: ^%{POSTFIX_SMTPD}$
2+
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=<support@example.com> to=<example@example.org> proto=ESMTP helo=<mailrelay.example.com>"
3+
results:
4+
postfix_queueid: NOQUEUE
5+
postfix_status_code_enhanced: 4.7.1
6+
postfix_keyvalue_data: from=<support@example.com> to=<example@example.org> proto=ESMTP helo=<mailrelay.example.com>
7+
postfix_action: milter-reject
8+
postfix_smtp_stage: RCPT
9+
postfix_status_code: 451
10+
postfix_client_ip: 8.8.8.8
11+
postfix_status_message: "Greylisting in action, please come back later"
12+
postfix_client_hostname: mailrelay.example.com

0 commit comments

Comments
 (0)