Skip to content

Guard against timeout when checking dns of email addresses #96

@jools-r

Description

@jools-r

I have been experiencing problems while testing a com_connect form on a local webserver with the local mailcatcher Helo (similar to Mailhog and co). On submission, the form stalls and times out after a long while with a 502 bad gateway. The smtp log file and php log files show nothing (the nginx log registers only the 502), and dmp-ing to a debug file also failed.

Eventually, by going back to a simple form and trial and error, I tracked it down to the com_connect_email tag, specifically the
lines 910-913 and 919 in which the DNS of the target email is checked. That was failing and then timing out.

The error is my own fault – my firewall was blocking outgoing connections from php-fpm – however, could the DNS check be made more error-tolerant, ideally returning a message after a certain amount of time has passed? It was hard to identify the problem.

Stef has found this stackoverflow thread for reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions