class RedZone::MailExchange

A mail server record

Attributes

machine[R]

Get the target machine hosting the mail exchange

name[R]

MX Server name / alias

priority[R]

MX Priority

Public Class Methods

new(name,machine,priority) click to toggle source

Constructs a new MailExchange entry @param [String] name Server name / alias @param [Machine] machine Target machine @param [Integer] priority MX priority setting

# File lib/redzone/mail_exchange.rb, line 17
def initialize(name,machine,priority) 
  @name     = name
  @machine  = machine.alias(@name)
  @priority = priority
end

Public Instance Methods

records() click to toggle source

Get the list of MX records @return [Array<Record>]

# File lib/redzone/mail_exchange.rb, line 24
def records
  [Record.new(:name => "@", :type => "MX", :data => "#{@priority} #{@name}")]
end