1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00

DNS, SPF, and DKIM

This commit is contained in:
Joshua Tauberer
2013-08-21 16:53:22 -04:00
parent e06b4f5ccf
commit 5cef1bb63d
8 changed files with 179 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import smtplib, sys, os
fromaddr = "testuser@testdomain.com"
fromaddr = "testuser@" + os.environ.get("DOMAIN", "testdomain.com")
msg = """From: %s
To: %s
@@ -10,7 +10,7 @@ This is a test message.""" % (fromaddr, sys.argv[1])
server = smtplib.SMTP(os.environ["INSTANCE_IP"], 587)
server.set_debuglevel(1)
server.starttls()
server.login("testuser@testdomain.com", "testpw")
server.login(fromaddr, "testpw")
server.sendmail(fromaddr, [sys.argv[1]], msg)
server.quit()