Commit 8b42d2f9 authored by nimrod's avatar nimrod
Browse files

Remove SMTP check on port 25.

Outbound traffic on port 25 is restricted by AWS. Removing the
restriction will raise the cost of the project.
parent b9f8eb28
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -23,7 +23,11 @@ def check_smtp(port):

def handler(event, context):  # pylint: disable=unused-argument
    """Lambda event handler."""
    for port in [25, 587]:
    # Port 25 is blocked for Lambda functions. To remove the restriction, the
    # functions need to execute inside a VPN with a NAT gateway. This will
    # raise the cost. For now assume that if the submission port is working,
    # the smtp port is working too (same gateway, same host, same processes).
    for port in [587]:
        success, message = check_smtp(port)
        print(message)
        if not success: