I should have specified: latest snapshot as of writing. On Jun 4, 2014 1:26 PM, "Jason A. Donenfeld" <ja...@zx2c4.com> wrote:
> Hi Gilles, > > I've encountered a strange bug. Recently, every time I send a message to > more than one gmail user at a time, I get a bounce message, saying there > was an error sending it, 550, for it being spam. The bounced message it > sent back was blank, with only a single "received from" header in it. > Further more, a few minutes later, the message would actually be > successfully delivered to the recipient, in spite of the 550. Pretty > strange. I decided to dig into the logs to see what's happening. Here's > what it looks like to me: > > 1. ja...@zx2c4.com sends message to non-gmail, gmailA, gmailB, gmailC via > his trusty smtpd. > 2. smtpd receives it, and sends it to :10027 for dkim. > 3. smtpd receives from :10028, and attempts to relay onward. > 4. Successfully sends to non-gmail, full 2552 bytes. > 5. Sends truncated 113 byte message, containing only a "received from" > line to gmailA, gmailB, gmailC. > 6. Gmail rejects 113 byte garbage message, and smtpd queues up a bounce > message to send to me. > 7. A few minutes later, miraculously, smtpd somehow gets a hold of the > correct 2552 byte message, and sends it to gmailA, gmailB, gmailC .Gmail > accepts 220. > > So what's going on? What is this strange truncated message error? All I > can see in here right now is something cryptic about pipelining, but I'm > not sure that's it. I've attached a full trace log of what's going on, and > at the bottom of this message you should find various configuration files > pasted. > > Thanks, > Jason > > > > frisell ~ # cat /etc/opensmtpd/smtpd.conf > pki frisell.zx2c4.com certificate "/etc/opensmtpd/certs/frisell.crt" > pki frisell.zx2c4.com key "/etc/opensmtpd/certs/frisell.key" > pki frisell.zx2c4.com dhparams "/etc/opensmtpd/certs/frisell.dh" > > table smtpauth file:/etc/opensmtpd/auth.txt > table smtpdomains file:/etc/opensmtpd/domains.txt > table smtpaddresses file:/etc/opensmtpd/addresses.txt > table helonames { 127.0.0.1 = localhost, 192.95.5.64 = frisell.zx2c4.com } > > listen on eth0 tls pki frisell.zx2c4.com hostname frisell.zx2c4.com > listen on eth0 port 587 tls-require pki frisell.zx2c4.com auth <smtpauth> > tag submission hostname frisell.zx2c4.com mask-source > listen on lo port 10028 tag dkim hostname frisell.zx2c4.com mask-source > > accept tagged submission for any relay via smtp://127.0.0.1:10027 source > 127.0.0.1 hostnames <helonames> > accept from any for domain <smtpdomains> virtual <smtpaddresses> > forward-only > accept tagged dkim for any relay source 192.95.5.64 hostnames <helonames> > accept from local for any relay source 192.95.5.64 hostnames <helonames> > > frisell ~ # cat /etc/dkimproxy/dkimproxy_out.conf | grep -v domain > listen 127.0.0.1:10027 > relay 127.0.0.1:10028 > signature dkim(c=relaxed) > keyfile /etc/dkimproxy/out.key > selector mail > min_servers 5 > > >