summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/hidden.pp22
-rw-r--r--manifests/init.pp1
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"