Limpieza de codigo innecesario
parent
c2ec57b09a
commit
b363e7f791
|
@ -18,9 +18,9 @@ from .resolver import updateDNS
|
|||
smtprelayport = '10025'
|
||||
bindip = '0.0.0.0'
|
||||
|
||||
cacerts = '/etc/ssl/certs/ca-certificates.crt'
|
||||
keyfile = '/var/run/secrets/keyfile'
|
||||
certfile = '/var/run/secrets/certfile'
|
||||
# cacerts = '/etc/ssl/certs/ca-certificates.crt'
|
||||
# keyfile = '/var/run/secrets/keyfile'
|
||||
# certfile = '/var/run/secrets/certfile'
|
||||
|
||||
if not os.environ.get('SMTP_HOSTNAME'):
|
||||
banner_hostname = 'midominio.cl'
|
||||
|
@ -47,7 +47,7 @@ async def enviarCorreosDominio(dominioid):
|
|||
try:
|
||||
conectado = False
|
||||
try:
|
||||
smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=25, start_tls=True, use_tls=False, validate_certs=False, timeout=10)
|
||||
smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=25, start_tls=True, use_tls=False, validate_certs=False, timeout=10)
|
||||
await smtp.connect()
|
||||
conectado = True
|
||||
await log.debug('Conectado a START_TLS: 25 {}'.format(dbdireccion.ipaddr))
|
||||
|
@ -57,7 +57,7 @@ async def enviarCorreosDominio(dominioid):
|
|||
|
||||
if conectado == False:
|
||||
try:
|
||||
smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=465, use_tls=True, validate_certs=False, client_cert=certfile, client_key=keyfile, cert_bundle=cacerts, timeout=10)
|
||||
smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=465, use_tls=True, validate_certs=False, timeout=10)
|
||||
await smtp.connect()
|
||||
conectado = True
|
||||
await log.debug('Conectado a USE_TLS 456: {}'.format(dbdireccion.ipaddr))
|
||||
|
@ -67,7 +67,7 @@ async def enviarCorreosDominio(dominioid):
|
|||
|
||||
if conectado == False:
|
||||
try:
|
||||
smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=587, start_tls=True, validate_certs=False, client_cert=certfile, client_key=keyfile, cert_bundle=cacerts, timeout=10)
|
||||
smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=587, start_tls=True, validate_certs=False, timeout=10)
|
||||
await smtp.connect()
|
||||
conectado = True
|
||||
await log.debug('Conectado a START_TLS 587: {}'.format(dbdireccion.ipaddr))
|
||||
|
|
Loading…
Reference in New Issue