Files
mailsender/mailsender-demo/src/main/resources/application.yml
T
Claude f63636f8f4 Add metrics, protected headers and pgpkeys actuator endpoint
- metrics (optional Micrometer): per-recipient outcome/policy/reason counter,
  refused counter, key lookup timer below the cache, cache size gauge
- SendReport.RecipientOutcome gains a structured PlaintextReason
- protected headers (RFC 9788, mail.pgp.protected-headers, off by default):
  real headers inside the encrypted part, outer Subject "[...]"
- encrypting keeps the caller's Message-ID
- pgpkeys endpoint (optional Actuator): inspect policy, lookup and key
  validity per address; evict one or all cached lookups
- KeyDiscoveryCustomizer and SecureMailSenderCustomizer extension points

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G71TQ5jDETVwdUJxGAwaiT
2026-10-12 03:33:17 +00:00

42 lines
1.2 KiB
YAML

spring:
main:
web-application-type: none
mail:
host: ${SMTP_HOST:localhost}
port: ${SMTP_PORT:587}
username: ${SMTP_USERNAME:}
password: ${SMTP_PASSWORD:}
properties:
mail.smtp.auth: ${SMTP_AUTH:true}
mail.smtp.starttls.enable: ${SMTP_STARTTLS:true}
mail.smtp.starttls.required: ${SMTP_STARTTLS:true}
mail.smtp.connectiontimeout: 10000
mail.smtp.timeout: 10000
mail:
pgp:
mode: ${MAIL_PGP_MODE:BUILT_IN} # BUILT_IN | RELAY
default-policy: ${MAIL_PGP_DEFAULT_POLICY:OPPORTUNISTIC}
mixed-mode: SPLIT
protected-headers: ${MAIL_PGP_PROTECTED_HEADERS:false}
# recipients:
# "[*@partner.example]": REQUIRE
# Readable sent copies: the sender's own PUBLIC key per From address.
# sender-keys:
# "[noreply@example.com]": file:/etc/mail/noreply.pub.asc
relay:
host: ${RELAY_HOST:}
port: ${RELAY_PORT:587}
username: ${RELAY_USERNAME:}
password: ${RELAY_PASSWORD:}
policy-header: X-Encryption-Policy
demo:
to: ${DEMO_TO:test@thinhha.pro}
from: ${DEMO_FROM:${SMTP_USERNAME:}}
count: ${DEMO_COUNT:1}
logging:
level:
pro.thinhha.mailsender: DEBUG