How to put a o MX record in directadmin for domains without mail to prevent spam

ikkeben

Verified User
Joined
May 22, 2014
Messages
1,558
Location
Netherlands Germany
"."
.

Are not working / permited in mx record in directadmin.

So what howto fill in that mx record if wanted a NULL 0 MX record.
According to this standard. https://tools.ietf.org/rfc/rfc7505.txt

A "Null MX" No Service Resource Record for Domains That Accept No Mail

Abstract

Internet mail determines the address of a receiving server through
the DNS, first by looking for an MX record and then by looking for an
A/AAAA record as a fallback. Unfortunately, this means that the
A/AAAA record is taken to be mail server address even when that
address does not accept mail. The No Service MX RR, informally
called "null MX", formalizes the existing mechanism by which a domain
announces that it accepts no mail, without having to provide a mail
server; this permits significant operational efficiencies.

Also a dropdown for domains without mail at all could be handy if domains are not used for that purpose.

Together with then setting this option in dns settings
"v=spf1 -all"

See here point 3
http://www.zytrax.com/books/dns/ch8/mx.html
# zone file fragment for example.com
# which will not accept any incoming email
# Attempts to send mail to this domain will result in:
# - a reply code 556
# - enhance status code 5.1.10
...
$ORIGIN example.com.
...
# NULL MX RR
# the single dot (.) signifies a null name
# and indicates definitively this domain cannot receive email
# use of zero in pref field indicates the highest preference
# This MUST be the only MX RR for this domain
MX 0 .
...

IF you put value:
0 or NULL
in it
Then it does it job but isn't the way to go i think message sending mail to this domain gives then
all relevant MX records point to non-existent hosts
 
Last edited:
Back
Top