]> gitweb.fluxo.info Git - puppet-mail.git/commitdiff
Adding gpg-mailgate support
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 4 Aug 2013 22:56:02 +0000 (19:56 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 4 Aug 2013 22:56:02 +0000 (19:56 -0300)
files/gpg_mailgate/gpg-mailgate.conf [new file with mode: 0644]
manifests/gpg_mailgate.pp [new file with mode: 0644]

diff --git a/files/gpg_mailgate/gpg-mailgate.conf b/files/gpg_mailgate/gpg-mailgate.conf
new file mode 100644 (file)
index 0000000..c2c4872
--- /dev/null
@@ -0,0 +1,23 @@
+[default]
+add_header = yes
+domains = example.com,corp.org
+
+[gpg]
+keyhome = /var/lib/gpgmailgate/.gnupg
+
+[logging]
+file = /var/log/gpg-mailgate.log
+
+[relay]
+host = 127.0.0.1
+port = 10028
+
+[keymap]
+# You can find these by running the following command:
+# gpg --list-keys --keyid-format long user@example.com
+# Which will return output similar to:
+# pub   1024D/AAAAAAAAAAAAAAAA 2007-10-22
+# uid                          Joe User <user@example.com>
+# sub   2048g/BBBBBBBBBBBBBBBB 2007-10-22
+# You want the AAAAAAAAAAAAAAAA not BBBBBBBBBBBBBBBB.
+#user@example.com = <gpg key id>
diff --git a/manifests/gpg_mailgate.pp b/manifests/gpg_mailgate.pp
new file mode 100644 (file)
index 0000000..f00bb62
--- /dev/null
@@ -0,0 +1,41 @@
+class gpg_mailgate {
+  group { "gpg_mailgate":
+    ensure    => present,
+    allowdupe => false,
+  }
+
+  user { "gpg_mailgate":
+    ensure    => present,
+    allowdupe => false,
+    gid       => 'gpg_mailgate',
+    require   => Group['gpg_mailgate'],
+    home      => '/var/lib/gpg_mailgate',
+  }
+
+  vcsrepo { "/var/lib/gpg_mailgate":
+    ensure   => present,
+    provider => git,
+    source   => 'git://github.com/ajgon/gpg-mailgate',
+    revision => '078381c2ddf05f0a5701f00bffa99e178ab658c9',
+    owner    => 'gpg_mailgate',
+    group    => 'gpg_mailgate',
+    require  => [ User['gpg_mailgate'], Group['gpg_mailgate'] ],
+  }
+
+  file { '/usr/local/bin/gpg-mailgate.py':
+    ensure  => '/usr/local/bin/gpg-mailgate.py',
+    owner   => root,
+    group   => root,
+    require => Vcsrepo['/var/lib/gpg_mailgate'],
+  }
+
+  file { '/etc/gpg-mailgate.conf':
+    ensure => present,
+    owner   => gpg_mailgate,
+    group   => gpg_mailgate,
+    mode    => 0600,
+    require => Vcsrepo['/var/lib/gpg_mailgate'],
+    source  => [ "puppet:///modules/site_mail/gpg_mailgate/gpg-mailgate.conf",
+                 "puppet:///modules/mail/gpg_mailgate/gpg-mailgate.conf" ],
+  }
+}