From 8cb5b9af636a4ca373631184dd85efdd3fc55aac Mon Sep 17 00:00:00 2001 From: Israel Figueroa Date: Fri, 21 Jan 2022 19:47:05 -0300 Subject: [PATCH] TLS test --- mayordomo/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mayordomo/__init__.py b/mayordomo/__init__.py index 0353a7a..93df2b5 100644 --- a/mayordomo/__init__.py +++ b/mayordomo/__init__.py @@ -50,6 +50,7 @@ async def enviarCorreosDominio(dominioid): smtp = aiosmtplib.SMTP(hostname=str(dbdireccion.ipaddr), source_address=banner_hostname, port=465, use_tls=True, validate_certs=True, client_cert=certfile, client_key=keyfile, cert_bundle=cacerts, timeout=10) await smtp.connect() conectado = True + await log.debug('Conectado a USE_TLS: {}'.format(dbdireccion.ipaddr)) except Exception as e: conectado = False await log.debug('Error al conectar al servidor use_tls: {}'.format(e)) @@ -60,6 +61,7 @@ async def enviarCorreosDominio(dominioid): await smtp.connect() await smtp.starttls() conectado = True + await log.debug('Conectado a START_TLS: {}'.format(dbdireccion.ipaddr)) except Exception as e: conectado = False await log.debug('Error al conectar al servidor start_tls: {}'.format(e)) @@ -69,6 +71,7 @@ async def enviarCorreosDominio(dominioid): await smtp.connect() await smtp.helo(banner_hostname) conectado = True + await log.debug('Conectado a capela: {}'.format(dbdireccion.ipaddr)) except Exception as e: conectado = False await log.debug('Error al conectar al servidor {}: {}'.format(dbdireccion.ipaddr, e))