Ruby DnsMock v1.2.0 Release Notes
Release Date: 2021-02-04 // about 3 years ago-
➕ Added
- Ability to specify custom priority of MX record if it needed
🏗 Now is possible to define null or backup MX records. Please note, if you haven't specified a priority of MX record, it will be assigned automatically. MX records builder is assigning priority with step 10 from first item of defined MX records array.
records = { 'example.com' => { mx: %w[.:0 mx1.domain.com:10 mx2.domain.com:10 mx3.domain.com] # .:0 - null MX record } } DnsMock.start_server(records: records)
dig @localhost -p 5300 MX example.com
; <<>> DiG 9.10.6 <<>> @localhost -p 5300 MX example.com ;; ANSWER SECTION: example.com. 1 IN MX 0 . example.com. 1 IN MX 10 mx1.domain.com. example.com. 1 IN MX 10 mx2.domain.com. example.com. 1 IN MX 40 mx3.domain.com. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#5300(127.0.0.1) ;; WHEN: Wed Feb 03 20:19:51 EET 2021 ;; MSG SIZE rcvd: 102