Haraka: STARTTLS queue/smtp_forward though maybe smtp_client issue Not Working

Haraka version

Haraka.js — Version: 2.8.0-alpha.7

Expected behavior

smtp_client will issue a “STARTTLS” command when talking on port 587, and therefore work (i think) with amazon SES

Observed behavior

I noticed that the smtp_forward plugin doesn’t work with SES. I get the following error:

[NOTICE] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [core] message mid="<abcd@mess.com>" size=1458 rcpts=1/0/0 delay=0.002 code=CONT msg=""
[DEBUG] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [core] running queue_outbound hooks
[DEBUG] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [core] running queue_outbound hook in queue/smtp_forward plugin
[DEBUG] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward]
[INFO] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] forwarding to email-smtp.us-west-2.amazonaws.com:587
[INFO] [-] [core] [smtp_client_pool] [587:email-smtp.us-west-2.amazonaws.com:300] dispense() clients=1 available=0
[DEBUG] [-] [core] [smtp_client_pool] [587:email-smtp.us-west-2.amazonaws.com:300] createResource() - creating obj - count=1 min=0 max=10
[DEBUG] [-] [core] [smtp_client_pool] uuid=4545934E-47CC-46AD-91A3-A5B79FCC3AD4 host=email-smtp.us-west-2.amazonaws.com port=587 pool_timeout=300 created
[DEBUG] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] Got smtp_client: 4545934E-47CC-46AD-91A3-A5B79FCC3AD4
[INFO] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] Configuring authentication for SMTP server email-smtp.us-west-2.amazonaws.com:587
[ERROR] [-] [core] client.socket.remoteAddress undefined!
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-1383310303 FpbSwsjPMyHTnpexjboB\r\n
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] C: EHLO ip-172-31-16-162
[INFO] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] Authenticating with AUTH PLAIN AKIAMSECRET
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] C: AUTH PLAIN SECRETPASSWORD
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 250-email-smtp.amazonaws.com\r\n
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 250-8BITMIME\r\n
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 250-SIZE 10485760\r\n
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 250-STARTTLS\r\n
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 250-AUTH PLAIN LOGIN\r\n
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 250 Ok\r\n
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] C: MAIL FROM:<admin@test.com>
[PROTOCOL] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [queue/smtp_forward] S: 530 Must issue a STARTTLS command first\r\n
[INFO] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [core] hook=queue_outbound plugin=queue/smtp_forward function=hook_queue params="" retval=DENY msg="Must issue a STARTTLS command first"
[DEBUG] [A380A9AE-4A27-49D8-944A-6A54C94C9D05.1] [core] running deny hooks

Steps to reproduce

Here is my smtp_forward config:

host=email-smtp.us-west-2.amazonaws.com
port=587
enable_tls=true
auth_type=plain
auth_user=AKIAMSECRET
auth_pass= SECRETPASSWORD
max_connections=10

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 28 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I’d like @smfreegard to take a look at my assumptions there.

On Apr 3, 2016, at 9:25 PM, Brad Ruderman notifications@github.com wrote:

@baudehlo I’m running the master branch. The initial ticket stands true to the bug I found. smtp_client is the culprit here as you mentioned.

That might be an issue - I didn’t write smtp_client.js - we really should unify it with outbound.js which works just fine with multiple mixed capabilities - but reading the code - it looks like it doesn’t cope well with STARTTLS in the capabilities in an earlier place.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub