Skip to content

Instantly share code, notes, and snippets.

@gwire
Last active April 22, 2023 11:06
Show Gist options
  • Save gwire/ac0f61155afbb421e108ee0755a59072 to your computer and use it in GitHub Desktop.
Save gwire/ac0f61155afbb421e108ee0755a59072 to your computer and use it in GitHub Desktop.
Exim4 ACL to reject a random 5% of non-TLS deliveries
## %5 rejection of plaintext transmission
## add to acl_smtp_mail or later (eg acl_smtp_rcpt, acl_smtp_data)
## change "defer" to "drop" to force a permanent rejection code
defer !encrypted = *
condition = ${if eq{${randint:20}}{2}{true}}
message = 4.7.0 Unlucky! Try STARTTLS command before MAIL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment