This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh /etc/rc.common | |
START=98 | |
USE_PROCD=1 | |
NAME=iface-colors | |
PROG=/root/iface-colors | |
start_service() { | |
procd_open_instance |
This guide now lives at https://github.com/joyeusenoelle/GuideToMastodon/ - please check there for updates, and feel free to submit a PR if you have suggestions or want to submit a translation!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Validates that MX record exists for domain to prevent typos and also block by MX servers | |
# Use by adding to app/models/user.rb | |
# validates_with EmailMXValidator, if: :email_changed? | |
# frozen_string_literal: true | |
require 'resolv' | |
class EmailMXValidator < ActiveModel::Validator | |
def validate(user) | |
domain = user.email.split('@', 2).last | |
mxs = Resolv::DNS.new.getresources(domain, Resolv::DNS::Resource::IN::MX).to_a.map { |e| e.exchange.to_s } |
DNS SRV records are a little cryptic. Even when you create them, it's not particularly obvious what the information in the SRV record actaully means.
When creating the records with Terraform, you can for_each
the resource to supply one or more maps that contain better descriptors of the SRV record's constituent components. See the example in the terraform snippet below. Refer here for a longer explanation.
OlderNewer