Exemple #1
0
    DA投递给proxy的性能分析
    通邮问题占比
'''
import pdb
from total2 import getStatusCode
from ipaddr import updateIPmapping
from dbmange import Mysql
from send2Es import Deliver2ESWithpath
import datetime
import time
g_SumofDAFailure = 0
g_SumofDADeliver = 0
g_proxydict = {}
g_forCtyProxydict = {}
g_Erroecodedict = {}
mysqlInst = Mysql()
g_Deliverid = 0

Error_CHNdescribe = {
    250: "投递成功",
    400: "垃圾邮件",
    422: "用户状态错误",
    450: "连接断开",
    451: "重新投递",
    500: "服务器错误",
    550: "退信",
    551: "收信人不存在",
    552: "发送方超过每日邮件限额",
    553: "需要认证,不能匿名发信",
    554: "拒收"
}
Exemple #2
0
	elif strIPCountry.find(r"自治区") !=-1:# 匹配到自治区
		strcountry = strIPCountry[:strIPCountry.find(r"自治区")]
	elif strIPCountry.find(r"市") != -1:# 匹配到直辖市
		strcountry = strIPCountry[:strIPCountry.find(r"市")]
	elif strIPCountry.find(r"特别行政区") != - 1:#匹配到特别行政区
		strcountry = strIPCountry[:strIPCountry.find(r"特别行政区")]
	else:
		strcountry = strIPCountry
	if strcountry in CHN_CITY.keys(): # 在 中国列表中
		bInCHN = True
        if strcountry == "台湾":
            return "台湾"
        elif strcountry == "香港":
            return "香港"
        elif strcountry == "澳门":
            return "澳门"
        else:
            return "中国"
	return strIPCountry



if __name__ == '__main__':
    key = '37.13.12.12'
	#mysql = Mysql()
    mysql=Mysql()
    ret = initIpMapping(mysql)
    print ret
	#print updateIPmapping(key,mysql)
	#print len(CHN_CITY)