Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
immerda
Puppet Modules
amavisd_new
Commits
6280a5f6
Commit
6280a5f6
authored
Jun 08, 2012
by
mh
Browse files
refactor things for >2.7
parent
a7df552c
Changes
8
Hide whitespace changes
Inline
Side-by-side
README
View file @
6280a5f6
...
...
@@ -7,8 +7,11 @@ For an integration into Postfix and a sample setup, check the README from the Po
Configuration (Debian)
----------------------
$amavis_viruscheck : enables virus checks if true
$amavis_spamcheck : enables spam checks if true
Class parameters
$viruscheck : enables virus checks if true
$spamcheck : enables spam checks if true
Configuration (Debian)
----------------------
...
...
manifests/base.pp
View file @
6280a5f6
class
amavisd
-
new::base
{
class
amavisd
_
new::base
{
#unrar packages for amavis
require
unzip
require
unrar
...
...
@@ -17,4 +17,4 @@ class amavisd-new::base {
hasstatus
=>
true
,
require
=>
Package
[
'amavisd-new'
],
}
}
}
manifests/centos.pp
View file @
6280a5f6
class
amavisd
-
new::centos
inherits
amavisd
-
new::base
{
class
amavisd
_
new::centos
inherits
amavisd
_
new::base
{
Package
[
'unarj'
]{
name
=>
'arj'
,
}
file
{
'/etc/amavisd/amavisd.conf'
:
source
=>
[
"puppet:///modules/site
-
amavisd-new/
${fqdn}
/amavisd.conf"
,
"puppet:///modules/site
-
amavisd-new/amavisd.conf"
,
source
=>
[
"puppet:///modules/site
_
amavisd-new/
${
::
fqdn}
/amavisd.conf"
,
"puppet:///modules/site
_
amavisd-new/amavisd.conf"
,
"puppet:///modules/amavisd-new/amavisd.conf"
],
require
=>
Package
[
'amavisd-new'
],
notify
=>
Service
[
'amavisd'
],
...
...
manifests/debian.pp
View file @
6280a5f6
class
amavisd
-
new::debian
inherits
amavisd
-
new::base
{
class
amavisd
_
new::debian
inherits
amavisd
_
new::base
{
# doesnt exist in debian lenny anymore, is package arj useful ?
Package
[
'unarj'
]{
ensure
=>
absent
,
...
...
@@ -9,7 +9,7 @@ class amavisd-new::debian inherits amavisd-new::base {
}
file
{
"/etc/amavis/conf.d/50-user"
:
content
=>
template
(
"amavisd
-
new/debian/50-user"
),
content
=>
template
(
"amavisd
_
new/debian/50-user"
),
require
=>
Package
[
'amavisd-new'
],
notify
=>
Service
[
'amavisd'
],
owner
=>
root
,
group
=>
0
,
mode
=>
0644
;
...
...
manifests/gentoo.pp
View file @
6280a5f6
class
amavisd
-
new::gentoo
inherits
amavisd
-
new::base
{
class
amavisd
_
new::gentoo
inherits
amavisd
_
new::base
{
Package
[
'amavisd-new'
]{
category
=>
'mail-filter'
,
}
...
...
manifests/init.pp
View file @
6280a5f6
#
modules/amavisd-new/manifests/init.pp -
manage amavisd-new stuff
# manage amavisd-new stuff
# Copyright (C) 2007 admin@immerda.ch
# GPLv3
# this module is part of a whole bunch of modules, please have a look at the exim module
class
amavisd
-
new
{
# defaults
case
$amavis_viruscheck
{
""
:
{
$amavis_viruscheck
=
"false"
}
}
case
$amavis_spamcheck
{
""
:
{
$amavis_spamcheck
=
"false"
}
}
case
$operatingsystem
{
gentoo
:
{
include
amavisd
-
new::gentoo
}
centos
:
{
include
amavisd
-
new::centos
}
class
amavisd_new
(
$viruscheck
=
hiera
(
'amavis_viruscheck'
,
false
),
$spamcheck
=
hiera
(
'amavis_spamcheck'
,
false
)
)
{
case
$::operatingsystem
{
gentoo
:
{
include
amavisd_new::gentoo
}
centos
:
{
include
amavisd_new::centos
}
debian
,
ubuntu
:
{
include
amavisd
-
new::debian
}
default
:
{
include
amavisd
-
new::base
}
default
:
{
include
amavisd
_
new::base
}
}
if
$
use_munin
{
include
amavisd
-
new::munin
if
hiera
(
'
use_munin
'
,
false
)
{
include
amavisd
_
new::munin
}
}
manifests/munin.pp
View file @
6280a5f6
class
amavisd
-
new
::
munin
{
class
amavisd
_
new
::
munin
{
munin::plugin::deploy{'amavis_':
source => "amavisd-new/munin/amavis_",
ensure => absent,
}
case
$
operatingsystem
{
case
$
::
operatingsystem
{
centos: { $munin_amavis_db_location = '/var/spool/amavisd/db/' }
default
:
{ $munin_amavis_db_location = '/var/lib/amavis/db' }
}
...
...
templates/debian/50-user
View file @
6280a5f6
...
...
@@ -10,7 +10,7 @@ use strict;
# the directives you can use in this file
#
<% if
(
amavis
_
viruscheck
== "true"
) -%>
<% if
scope.lookupvar('
amavis
::
viruscheck
'
) -%>
# checks viruses
@bypass_virus_checks_maps = (
\%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
...
...
@@ -18,7 +18,7 @@ use strict;
# virus checks disabled by puppet
<% end -%>
<% if
(
amavis
_
spamcheck
== "true"
) -%>
<% if
scope.lookupvar('
amavis
::
spamcheck
'
) -%>
# checks for spam
@bypass_spam_checks_maps = (
\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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