[]
(https://travis-ci.org/mricon/puppet-publicinbox)
- Overview
- Module Description - What the module does and why it is useful
- Setup
- Reference
- Limitations - OS compatibility, etc.
Puppet module to manage Public-Inbox installation and configuration.
This module installs and configures Public-Inbox. It will install services and dependencies, plus manage the config file, but will not init the repositories nor configure mail delivery/watching.
It's expected that this module will be used with hiera, so the quickest way to configure it for your environment is to add it to your Puppetfile:
mod 'mricon-publicinbox'
The minimal configuration bits that should go into hiera are the lists, e.g.:
publicinbox::config::lists:
lkml:
address:
- 'linux-kernel@vger.kernel.org'
mainrepo: '/var/lib/public-inbox/lkml.git'
url: 'https://lkml.kernel.org/'
newsgroup: 'org.kernel.vger.linux-kernel'
Whether to manage git installation (needed to clone the public-inbox repository).
Default: true
Version of public-inbox to install. Must match a ref in the public-inbox repository.
Default: master
Location where the public-inbox tree should be cloned.
Default: /usr/local/share/public-inbox
Where to clone the public-inbox tree from. If you must carry local changes that cannot be put into an extension, you can use your own repo location here.
Default: https://public-inbox.org
Whether to run "make test" after "make".
Default: false
Where the configuration files should be kept.
Defaults:
publicinbox::config_dir: '/etc/public-inbox'
publicinbox::config_dir_seltype: undef
The SELinux type of the config dir, if you want to specify something other than the default.
Default: undef
Where the local data should be kept (git trees and indexes). The daemons are not expected to write to it.
Defaults:
publicinbox::var_dir: '/var/lib/public-inbox'
publicinbox::var_dir_owner: 'root'
publicinbox::var_dir_group: 'root'
publicinbox::var_dir_mode: '0775'
publicinbox::seltype: undef
Where the logs will go.
Defaults:
publicinbox::log_dir: '/var/log/public-inbox'
publicinbox::log_dir_seltype: undef
User/group settings for the public-inbox listening daemons.
Defaults:
publicinbox::manage_user_group: true
publicinbox::daemon_user: 'publicinbox'
publicinbox::daemon_group: 'publicinbox'
Whether to enable the daemons and on which port to run them. The default httpd port is 8080 because it is assumed you will be running a reverse-proxy in front of it.
Defaults:
publicinbox::enable_httpd: true
publicinbox::httpd_listen_port: 8080
publicinbox::httpd_daemon_flags: undef
publicinbox::enable_nntpd: true
publicinbox::nntpd_listen_port: 119
publicinbox::nntpd_daemon_flags: undef
publicinbox::enable_imapd: false
publicinbox::imapd_listen_port: 143
publicinbox::imapd_daemon_flags: undef
publicinbox::enable_pop3d: false
publicinbox::pop3d_listen_port: 110
publicinbox::pop3d_daemon_flags: undef
You can manage the contents of /etc/public-inbox/config using the publicinbox::config hash.
publicinbox::config::nntpserver: 'nntp://news.example.com'
Will create:
[publicinbox]
nntpserver=nntp://news.example.com
publicinbox::config::pop3state: '/var/lib/public-inbox'
Will create:
[publicinbox]
pop3state=/var/lib/public-inbox
publicinbox::config::watch:
spamcheck: 'spamc'
watchspam: '/var/spool/mail/example'
Will create:
[publicinboxwatch]
spamcheck=spamc
watchspam=/var/spool/mail/example
This uses the following general structure:
publicinbox::config::lists:
identifier:
param:
- 'value1'
- 'value2'
- 'etc'
Parameter values can be either strings or arrays and the module will do the right thing regardless.
For example:
publicinbox::config::lists:
lkml:
address: 'linux-kernel@vger.kernel.org'
mainrepo: '/var/lib/public-inbox/lkml'
url: 'https://lkml.example.com'
newsgroup: 'org.kernel.vger.linux-kernel'
watch: '/var/spool/mail/lkml'
watchheader: 'List-Id:<linux-kernel.vger.kernel.org>'
Will create:
[publicinbox "lkml"]
address=linux-kernel@vger.kernel.org
mainrepo=/var/lib/public-inbox/lkml
url=https://lkml.example.com
newsgroup=org.kernel.vger.linux-kernel
watch=/var/spool/mail/lkml
watchheader=List-Id:<linux-kernel.vger.kernel.org>
Written and tested for CentOS 7 only, and will require some hacking to make it work on other distros (patches welcome).