Apologies for the first incomplete post (can't seem to find how to delete it...). This is the completed analysis.
This exact problem has been plaguing my brand new Macbook Pro all summer long, but I might have an idea about what's going on, at least for me. Like others, mail in my outbox finally is sent immediately when I turn take down the WiFi interface and bring it back up. Furthermore, I get mailbox connectivity errors/warnings in mail sometimes that prevent me from syncing new mail. I'm using IMAP and SMTP -- imap.gmail.com and smtp.gmail.com, specifically.
I do have some further information to contribute though. It only occurs when I am at home connected to a single particular WiFi access point -- an AT&T furnished access point and router. What's even more interesting is that the problem *does not* occur if I am fully VPNed into my place of business (all traffic; not just business subnet). What this tells me is that the problem is circumvented by tunneling mail traffic through my AP and router to some other place where the rest of the world/Internet thinks I'm located. The only difference as far as my AT&T router is concerned is that the mail traffic is now disguised within the VPN tunnel and the router is no longer able to (if it wished) filter any specific type of traffic, since its all in an opaque tunnel. Another difference to note is that the full VPN forces my Mac to circumnavigate all of AT&T's network services and use my business ISP's instead, DNS servers in particular.
Now, what type of traffic is generated when we try to send or receive mail? The first thing that will happen is the local machine will ARP for its gateway (assuming IPv4), since the mail server is obviously outside the local network. This isn't the issue, since all other applications besides mail seem to work okay and I can ping any public IP w/o an issue. Next, we need to consider how the mail server is addressed. It's configured as a domain name, so we must use DNS to resolve it to an IP address if our local machine doesn't have it cached already. After the mail server's IP has been identified, a TCP connection is established to the mail server, in my case to the SMTP port. After that, it's all SMTP stuff and the network should be in a steady state while the message is uploaded from my outbox.
Here's what we see:
11:34:53.799973 IP (tos 0x0, ttl 52, id 1628, offset 0, flags [none], proto UDP (17), length 130)
64.6.64.6.53 > 172.16.1.250.53999: [udp sum ok] 50209 q: A? smtp.gmail.com. 3/0/0 smtp.gmail.com. [1m42s] CNAME gmail-smtp-msa.l.google.com., gmail-smtp-msa.l.google.com. [5m] A 173.194.219.108, gmail-smtp-msa.l.google.com. [5m] A 173.194.219.109 (102)
11:55:31.797938 IP (tos 0x0, ttl 53, id 517, offset 0, flags [none], proto UDP (17), length 126)
64.6.64.6.53 > 172.16.1.250.64294: [udp sum ok] 51371 q: A? imap.gmail.com. 3/0/0 imap.gmail.com. [4m19s] CNAME gmail-imap.l.google.com., gmail-imap.l.google.com. [5m] A 74.125.196.108, gmail-imap.l.google.com. [5m] A 74.125.196.109 (98)
As shown above, while the problem is occurring (a message sitting idle in my outbox), DNS works fine to resolve the SMTP and IMAP servers, which we now know are at 173.194.219.108 and 109 while the IMAP servers are 74.125.196.108 and 109.
Meanwhile, if we watch carefully, we'll notice repeating spurts of traffic that look like:
11:35:42.077022 IP (tos 0x0, ttl 64, id 64178, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49827 > 173.194.219.108.143: Flags [S], cksum 0xfe6d (correct), seq 2044303645, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153494022 ecr 0,sackOK,eol], length 0
11:35:42.077023 IP (tos 0x0, ttl 64, id 41773, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49828 > 173.194.219.108.143: Flags [S], cksum 0xf93f (correct), seq 306382305, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153494022 ecr 0,sackOK,eol], length 0
11:35:42.178455 IP (tos 0x0, ttl 64, id 15012, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49829 > 173.194.219.109.143: Flags [S], cksum 0xd254 (correct), seq 1241445545, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153494123 ecr 0,sackOK,eol], length 0
11:35:42.178456 IP (tos 0x0, ttl 64, id 52252, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49830 > 173.194.219.109.143: Flags [S], cksum 0x61d5 (correct), seq 1084059273, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153494123 ecr 0,sackOK,eol], length 0
11:35:43.079545 IP (tos 0x0, ttl 64, id 49577, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49828 > 173.194.219.108.143: Flags [S], cksum 0xf556 (correct), seq 306382305, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153495023 ecr 0,sackOK,eol], length 0
11:35:43.079546 IP (tos 0x0, ttl 64, id 7338, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49827 > 173.194.219.108.143: Flags [S], cksum 0xfa84 (correct), seq 2044303645, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153495023 ecr 0,sackOK,eol], length 0
11:35:43.180575 IP (tos 0x0, ttl 64, id 25105, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49830 > 173.194.219.109.143: Flags [S], cksum 0x5dec (correct), seq 1084059273, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153495124 ecr 0,sackOK,eol], length 0
11:35:43.180577 IP (tos 0x0, ttl 64, id 54131, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49829 > 173.194.219.109.143: Flags [S], cksum 0xce6b (correct), seq 1241445545, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153495124 ecr 0,sackOK,eol], length 0
11:35:44.080625 IP (tos 0x0, ttl 64, id 49089, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49828 > 173.194.219.108.143: Flags [S], cksum 0xf16d (correct), seq 306382305, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153496024 ecr 0,sackOK,eol], length 0
11:35:44.080626 IP (tos 0x0, ttl 64, id 20634, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49827 > 173.194.219.108.143: Flags [S], cksum 0xf69b (correct), seq 2044303645, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153496024 ecr 0,sackOK,eol], length 0
11:35:44.181764 IP (tos 0x0, ttl 64, id 23242, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49830 > 173.194.219.109.143: Flags [S], cksum 0x5a03 (correct), seq 1084059273, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153496125 ecr 0,sackOK,eol], length 0
11:35:44.181765 IP (tos 0x0, ttl 64, id 39779, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49829 > 173.194.219.109.143: Flags [S], cksum 0xca82 (correct), seq 1241445545, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153496125 ecr 0,sackOK,eol], length 0
11:35:45.086878 IP (tos 0x0, ttl 64, id 56038, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49828 > 173.194.219.108.143: Flags [S], cksum 0xed85 (correct), seq 306382305, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153497024 ecr 0,sackOK,eol], length 0
11:35:45.086880 IP (tos 0x0, ttl 64, id 34988, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49827 > 173.194.219.108.143: Flags [S], cksum 0xf2b3 (correct), seq 2044303645, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153497024 ecr 0,sackOK,eol], length 0
11:35:45.189034 IP (tos 0x0, ttl 64, id 29023, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49830 > 173.194.219.109.143: Flags [S], cksum 0x561b (correct), seq 1084059273, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153497125 ecr 0,sackOK,eol], length 0
11:35:45.189035 IP (tos 0x0, ttl 64, id 35715, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.49829 > 173.194.219.109.143: Flags [S], cksum 0xc69a (correct), seq 1241445545, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 153497125 ecr 0,sackOK,eol], length 0
and:
11:58:35.178560 IP (tos 0x0, ttl 64, id 43708, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50121 > 74.125.196.108.993: Flags [S], cksum 0x5f14 (correct), seq 3513414951, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154862461 ecr 0,sackOK,eol], length 0
11:58:35.178560 IP (tos 0x0, ttl 64, id 17475, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50120 > 74.125.196.108.993: Flags [S], cksum 0x725c (correct), seq 980678871, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154862461 ecr 0,sackOK,eol], length 0
11:58:35.429736 IP (tos 0x0, ttl 64, id 13231, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50123 > 74.125.196.109.993: Flags [S], cksum 0x9cc3 (correct), seq 1599711372, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154862711 ecr 0,sackOK,eol], length 0
11:58:35.429737 IP (tos 0x0, ttl 64, id 20895, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50122 > 74.125.196.109.993: Flags [S], cksum 0xe1c2 (correct), seq 3616664405, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154862711 ecr 0,sackOK,eol], length 0
11:58:36.180844 IP (tos 0x0, ttl 64, id 19196, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50121 > 74.125.196.108.993: Flags [S], cksum 0x5b2c (correct), seq 3513414951, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154863461 ecr 0,sackOK,eol], length 0
11:58:36.180846 IP (tos 0x0, ttl 64, id 38787, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50120 > 74.125.196.108.993: Flags [S], cksum 0x6e74 (correct), seq 980678871, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154863461 ecr 0,sackOK,eol], length 0
11:58:36.432138 IP (tos 0x0, ttl 64, id 14748, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50123 > 74.125.196.109.993: Flags [S], cksum 0x98db (correct), seq 1599711372, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154863711 ecr 0,sackOK,eol], length 0
11:58:36.432139 IP (tos 0x0, ttl 64, id 31024, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50122 > 74.125.196.109.993: Flags [S], cksum 0xddda (correct), seq 3616664405, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154863711 ecr 0,sackOK,eol], length 0
11:58:37.183328 IP (tos 0x0, ttl 64, id 11219, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50121 > 74.125.196.108.993: Flags [S], cksum 0x5743 (correct), seq 3513414951, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154864462 ecr 0,sackOK,eol], length 0
11:58:37.183329 IP (tos 0x0, ttl 64, id 4692, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50120 > 74.125.196.108.993: Flags [S], cksum 0x6a8b (correct), seq 980678871, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154864462 ecr 0,sackOK,eol], length 0
11:58:37.433106 IP (tos 0x0, ttl 64, id 9774, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50123 > 74.125.196.109.993: Flags [S], cksum 0x94f3 (correct), seq 1599711372, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154864711 ecr 0,sackOK,eol], length 0
11:58:37.433107 IP (tos 0x0, ttl 64, id 38195, offset 0, flags [DF], proto TCP (6), length 64)
172.16.1.250.50122 > 74.125.196.109.993: Flags [S], cksum 0xd9f2 (correct), seq 3616664405, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 154864711 ecr 0,sackOK,eol], length 0
What this seems to indicate is the Mac Mail client is trying to open sockets to the SMTP and IMAP servers without success. The TCP handshakes aren't even completing, which tells us either the server is unresponsive to new connections or that something in the middle is blocking us (or the SYN+ACK reply). The fact that it works over my VPN 100% of the time and anywhere else I'm connected to the Internet besides through my AT&T router seems to imply that the router is blocking the traffic (or something in AT&T's network) and that it's not the server(s). The fact that I can turn WiFi off and back on to send mail kind of rules out anything deeper within AT&T's network besides the AP/router, since that event doesn't propagate any further than the AP itself.
I've double and triple checked the router for any firewall rules, and there aren't any. The fact that it works when disabling WiFi and bringing it back up also seems to indicate there might be some bug in the router firmware, since any firewall rules (if they actually were present) should block traffic consistently and not just after a device like my Mac has been associated with the AP for more than a few seconds).
All in all, this is a frustrating problem, but I don't think it's Apple's fault given the results of this brief debugging session. That being said, the problem only occurs for my new Macbook Pro. My old one and my wife's work fine, as do others who visit and use our WiFi. But, given the nature of software bugs, it's plausible the "conditions" of my MBP (MAC, IP, and other interface properties) are just right for my MBP that causes the issue to occur for only my traffic flows on the router.