arensb.truenas.mail module – Manage TrueNAS email settings

Note

This module is part of the arensb.truenas collection (version 1.11.4).

To install it, use: ansible-galaxy collection install arensb.truenas.

To use it in a playbook, specify: arensb.truenas.mail.

New in arensb.truenas 1.3.0

Synopsis

  • Configure how TrueNAS sends mail.

Parameters

Parameter

Comments

from_email

string

Address from which system email will be sent. Must be in the form of an email address: user@dom.ain.

This is used as both the envelope and header “From” address.

from_name

string

Full name used in the email’s “From” header.

oauth_id

string

OAuth client ID.

oauth_secret

string

OAuth client secret.

oauth_token

string

OAuth access token.

port

integer

The TCP port on which to connect to the outgoing mail server.

Default: 25

security

string

The encryption to use for outgoing mail.

Choices:

  • "PLAIN"

  • "SSL"

  • "TLS"

server

string

Outgoing mail server. This may be either the hostname or IP address of an SMTP server.

smtp

boolean

If true, means that SMTP authentication is enabled on the server, and smtp_user and smtp_pass are required to log in.

See also smtp_user and smtp_password.

Choices:

  • false

  • true

smtp_password

string

Password for smtp_user on the SMTP server. Required if smtp=true.

See also smtp and smtp_user.

smtp_user

string

User to log in as on the SMTP server. Required if smtp=true.

See also smtp and smtp_password.

Examples

- name: Forward mail to a central server
  hosts: my-truenas-host
  tasks:
    - name: Forward to SMTP hub
      arensb.truenas.mail:
        from_email: root@my-truenas-host.dom.ain
        from_name: "Charlie Root"
        server: smtp.dom.ain