Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clavier-souris/737f4f3be15e39b01f43 to your computer and use it in GitHub Desktop.
Save clavier-souris/737f4f3be15e39b01f43 to your computer and use it in GitHub Desktop.
#Custom configuration
SMTP_PORT == 25:587
LOCAL_INTERFACES == <; 0.0.0.0.25 ; 0.0.0.0.587 ; 0.0.0.0.465 ; [::0]:25 ; [::0]:587 ; [::0]:465
smtp_accept_max = 50
spamd_address = 127.0.0.1 783
ACL_SMTP_DATA == acl_custom_check_data
USE = "exiscan"
#Custom ACLs
acl_custom_check_data:
deny
message = Message headers fail syntax check
!verify = header_syntax
warn spam = nobody
add_header = X-Spam-Score: $spam_score ($spam_bar)
add_header = X-Spam-Report: $spam_report
add_header = Subject: ***SPAM (score:$spam_score)*** $h_Subject:
warn message = Content Policy Restriction: Mails to undisclosed recipients are not permitted
condition = ${if eq{$h_TO:}{undisclosed-recipients:;} {true}{false}}
add_header = X-Spam-Score: 100
add_header = Subject: ***SPAM (score:100)*** $h_Subject:
accept
#Custom routers
maildir_spam:
driver = accept
transport = maildir_spam_delivery
condition = ${if def:h_X-Spam_score: {true}}
#Custom transports
maildir_spam_delivery:
driver = appendfile
maildir_format = true
directory = /var/vmail/$domain/$local_part/.Junk
user = mail
create_directory
delivery_date_add
envelope_to_add
return_path_add
group = mail
mode = 0600
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment