def __init__(self, smtpconfigfile):
        self.server = "127.0.0.1"
        self.timeout = 300
        self.port = 25
        self.to = "root@127.0.0.1"
        self.fromaddress = "root@127.0.0.1"
        self.login = ""
        self.password = ""
        self.requirelogin = False
        self.usetls = False

        # read the config file
        cEmailConfig = MailConfig(smtpconfigfile)
        cEmailConfig.readConfigFile()
        serverconfigs = cEmailConfig.serverinfo
        # connect to the first one that is listening
        print "[+] Config file appears to contain %d mail server definitions" % len(serverconfigs)
        for mailid in serverconfigs:
            thisconfig = serverconfigs[mailid]
            if "server" in thisconfig:
                self.server = thisconfig["server"]
            if "port" in thisconfig:
                self.port = int(thisconfig["port"])
            print (self.server, self.port) % "[+] Checking if %s:%d is reachable"
            if check_port(self.server, self.port):
                # fill out the rest and terminate the loop
                print "    Yup, port is open"
                if "timeout" in thisconfig:
                    self.timeout = int(thisconfig["timeout"])
                if "auth" in thisconfig:
                    if thisconfig["auth"] == "yes":
                        self.requirelogin = True
                    else:
                        self.requirelogin = False
                if "user" in thisconfig:
                    self.login = thisconfig["user"]
                if "pass" in thisconfig:
                    self.password = thisconfig["pass"]
                if "tls" in thisconfig:
                    if thisconfig["tls"] == "yes":
                        self.usetls = True
                    else:
                        self.usetls = False
                if "to" in thisconfig:
                    self.to = thisconfig["to"]
                if "from" in thisconfig:
                    self.fromaddress = thisconfig["from"]
                break
            else:
                print "    Nope"
        return
dataset/ETHPy150Open corelan/dnshjmon/dnshjmon.py/Mailer.__init__/swapped operands of `%`