Skip to content

Commit 4fd5d81

Browse files
authored
Merge pull request #198 from whyscream/197-server-signature-curve
Extract the elliptic curve name from TLS connection lines
2 parents 83feb6a + 5eba856 commit 4fd5d81

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

postfix.grok

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ GREEDYDATA_NO_SEMICOLON [^;]*
44
GREEDYDATA_NO_BRACKET [^<>]*
55
STATUS_WORD [\w-]*
66
IP_UNKNOWN unknown
7+
CURVE_WORD [PBK]-[0-9]+
78

89
# common postfix patterns
910
POSTFIX_QUEUEID ([0-9A-F]{6,}|[0-9a-zA-Z]{12,}|NOQUEUE)
@@ -24,7 +25,7 @@ POSTFIX_WARNING_LEVEL (warning|fatal|info)
2425
POSTFIX_VERIFY_CLEANUP_TYPE (full|partial)
2526

2627

27-
POSTFIX_TLSCONN %{DATA:postfix_tls_trustlevel} TLS connection established (to %{POSTFIX_RELAY}|from %{POSTFIX_CLIENT}): %{DATA:postfix_tls_version} with cipher %{DATA:postfix_tls_cipher} \(%{DATA:postfix_tls_cipher_size} bits\)( key-exchange %{DATA:postfix_tls_key_exchange} server-signature %{DATA:postfix_tls_server_signature} \(%{DATA:postfix_tls_server_signature_size} bits\) server-digest %{DATA:postfix_tls_server_digest})?
28+
POSTFIX_TLSCONN %{DATA:postfix_tls_trustlevel} TLS connection established (to %{POSTFIX_RELAY}|from %{POSTFIX_CLIENT}): %{DATA:postfix_tls_version} with cipher %{DATA:postfix_tls_cipher} \(%{DATA:postfix_tls_cipher_size} bits\)( key-exchange %{DATA:postfix_tls_key_exchange} server-signature %{DATA:postfix_tls_server_signature} \((%{INT:postfix_tls_server_signature_size} bits|%{CURVE_WORD:postfix_tls_server_signature_curve})\) server-digest %{DATA:postfix_tls_server_digest})?
2829
POSTFIX_TLSVERIFICATION certificate verification failed for %{POSTFIX_RELAY}: %{GREEDYDATA:postfix_tls_error}
2930

3031
POSTFIX_DELAYS %{NUMBER:postfix_delay_before_qmgr}/%{NUMBER:postfix_delay_in_qmgr}/%{NUMBER:postfix_delay_conn_setup}/%{NUMBER:postfix_delay_transmission}

test/smtp_0035.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pattern: ^%{POSTFIX_SMTP}$
2+
data: "Untrusted TLS connection established to gmail-smtp-in.l.google.com[74.125.128.27]:25: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256"
3+
results:
4+
postfix_tls_trustlevel: Untrusted
5+
postfix_relay_hostname: gmail-smtp-in.l.google.com
6+
postfix_relay_ip: 74.125.128.27
7+
postfix_relay_port: 25
8+
postfix_tls_version: TLSv1.3
9+
postfix_tls_cipher: TLS_AES_256_GCM_SHA384
10+
postfix_tls_cipher_size: 256/256
11+
postfix_tls_key_exchange: X25519
12+
postfix_tls_server_signature: ECDSA
13+
postfix_tls_server_signature_curve: P-256
14+
postfix_tls_server_digest: SHA256

0 commit comments

Comments
 (0)