spamassassin: Add support for installing pyzor module.
This commit is contained in:
parent
39a60084c4
commit
fa2fbb9ff3
1 changed files with 40 additions and 0 deletions
|
@ -108,3 +108,43 @@ class spamassassin::milter($options="") {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Install pyzor module for spamassassin
|
||||
#
|
||||
class spamassassin::pyzor {
|
||||
|
||||
package { "pyzor":
|
||||
ensure => installed,
|
||||
}
|
||||
|
||||
exec { "pyzor --homedir /etc/mail/pyzor discover":
|
||||
user => "root",
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
creates => "/etc/mail/pyzor/servers",
|
||||
require => Package["pyzor"],
|
||||
before => [ File["/etc/mail/pyzor"],
|
||||
File["/etc/mail/pyzor/servers"], ],
|
||||
}
|
||||
file { "/etc/mail/pyzor":
|
||||
ensure => directory,
|
||||
mode => "0755",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
}
|
||||
file { "/etc/mail/pyzor/servers":
|
||||
ensure => present,
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
}
|
||||
|
||||
file { "/etc/mail/spamassassin/pyzor.cf":
|
||||
content => "pyzor_options --homedir /etc/mail/pyzor\n",
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
require => File["/etc/mail/pyzor/servers"],
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue