~ubuntu-branches/ubuntu/trusty/zonecheck/trusty-proposed

« back to all changes in this revision

Viewing changes to test/mail.rb

  • Committer: Package Import Robot
  • Author(s): Sebastien Delafond
  • Date: 2014-01-04 23:21:28 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20140104232128-93pqy2o96fkrkq0k
Tags: 3.0.5-1
meh

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# ZCTEST 1.0
2
 
# $Id: mail.rb,v 1.39 2010/06/07 08:51:25 chabannf Exp $
 
2
# $Id: mail.rb,v 1.40 2010/10/22 14:21:22 bortzmeyer Exp $
3
3
 
4
4
5
5
# CONTACT     : zonecheck@nic.fr
6
6
# AUTHOR      : Stephane D'Alu <sdalu@nic.fr>
7
7
#
8
8
# CREATED     : 2002/09/25 19:14:21
9
 
# REVISION    : $Revision: 1.39 $ 
10
 
# DATE        : $Date: 2010/06/07 08:51:25 $
 
9
# REVISION    : $Revision: 1.40 $ 
 
10
# DATE        : $Date: 2010/10/22 14:21:22 $
11
11
#
12
12
# CONTRIBUTORS: (see also CREDITS file)
13
13
#
223
223
        # DESC:
224
224
        def chk_mail_hostmaster_mx_cname
225
225
            rname = soa(bestresolverip).rname
226
 
            mdom  = rname
 
226
            mdom  = Dnsruby::Name::create(rname.labels[1..-1]) if rname.labels.size > 1
227
227
            mhost = bestmx(mdom)
228
228
            return true if mhost.nil?   # No MX
229
229
            ! is_cname?(mhost)