3

Recently I've noticed that the Apple Mail app on macOS takes about 60 seconds to send emails via a certain SMTP server (my primary mail server). I don't recall any particular upgrade to either my operating system or mail server that may have triggered this, so I'm not sure why it's started happening as Mail has been happily using this mail server for many years.

I've performed a connection test from within the Mail app and looked at the Mail logs and the mail server (postfix) logs and this is what I can see:

Logs from Mail.app:

INITIATING CONNECTION Aug 07 19:12:06.024 host:<my-mail-server> -- port:<port> -- socket:0x0 -- thread:0x6000002e2fc0

CONNECTED Aug 07 19:13:07.110 [kCFStreamSocketSecurityLevelNone] -- host:<my-mail-server> -- port:<port> -- socket:0x6000032c4420 -- thread:0x6000002e2fc0

READ Aug 07 19:13:07.260 [kCFStreamSocketSecurityLevelNone] -- host:<my-mail-server> -- port:<port> -- socket:0x6000032c4420 -- thread:0x6000002e2fc0
220 <my-mail-server> ESMTP Postfix (Ubuntu)

WROTE Aug 07 19:13:07.272 [kCFStreamSocketSecurityLevelNone] -- host:<my-mail-server> -- port:<port> -- socket:0x6000032c4420 -- thread:0x6000002e2fc0
EHLO [<my-ip-address>]

// Followed by the basic SMTP handshake and connection test.

Logs from postfix:

Aug  7 19:12:06 <server> postfix/smtpd[23750]: connect from unknown[<my-ip-address>]
Aug  7 19:13:01 <server> postfix/master[1324]: warning: master_wakeup_timer_event: service pickup(public/pickup): Connection refused
Aug  7 19:13:07 <server> postfix/smtpd[23750]: lost connection after UNKNOWN from unknown[<my-ip-address>]
Aug  7 19:13:07 <server> postfix/smtpd[23750]: disconnect from unknown[<my-ip-address>] unknown=0/3 commands=0/3
Aug  7 19:13:07 <server> postfix/smtpd[23750]: connect from unknown[<my-ip-address>]
Aug  7 19:13:08 <server> postfix/smtpd[23750]: disconnect from unknown[<my-ip-address>] ehlo=2 starttls=1 auth=1 quit=1 commands=5

From the mail server logs it seems like the client connects, times out after 60 seconds, connects again and then instantly succeeds, whereas from the Mail logs it looks like it just takes 60 seconds to connect in the first place.

I've tested the same mail server and credentials with both an iPhone and an iPad and neither of them have the same issue.

Is there anything I can do to resolve this?

Edit: I have just updated my operating system to macOS 10.15.6 and restarted but the issue still persists.

Edit 2: I've just set up a new 2019 MacBook Pro and continue to experience the same issue, which suggests that it is an issue with the mailserver, but doesn't explain why it works fine on an iPhone and iPad.

3
  • 1
    Is the connection secure? Might the TLS certificate checks be a cause of the delay? OCSP check timing out? Aug 7, 2020 at 8:16
  • 1
    That's a good point. I've checked the certificate and it is valid until January 2021 and I've done the tests at mxtoolbox.com/SuperTool.aspx?action=smtp, checktls.com, and ssl-tools.net/mailservers and haven't found any issues. It also works fine on other devices, which I would expect to have similar issues if it were a certificate issue. Aug 7, 2020 at 8:24
  • It's not the TLS certificate. It's precisely a minute each time and if you switch the standard port with the same certificate it connects without delay.
    – Gray
    Apr 5, 2021 at 5:22

1 Answer 1

1

I only managed to solve this by changing the port that I was using on my mail server to send emails (I was using a non-standard port to bypass ISP filtering). When I changed to using TCP port 587 (the Message Submission port) the issue was resolved.

I'm still not convinced that Mail and/or macOS (or possibly my mail server) is doing something weird as other devices (iPhone and iPad) use the non-standard SMTP port just fine.

1
  • 1
    Just had he exactly the same issue. I was using some random high port for my mail submission and I was seeing a client-side delay of exactly one minute. Switching to port 587 fixed it for me without any other changes.
    – Gray
    Apr 4, 2021 at 5:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .