Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amazon SES worker has unused $_SMTP variable #1850

Open
kareila opened this issue Aug 7, 2016 · 5 comments · Fixed by #1871
Open

Amazon SES worker has unused $_SMTP variable #1850

kareila opened this issue Aug 7, 2016 · 5 comments · Fixed by #1871

Comments

@kareila
Copy link
Member

kareila commented Aug 7, 2016

Again from @alierak pointing out that there's a variable in send-email-ses that looks like it was intended to cache an open SMTP connection and reuse it across requests, but the variable is never assigned a value other than undef.

kareila added a commit to kareila/dreamwidth that referenced this issue Sep 26, 2016
kareila added a commit to kareila/dreamwidth that referenced this issue Sep 26, 2016
Also make sure the job fails if auth doesn't return true.
kareila added a commit to kareila/dreamwidth that referenced this issue Oct 2, 2016
@kareila
Copy link
Member Author

kareila commented Oct 2, 2016

Reopening because this wasn't working in production.

@kareila kareila reopened this Oct 2, 2016
@alierak
Copy link
Member

alierak commented Oct 2, 2016

With caching, we started to see odd failures when a connection was reused, mostly "Error during MAIL phase... 000" or "Error during MAIL phase... 599 Connection closed". I think when grabbing a connection from the cache it's probably going to be necessary to issue some command on it like a RSET or whatever just to check whether it's still open. Unfortunately the behavior of RSET with respect to SMTP AUTH state is not well-defined, so maybe NOOP would be the right choice to test the connection.

@alierak
Copy link
Member

alierak commented Oct 2, 2016

Naturally Net::SMTP{S} exposes a reset method but not noop.

@alierak
Copy link
Member

alierak commented Oct 2, 2016

Alternatively I guess we could check specifically for return codes of 000 and 599, tempfail those and drop the cached connection.

@alierak
Copy link
Member

alierak commented Oct 2, 2016

Looks like it does have a _NOOP method, so that might work anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants