diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2012-06-22 18:10:28 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2012-06-22 18:10:28 -0300 |
commit | 6e9ced5c0eda28b6a20384f6e5d00609342c11b8 (patch) | |
tree | 4cbc5f66975f9d12b7a83f5d0d40cfb712fb9a13 /manifests | |
parent | 2445bd4442e29fea85ba7f10ae5ef675490bc378 (diff) | |
download | puppet-mail-6e9ced5c0eda28b6a20384f6e5d00609342c11b8.tar.gz puppet-mail-6e9ced5c0eda28b6a20384f6e5d00609342c11b8.tar.bz2 |
Adding mail::hidden for tor hidden services support
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/hidden.pp | 22 | ||||
-rw-r--r-- | manifests/init.pp | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/manifests/hidden.pp b/manifests/hidden.pp new file mode 100644 index 0000000..bdddcf2 --- /dev/null +++ b/manifests/hidden.pp @@ -0,0 +1,22 @@ +class mail::hidden { + # Make sure that the tor daemon is included + include tor::daemon + + # It's important to use a subdir from the tor datadir + # to ease backup/restore procedures as we don't mix + # hidden service data with other tor files. + if !defined(File["$tor::daemon::data_dir/hidden"]) { + file { "$tor::daemon::data_dir/hidden": + ensure => directory, + owner => 'debian-tor', + group => 'debian-tor', + mode => 0700, + } + } + + tor::daemon::hidden_service { 'mail': + ports => [ '80 127.0.0.1:80', '25 127.0.0.1:25', '993 127.0.0.1:993' ], + data_dir => "$tor::daemon::data_dir/hidden", + require => File["$tor::daemon::data_dir/hidden"], + } +} diff --git a/manifests/init.pp b/manifests/init.pp index fc1824f..9c2a490 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,3 +16,4 @@ import "base.pp" import "spamassassin.pp" import "firma.pp" import "mlmmj.pp" +import "hidden.pp" |