Forge Home

nullmailer

Install and configure nullmailer as a simple mail relay

35,243 downloads

32,129 latest version

1.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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.3.2 (latest)
  • 1.3.1
  • 1.2.2
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Jul 16th 2013

Start using this module

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

Add this module to your Puppetfile:

mod 'akumria-nullmailer', '1.3.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add akumria-nullmailer
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install akumria-nullmailer --version 1.3.2

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

Documentation

akumria/nullmailer — version 1.3.2 Jul 16th 2013

Puppet module for nullmailer

Nullmailer is useful in situations where you have machines but do not wish to configure them with a full email service (mail transfer agent, MTA).

Particularly to send email about local activity to a centralised place.

By default, the module will configure things to be sent, via SMTP, to the machine:

smtp.$::domain

and then to the address:

root@$::domain

i.e. given $::domain is 'example.com', mail would be sent to root@example.com via SMTP to smtp.example.com

This may require you to configure your SMTP server to accept incoming email from various machines.

NOTE: /etc/mailname must be set to a reasonable value. This module will, by default, set it to $::fqdn

Basic usage

class {'nullmailer':  }

To configure who will receive all email:

class {'nullmailer':
    adminaddr => "puppet-rockstar@example.com"
}

Or to change the machine where email is sent to:

class {'nullmailer':
    remoterelay => "elsewhere.example.com"
}

When modifying these parameters, please ensure the value is in double quotes.

Other things to modify are listed in the init.pp file

Advanced usage

nullmailer is also able to use a remote relay which is on a different port, requires authentication, etc.

As the combination of options will vary widely between various setups, instead a 'remoteopts' variable is provided.

class {'nullmailer':
    remoteopts => "--port=2525"
}

Send to port 2525 instead of port 25

class {'nullmailer':
    remoteopts => "--user=foo --pass=bar"
}

Other available options (for Nullmailer 1.10+) are:

  • --port, set the port number of the remote host to connect to
  • --user, set the user name to be used for authentication
  • --pass, set the password for authentication
  • --auth-login, use AUTH LOGIN instead of auto-detecting in SMTP
  • --ssl, Connect using SSL (on port 465 instead) (1.10+)
  • --starttls, use STARTTLS command (1.10+)
  • --x509cafile, Certificate authority trust file (1.10+)
  • --x509crlfile, Certificate revocation list file (1.10+)
  • --x509fmtdef, X.509 files are in DER format (1.10+)
  • --insecure, Do not abort if server certificate fails validation (1.10+)

Another use case might be not rewriting, or even having, a specific admin address to send email to. In this case, set adminaddr to the magic value of an empty string, like so;

class {'nullmailer':
    adminaddr => '',
}

With things set up like this the remoterelay decides what addresses will be rewritten rather than all of them being rewritten at the client prior to sending.

Notes

nullmailer is capable of handling multiple remote SMTP servers for delivery. If this is your setup, this module will not work out of the box for you.

Contributors

Copyright and License

Copyright 2012-2013 Linuxpeak Pty Ltd.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.