Extra DNS records for all domains

I’m about to sign up with the MB backup MX service.

Is there a way to automatically add in the required MX records so that they’ll be included in the template for all domains?

Thanks

Andy

You should be able to simply add a text file to the config/dns directory with the relevant record in tinydns format, so something like:

@example.com::mx.mythic-beasts.com:100:600
or
@example.com::mx1.mythic-beasts.com:100:600
@example.com::mx2.mythic-beasts.com:100:600
(both give the same results).

Would be an MX record for example.com, pointing to the Mythic Beasts MX records, with a priority of 100 (less-important than the default 15 Sympl uses) and a TTL of 10 min.

Bearing in mind that there’s not really a huge amount of utility with backup MX unless you don’t have IPv4 connectivity or expect your server to be unavailable for long stretches of time - any decent remote MX will retry periodically for a couple of days, and it also negates your ability to filter mail on things like connection IPs (Spamhaus blacklists, etc), as they can still go via the backup route, which isn’t uncommon for spam.

This kind of functionality, ie: server-level default DNS records which apply to all domains, and non-domain-specific records are on the feature list for the DNS rework when that comes along.

Yeah, I knew how to do it on a per-domain basis, was just wondering if there was a way to do it ‘globally’. Looks like currently there isn’t.

Point taken about fallback MX. The reason I was considering it was mainly because of the planned upgrade to the new Debian, where currently the recommendation is to remove Sympl (so I was wondering what would happen to email during that period).

Thanks

Andy

You could hack the master template /etc/sympl/dns.d/tinydns.template.erb at the risk of missing a fresher version on upgrade, then --force regenerate, as necessary.

(I suspect the final section …

%if domain.respond_to?(:mailboxes) and domain.mailboxes.length > 0
#
# SRV records for various mail services
#
:_submission._tcp.<%= domain %>:33:<%= domain.srv_record_for(0,5,587, "mail."+domain) %>:<%= ttl %>
:_imap._tcp.<%= domain %>:33:<%= domain.srv_record_for(0,5,143, "mail."+domain) %>:<%= ttl %>
:_imaps._tcp.<%= domain %>:33:<%= domain.srv_record_for(0,5,993, "mail."+domain) %>:<%= ttl %>
:_pop3._tcp.<%= domain %>:33:<%= domain.srv_record_for(10,5,110, "mail."+domain) %>:<%= ttl %>
:_pop3s._tcp.<%= domain %>:33:<%= domain.srv_record_for(10,5,995, "mail."+domain) %>:<%= ttl %>

% end

…doesn’t generate output because of the opening “%if” rather than “% if”).

That’s an option I guess, but your caveat of potentially missing updated versions might give me pause.

I’ll just write a script to generate an appropriate file for a given domain.

Thanks all

Andy

In my experience, doing an update takea an hour or so at most. Having a mail server offline for a few days doesn’t lose any* incoming mail, though of course it is felayed.

*Well, maybe some spammers won’t bother to retry.

Yeah, you’re probably right. I’ll see how it goes, and try to remember to check how much is going through the backup MXs.

Andy