Skip to content

Commit 71d6562

Browse files
authored
Merge pull request #188 from whyscream/tls-logging
TLS logging improvements
2 parents 85c3ad4 + 8e0b737 commit 71d6562

File tree

8 files changed

+13
-5
lines changed

8 files changed

+13
-5
lines changed

50-filter-postfix.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ filter {
277277
"postfix_size", "integer",
278278
"postfix_status_code", "integer",
279279
"postfix_termination_signal", "integer",
280+
"postfix_tls_server_signature_size", "integer",
280281
"postfix_verify_cache_dropped", "integer",
281282
"postfix_verify_cache_retained", "integer",
282283

postfix.grok

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ POSTFIX_KEYVALUE %{POSTFIX_QUEUEID:postfix_queueid}: %{POSTFIX_KEYVALUE_DATA:pos
2323
POSTFIX_WARNING_LEVEL (warning|fatal|info)
2424
POSTFIX_VERIFY_CLEANUP_TYPE (full|partial)
2525

26-
POSTFIX_TLSCONN (Anonymous|Trusted|Untrusted|Verified) TLS connection established (to %{POSTFIX_RELAY_INFO}|from %{POSTFIX_CLIENT_INFO}): %{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})?
26+
27+
POSTFIX_TLSCONN %{DATA:postfix_tls_trustlevel} TLS connection established (to %{POSTFIX_RELAY_INFO}|from %{POSTFIX_CLIENT_INFO}): %{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})?
2728
POSTFIX_TLSVERIFICATION certificate verification failed for %{POSTFIX_RELAY_INFO}: %{GREEDYDATA:postfix_tls_error}
2829

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

test/smtp_0003.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pattern: ^%{POSTFIX_SMTP}$
22
data: "Untrusted TLS connection established to mx4.hotmail.com[65.55.92.136]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)"
33
results:
4+
postfix_tls_trustlevel: Untrusted
45
postfix_relay_hostname: mx4.hotmail.com
56
postfix_relay_ip: 65.55.92.136
67
postfix_relay_port: 25

test/smtp_0004.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pattern: ^%{POSTFIX_SMTP}$
22
data: "Untrusted TLS connection established to 127.0.0.1[127.0.0.1]:2525: TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)"
33
results:
4+
postfix_tls_trustlevel: Untrusted
45
postfix_relay_hostname: 127.0.0.1
56
postfix_relay_ip: 127.0.0.1
67
postfix_relay_port: 2525

test/smtp_0015.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pattern: ^%{POSTFIX_SMTP}$
22
data: "Trusted TLS connection established to gmail-smtp-in.l.google.com[74.125.136.26]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)"
33
results:
4+
postfix_tls_trustlevel: Trusted
45
postfix_relay_hostname: gmail-smtp-in.l.google.com
56
postfix_relay_ip: 74.125.136.26
67
postfix_relay_port: 25

test/smtp_0016.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pattern: ^%{POSTFIX_SMTP}$
22
data: "Verified TLS connection established to mail.sys4.de[2001:1578:400:111::7]:25: TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)"
33
results:
4+
postfix_tls_trustlevel: Verified
45
postfix_relay_hostname: mail.sys4.de
56
postfix_relay_ip: 2001:1578:400:111::7
67
postfix_relay_port: 25

test/smtpd_0010.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
pattern: ^%{POSTFIX_SMTPD}$
22
data: "Anonymous TLS connection established from julie.example.com[10.163.89.202]: TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)"
33
results:
4+
postfix_tls_trustlevel: Anonymous
45
postfix_client_hostname: julie.example.com
56
postfix_client_ip: 10.163.89.202
67
postfix_tls_version: TLSv1.2

test/smtpd_0037.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
pattern: ^%{POSTFIX_SMTPD}$
22
data: "Anonymous TLS connection established from julie.example.com[10.163.89.202]: TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256"
33
results:
4+
postfix_tls_trustlevel: Anonymous
45
postfix_client_hostname: julie.example.com
56
postfix_client_ip: 10.163.89.202
67
postfix_tls_version: TLSv1.3
78
postfix_tls_cipher: TLS_AES_256_GCM_SHA384
89
postfix_tls_cipher_size: 256/256
9-
postfix_tls_key-exchange: X25519
10-
postfix_tls_server-signature: RSA-PSS
11-
postfix_tls_server-signature_size: 4096
12-
postfix_tls_server-digest: SHA256
10+
postfix_tls_key_exchange: X25519
11+
postfix_tls_server_signature: RSA-PSS
12+
postfix_tls_server_signature_size: 4096
13+
postfix_tls_server_digest: SHA256

0 commit comments

Comments
 (0)