Forge Home

procmail

Module to manage procmailrc

12,481 downloads

12,481 latest version

3.9 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Jun 20th 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'jasper-procmail', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add jasper-procmail
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install jasper-procmail --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: procmail

Documentation

jasper/procmail — version 0.1.0 Jun 20th 2014

procmail

Overview

This module installs procmail and creates .procmailrc files for users though the procmail::conf type.

Usage

First classify the node with the module:

include procmail

Then for example in Hiera:

procmail::configs:
  'jasper':
    extra_vars:
      'lockfile': '/home/jasper/.lockmail'
    rules:
      - comment:   'spam spam spam'
        condition: '^X-Spam-Status: Yes'
        action:    '$MAILDIR/Spam/'

This will then create /home/jasper/.procmailrc with the following contents:

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
MAILDIR=/home/jasper/Maildir
DEFAULT=/var/mail/jasper
LOCKFILE=/home/jasper/.lockmail

#
# spam spam spam
#
:0
* ^X-Spam-Status: Yes
$MAILDIR/Spam/

#
# Match every remaining mail.
#
:0
* .*
$MAILDIR/

If you ommit the action parameter:

rules:
  - comment:   'Spam'
    condition: '^X-Spam-Status: Yes'

a default action rule will be created:

#
# Spam
#
:0
* ^X-Spam-Status: Yes
$MAILDIR/Spam/

Copyright

2014 Jasper Lievisse Adriaanse jasper@humppa.nl Released under the terms of the MIT license, please see LICENSE

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request