1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00
# Conflicts:
#	management/dns_update.py
#	management/web_update.py
#	tests/test_mail.py
This commit is contained in:
downtownallday
2021-05-15 22:35:48 -04:00
16 changed files with 192 additions and 134 deletions

View File

@@ -5,6 +5,7 @@ export PRIMARY_HOSTNAME=${PRIMARY_HOSTNAME:-$(hostname --fqdn || hostname)}
export NONINTERACTIVE=${NONINTERACTIVE:-1}
export SKIP_NETWORK_CHECKS=${SKIP_NETWORK_CHECKS:-1}
export SKIP_SYSTEM_UPDATE=${SKIP_SYSTEM_UPDATE:-1}
export SKIP_CERTBOT=${SKIP_CERTBOT:-1}
export STORAGE_USER="${STORAGE_USER:-user-data}"
export STORAGE_ROOT="${STORAGE_ROOT:-/home/$STORAGE_USER}"
export EMAIL_ADDR="${EMAIL_ADDR:-qa@abc.com}"

View File

@@ -79,7 +79,7 @@ if not smtpd:
if len(sys.argv) - argi != 3: usage()
host, login, pw = sys.argv[argi:argi+3]
argi+=3
port=587
port=465
else:
if len(sys.argv) - argi != 1: usage()
host = sys.argv[argi]
@@ -102,7 +102,6 @@ This is a test message. It should be automatically deleted by the test script.""
)
def imap_login(host, login, pw):
# Attempt to login with IMAP. Our setup uses email addresses
# as IMAP/SMTP usernames.
@@ -150,9 +149,12 @@ def imap_test_dkim(M, num):
def smtp_login(host, login, pw, port):
# Connect to the server on the SMTP submission TLS port.
server = smtplib.SMTP(host, port)
if port == 587 or port == 25:
server = smtplib.SMTP(host, port)
server.starttls()
else:
server = smtplib.SMTP_SSL(host)
#server.set_debuglevel(1)
server.starttls()
# Verify that the EHLO name matches the server's reverse DNS.
ipaddr = socket.gethostbyname(host) # IPv4 only!