Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
infra
ansible-shared
communication
Commits
ec24ccc5
Commit
ec24ccc5
authored
Jul 15, 2018
by
Lars Beckers
Browse files
spamassassin: refactor role
parent
20a1bc5f
Changes
5
Hide whitespace changes
Inline
Side-by-side
spamassassin/defaults/main.yml
0 → 100644
View file @
ec24ccc5
---
spamassassin_rewrite_subject
:
no
spamassassin_required_score
:
'
3.0'
spamassassin/files/sa-learn-ham.sh
deleted
100644 → 0
View file @
20a1bc5f
#!/bin/sh
# you can also use tcp/ip here, consult spamc(1)
exec
/usr/bin/spamc
-u
${
1
}
-L
ham
-C
report
spamassassin/files/sa-learn-spam.sh
deleted
100644 → 0
View file @
20a1bc5f
#!/bin/sh
# you can also use tcp/ip here, consult spamc(1)
exec
/usr/bin/spamc
-u
${
1
}
-L
spam
-C
report
spamassassin/tasks/main.yml
View file @
ec24ccc5
---
-
name
:
ensure spamassassin is installed
apt
:
name={{ item }} state=present
apt
:
name
:
"
{{
item
}}"
state
:
present
with_items
:
-
spamassassin
-
spamc
...
...
@@ -10,34 +12,32 @@
-
spamassassin
-
name
:
ensure spamassassin is configured
copy
:
src=files/local.cf dest=/etc/spamassassin/local.cf mode=0644 owner=root group=root
template
:
src
:
local.cf.j2
dest
:
/etc/spamassassin/local.cf
owner
:
root
group
:
root
mode
:
0644
tags
:
-
mail
-
spamassassin
-
name
:
ensure spamassassin is enabled -- the nasty debian way
copy
:
src=files/defaults dest=/etc/default/spamassassin mode=0644 owner=root group=root
-
name
:
ensure spamassassin is enabled -- the nasty debian way
copy
:
src
:
defaults
dest
:
/etc/default/spamassassin
owner
:
root
group
:
root
mode
:
0644
tags
:
-
mail
-
spamassassin
-
name
:
ensure spamassasin is started and enanbled -- the usual way
service
:
name=spamassassin state=started enabled=yes
tags
:
-
mail
-
spamassassin
#- name: ensure there is sync cronjob for the learned filters
-
name
:
ensure scripts for learning spam are present.
copy
:
src="files/{{ item }}" dest=/var/lib/dovecot/sieve.d/{{ item }} mode=0750 owner=dovecot group=vmail
with_items
:
-
sa-learn-ham.sh
-
sa-learn-spam.sh
service
:
name
:
spamassassin
state
:
started
enabled
:
yes
tags
:
-
mail
-
spamassassin
spamassassin/
fil
es/local.cf
→
spamassassin/
templat
es/local.cf
.j2
View file @
ec24ccc5
...
...
@@ -9,7 +9,7 @@
# Add *****SPAM***** to the Subject header of spam e-mails
#
rewrite_header Subject *****SPAM*****
{{ '' if spamassassin_rewrite_subject else '#' }}
rewrite_header Subject *****SPAM*****
# Save spam messages as a message/rfc822 MIME attachment instead of
...
...
@@ -31,7 +31,7 @@ report_safe 0
# Set the threshold at which a message is considered spam (default: 5.0)
#
required_score
3.0
required_score
{{ spamassassin_required_score }}
# Use Bayesian classifier (default: 1)
...
...
@@ -58,7 +58,7 @@ required_score 3.0
# normalize_charset 1
# Some shortcircuiting, if the plugin is enabled
#
#
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
#
# default: strongly-whitelisted mails are *really* whitelisted now, if the
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment