Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

ssmtp2 (5) Versions 0.3.1

Installs/Configures ssmtp

Policyfile
Berkshelf
Knife
cookbook 'ssmtp2', '~> 0.3.1', :supermarket
cookbook 'ssmtp2', '~> 0.3.1'
knife supermarket install ssmtp2
knife supermarket download ssmtp2
README
Dependencies
Changelog
Quality 33%

ssmtp2 Cookbook

A cookbook to configure the ssmtp utility. The ssmtp tool is a mail transfer agent (MTA), whose only function is to send messages from the local system to a proper mail relay. The means that systems which previously used full-blown MTAs like sendmail/postfix/exim/etc... to send mail off to other systems, but never had a requirement to receive or process mail, can use ssmtp as a drop-in replacement; with a much simpler configuration, and likely less security concerns. This cookbook provides access to all documented configuration variables, and will generated a revaliases file, if the attribute is set. The data bag used by this cookbook will allow easy swapping of upstream mail host configuration by simply changing the mail host attribute. This could be handy in multi-region AWS deployments where you are using Amazon's SES service and want to swap between the SES servers in different regions, without the need to updated attributes for the entire mail server configuration.

Requirements

Ruby 1.9 or later

cookbooks

  • yum - to configure the epel repo on REHL-ish platforms

platforms

  • RHEL/CentOS
  • Fedora
  • Ubuntu
  • Debian

data bags

A data bag (encrypted, or not) can be used to hold mail host configuration, including sensitive authentication credentials. The data bag format uses keys which are the names of the upstream mail host, and the values are hashes of configuration information for the specific mail host. The recipe's data bag hash key lookup logic uses the value of the ['ssmtp']['mailhub']['host'] attribute. Valid keys for the values hash are (none are required, but storing the 'username' and 'password' in an encrypted data bag is highly recommended):

  • port (the port to connect to the mail host, overrides the value of attribute ['ssmtp']['mailhub']['port'])
  • username (the username to use to authenticate to this mail host, overrides the value of attribute ['ssmtp']['auth']['username'])
  • password (the password to use to authenticate to this mail host, overrides the value of attribute ['ssmtp']['auth']['password'])
  • auth_method (the authorization method to use, only supported value is cram-md5, overrides the value of attribute ['ssmtp']['auth']['method']
  • use_tls (a boolean to enable TLS communication with the mail host, overrides the value of attribute ['ssmtp']['tls']['use_tls'])
  • use_starttls (a boolean to determine if the STARTTLS command is sent to the mail host, overrides the value of attribute ['ssmtp']['tls']['use_starttls'])
  • tls_auth_cert (the path to the file which contains the TLS authorization certificate, if the mail host requires one; overrides the value of attribute ['ssmtp']['tls']['tls_auth_cert'])
  • tls_auth_key (the path to the file which contains the TLS authorization key, if the mail host requires one; overrides the value of attribute ['ssmtp']['tls']['tls_auth_key'])

Attributes

ssmtp2::default

  • ['ssmtp']['conf_dir']

    Type: String

    Description: The location of the ssmtp configuration files

    Default: /etc/ssmtp

  • ['ssmtp']['debug']

    Type: Boolean

    Description: Enable the Debug setting in the ssmtp.conf file

    Default: false

  • ['ssmtp']['mailhub']['host']

    Type: String

    Description: The host name of the upstream mail server

    Default: localhost

  • ['ssmtp']['mailhub']['port']

    Type: Integer

    Description: The port number of the upstream mail server

    Default: 25

  • ['ssmtp']['hostname']

    Type: String

    Description: The hostname of the local system

    Default: the value of the node['hostname'] attribute

  • ['ssmtp']['rewrite_domain']

    Type: String

    Description: The domain name to masquerade outgoing mail as

    Default: the value of the node['domain'] attribute

  • ['ssmtp']['from_line_override']

    Type: Boolean

    Description: Specifies whether the From header of an email, if any, may override the default domain

    Default: true

  • ['ssmtp']['root']

    Type: String

    Description: The user that gets all mail for userids less than 1000. If blank, address rewriting is disabled.

    Default:

  • ['ssmtp']['auth']['enabled']

    Type: Boolean

    Description: If false, do not put authentication credentials in config file (no authentication will be attempted with the mail server)

    Default: true

  • ['ssmtp']['auth']['username']

    Type: String

    Description: The username to use for authentication with the upstream mail server

    Default:

  • ['ssmtp']['auth']['password']

    Type: String

    Description: The password to use for authentication with the upstream mail server

    Default:

  • ['ssmtp']['auth']['method']

    Type: String

    Description: The authentication method to use with the upstream mail server

    Default: no default, only supported value is cram-md5

  • ['ssmtp']['tls']['tls_ca_file']

    Type: String

    Description: The location of the CA certificate bundle to validate the mail server's SSL cert

    Default: Attempt to find the file in common OS locations if no value is specified

  • ['ssmtp']['tls']['tls_ca_dir']

    Type: String

    Description: The location of a directory containing trusted CA certificates to validate the mail server's SSL cert

    Default: Attempt to find the file in common OS locations if no value is specified

  • ['ssmtp']['tls']['use_tls']

    Type: Boolean
    Description: If true, use TLS/SSL to communication with the upstream mail server

    Default: true

  • ['ssmtp']['tls']['use_starttls']

    Type: Boolean

    Description: If true, will send the STARTTLS command to the upstream mail server

    Default: false

  • ['ssmtp']['tls']['tls_auth_cert']

    Type: String

    Description: The path to the file containing the authentication certificate for the upstream mail server, if required

    Default:

  • ['ssmtp']['tls']['tls_auth_key']

    Type: String

    Description: The path to the file containing the authentication key for the upstream mail server, if required

    Default:

  • ['ssmtp']['data_bag']['name']

    Type: String

    Description: The name of the data bag that contains mail host configuration

    Default: mail

  • ['ssmtp']['data_bag']['item']

    Type: String

    Description: The name of the data bag item that contains the mail host configuration

    Default: ssmtp

  • ['ssmtp']['data_bag']['format']

    Type: String

    Description: Specifies whether or not the data bag is encrypted. A value of 'plain' will use an unencrypted data bag

    Default: encrypted

  • ['ssmtp']['aliases']

    Type: Hash

    Description: A hash of os_user => mail_alias entries, to be put in the revaliases file

    Default: empty hash

Usage

ssmtp2::default

Just include ssmtp2 in your node's run_list or in a include_recipe directive within a recipe

License and Authors

Authors: Michael Morris

License: 3-clause BSD

Dependent cookbooks

yum-epel >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

ssmtp2 CHANGELOG

0.1.0

0.2.0

0.2.1

0.3.0

Collaborator Number Metric
            

0.3.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.3.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.3.1 failed this metric

FC064: Ensure issues_url is set in metadata: ssmtp2/metadata.rb:1
FC065: Ensure source_url is set in metadata: ssmtp2/metadata.rb:1
FC066: Ensure chef_version is set in metadata: ssmtp2/metadata.rb:1
FC069: Ensure standardized license defined in metadata: ssmtp2/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.3.1 passed this metric

Testing File Metric
            

0.3.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.3.1 passed this metric