Coder Social home page Coder Social logo

rsclarke / terraform-cloudflare-fastmail-email Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 3.0 10 KB

MX, SPF, DKIM and DMARC records with MTA-STS policy for email hosted by Fastmail

Home Page: https://registry.terraform.io/modules/rsclarke/fastmail-email/cloudflare/latest

License: MIT License

HCL 100.00%
terraform cloudflare email spam-protection spf mx dkim dmarc security mta-sts

terraform-cloudflare-fastmail-email's Introduction

terraform-cloudflare-fastmail-email

MX, SPF, DKIM and DMARC records with MTA-STS policy (via terraform-cloudflare-mta-sts) for email hosted by Fastmail.

This creates cloudflare_record resources for MX, SPF, DKIM, DMARC and MTA-STS of the given zone_id suitable for fastmail.com. A Cloudflare Worker as part of the terraform-cloudflare-mta-sts dependency serves the MTA-STS policy.

The SPF policy includes Fastmail by default and rejects all others (-all), additional terms can be specified using the spf_terms variable.

The DMARC policy is set to reject and you must provide an email address for DMARC Aggregate and Failure reports through the dmarc_rua and dmarc_ruf variables respectively. Similarly, a TLS aggregate reporting location (mailto: or https:) must be specified in the tlsrpt_rua variable.

Usage

resource "cloudflare_zone" "example_com" {
  zone = "example.com"
}

module {
  source = "rsclarke/fastmail-email/cloudflare"

  zone_id   = cloudflare_zone.example_com.id
  zone_name = cloudflare_zone.example_com.name

  dmarc_rua = ["[email protected]"]
  dmarc_ruf = ["[email protected]", "[email protected]"]
  spf_terms = ["-ip4:192.0.2.0/24", "+ip6:2001:DB8::/32"]

  mta_sts_mode    = "enforce"
  mta_sts_mx      = ["mx.example.net"]
  mta_sts_max_age = 604800
  tlsrpt_rua      = ["mailto:[email protected]", "https://example.org/mta-sts/report"]
}

Providers

Name Version
cloudflare >= 2.0

Inputs

Name Description Type Required
zone_id Cloudflare Zone ID string yes
zone_name Cloudflare Zone Name string yes
dmarc_rua Email addresses for DMARC Aggregate reports (excluding mailto:), at least one and contains the @ symbol. list(string) yes
dmarc_rua Email addresses for DMARC Failure (or Forensic) reports (excluding mailto:), at least one and contains the @ symbol. list(string) yes
spf_terms Additional SPF terms to include, include:spf.messagingengine.com -all are already provided. list(string) no
mta_sts_mode Sending MTA policy application, rfc8461#section-5. Default testing string no
mta_sts_mx List of additional permitted MX hosts for the MTA STS policy. This does not create the resources for. list(string) no
mta_sts_max_age Maximum lifetime of the MTA STS policy in seconds, up to 31557600, defaults to 604800 (1 week) number no
tlsrpt_rua Locations to which MTA STS aggregate reports about policy violations should be sent, either mailto: or https: schema. list(string) yes

Outputs

This module does not expose any outputs.

terraform-cloudflare-fastmail-email's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

terraform-cloudflare-fastmail-email's Issues

Add the option to specify additional SPF mechanisms

At the moment, only Fastmail is specified on the include list, all others are rejected by -all.

Allow users to specify additional mechanisms to include in the SPF record. This is required for example if they use marketing or transactional email services.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.