After upgrading my hardware, my OS (FBSD 9 -> 10.1 STABLE) and most applications, I have now problems sending big files.
Thunderbird and Claws-Mail report an error when I try to send mails greater than ~4KB.
Mutt manages to send bigger mails for some reason. Its behaviour does not seem reproducible, but when I include a attachment with ~110 KB, it finally fails too.
It's not just a freebsd-ports issue, because when I use ftp(1) to upload a file, I run into the same problem. An error is reported when I upload a file >= 4045 bytes, but not when it's <= 4044 bytes.
Now for some details:
1. OS:
2. Firewall:
I can't turn it off (because I need NAT), but
3. Thunderbird:
Messagebox content:
Last lines of Thunderbird's logs:
tcpdump while sending:
This does not give me much of a clue, because I am no TCP adept.
4. Claws-Mail:
The log reads:
There was also a some message about a "Permission denied" error in sock_write(), but I don't get this anymore. The sock_write() function in session.c indirectly calls read(), although the "Permission denied" (EACCES) error is set by socket(), not read(), according to the man page.
5. ftp:
With a file of size = 4044 bytes:
With a file of size = 4045 bytes:
Surprisingly, the whole file is transferred in spite of the error.
But when I put a file bigger than 32768 bytes, the file is truncated:
So there seem to be two limits:
The error message appears for data > 1044 bytes, and the truncation occurs at 32768 bytes.
Any ideas?
Thunderbird and Claws-Mail report an error when I try to send mails greater than ~4KB.
Mutt manages to send bigger mails for some reason. Its behaviour does not seem reproducible, but when I include a attachment with ~110 KB, it finally fails too.
It's not just a freebsd-ports issue, because when I use ftp(1) to upload a file, I run into the same problem. An error is reported when I upload a file >= 4045 bytes, but not when it's <= 4044 bytes.
Now for some details:
1. OS:
Code:
~$ uname -a
FreeBSD daemon.volki.at 10.1-STABLE FreeBSD 10.1-STABLE #3 r278696: Mon Feb 16 20:35:07 CET 2015 root@daemon.volki.at:/usr/obj/usr/src10/sys/CU06 i386
2. Firewall:
I can't turn it off (because I need NAT), but
ifpw show
does not list any package drops during tests.3. Thunderbird:
Messagebox content:
Code:
Sending of message failed.
The message could not be sent because connecting to SMTP server smtp.sil.at failed. The server may be unavailable or is refusing SMTP connections. Please verify that your SMTP server settings are correct and try again, or contact the server administrator.
Last lines of Thunderbird's logs:
Code:
676335744[28561280]: SMTP Send: DATA
676335744[28561280]: SMTP entering state: 0
676335744[28561280]: SMTP Response: 354 Enter message, ending with "." on a line by itself
676335744[28561280]: SMTP entering state: 7
676335744[28561280]: SMTP entering state: 8
(The log stops here. For smaller mails which succeed, there would follow:
[INDENT]676335744[28561280]: SMTP Send: .
676335744[28561280]: SMTP entering state: 0
676335744[28561280]: SMTP Response: 250 OK id=1YNhHV-0001wc-92
etc.[/INDENT]
)
Code:
~# tcpdump -i em0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:33:02.957195 IP 192.168.0.130.36281 > 199.16.157.105.https: Flags [.], ack 4164621351, win 1034, length 0
13:33:02.997780 IP 192.168.0.130.53104 > cns1.sil.at.domain: 53827+ PTR? 130.0.168.192.in-addr.arpa. (44)
13:33:03.008105 IP cns1.sil.at.domain > 192.168.0.130.53104: 53827 NXDomain 0/1/0 (93)
13:33:03.008533 IP 192.168.0.130.32963 > cns1.sil.at.domain: 23524+ PTR? 105.157.16.199.in-addr.arpa. (45)
13:33:03.043341 IP cns1.sil.at.domain > 192.168.0.130.32963: 23524 NXDomain 0/1/0 (115)
13:33:03.084979 IP 199.16.157.105.https > 192.168.0.130.36281: Flags [.], ack 1, win 1701, options [nop,nop,TS val 815232786 ecr 39266817], length 0
13:33:04.044503 IP 192.168.0.130.36959 > cns1.sil.at.domain: 51697+ PTR? 1.232.129.213.in-addr.arpa. (44)
13:33:04.054435 IP cns1.sil.at.domain > 192.168.0.130.36959: 51697 1/0/0 PTR cns1.sil.at. (69)
13:33:06.966538 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags , seq 3743625216, win 65535, options [mss 1460,nop,wscale 6,sackOK,TS val 39321405 ecr 0], length 0
13:33:06.977669 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [S.], seq 1583288881, ack 3743625217, win 5792, options [mss 1420,sackOK,TS val 554007782 ecr 39321405,nop,wscale 7], length 0
13:33:06.977686 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [.], ack 1, win 1034, options [nop,nop,TS val 39321416 ecr 554007782], length 0
13:33:07.093192 IP 192.168.0.130.41239 > cns1.sil.at.domain: 12293+ PTR? 209.12.59.86.in-addr.arpa. (43)
13:33:07.106767 IP cns1.sil.at.domain > 192.168.0.130.41239: 12293 1/0/0 PTR smtp.sil.at. (68)
13:33:07.175048 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [P.], seq 1:198, ack 1, win 46, options [nop,nop,TS val 554007831 ecr 39321416], length 197
13:33:07.199555 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [P.], seq 1:23, ack 198, win 1034, options [nop,nop,TS val 39321638 ecr 554007831], length 22
13:33:07.209502 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [.], ack 23, win 46, options [nop,nop,TS val 554007840 ecr 39321638], length 0
13:33:07.213696 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [P.], seq 198:376, ack 23, win 46, options [nop,nop,TS val 554007841 ecr 39321638], length 178
13:33:07.273199 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [P.], seq 23:64, ack 376, win 1034, options [nop,nop,TS val 39321712 ecr 554007841], length 41
13:33:07.282436 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [P.], seq 376:384, ack 64, win 46, options [nop,nop,TS val 554007859 ecr 39321712], length 8
13:33:07.282527 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [P.], seq 64:90, ack 384, win 1034, options [nop,nop,TS val 39321722 ecr 554007859], length 26
13:33:07.333206 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [.], ack 90, win 46, options [nop,nop,TS val 554007871 ecr 39321722], length 0
13:33:07.739973 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [P.], seq 384:398, ack 90, win 46, options [nop,nop,TS val 554007973 ecr 39321722], length 14
13:33:07.740087 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [P.], seq 90:96, ack 398, win 1034, options [nop,nop,TS val 39322179 ecr 554007973], length 6
13:33:07.749803 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [.], ack 96, win 46, options [nop,nop,TS val 554007975 ecr 39322179], length 0
13:33:07.750750 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [P.], seq 398:454, ack 96, win 46, options [nop,nop,TS val 554007975 ecr 39322179], length 56
13:33:07.974371 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [P.], seq 398:454, ack 96, win 46, options [nop,nop,TS val 554008032 ecr 39322179], length 56
13:33:07.974392 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [.], seq 96:1504, ack 454, win 1034, options [nop,nop,TS val 39322414 ecr 554007975], length 1408
13:33:08.063704 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [.], ack 1504, win 68, options [nop,nop,TS val 554008053 ecr 39322414], length 0
13:33:08.063712 IP bad-len 0
13:33:08.106555 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [.], ack 2912, win 91, options [nop,nop,TS val 554008065 ecr 39322503], length 0
13:33:08.106564 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [F.], seq 4192, ack 454, win 1034, options [nop,nop,TS val 39322546 ecr 554008065], length 0
13:33:08.137592 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [.], ack 4192, win 113, options [nop,nop,TS val 554008072 ecr 39322503], length 0
13:33:08.139291 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [P.], seq 454:484, ack 4193, win 113, options [nop,nop,TS val 554008073 ecr 39322546], length 30
13:33:08.139302 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [R], seq 3743629409, win 0, length 0
13:33:08.139549 IP smtp.sil.at.smtp > 192.168.0.130.50210: Flags [F.], seq 484, ack 4193, win 113, options [nop,nop,TS val 554008073 ecr 39322546], length 0
13:33:08.139553 IP 192.168.0.130.50210 > smtp.sil.at.smtp: Flags [R], seq 3743629409, win 0, length 0
^C
36 packets captured
39 packets received by filter
0 packets dropped by kernel
4. Claws-Mail:
The log reads:
Code:
[13:45:40] SMTP> MAIL FROM:<...>
[13:45:40] SMTP< 250 OK
[13:45:40] SMTP> RCPT TO:<...>
[13:45:40] SMTP< 250 Accepted
[13:45:40] SMTP> DATA
[13:45:40] SMTP< 354 Enter message, ending with "." on a line by itself
*** Error occurred while sending the message.
5. ftp:
With a file of size = 4044 bytes:
Code:
ftp> put test.txt
local: test.txt remote: test.txt
229 Extended Passive mode OK (|||58243|)
150 Accepted data connection
100% |******************************************************************************| 4044 183.65 MiB/s 00:00 ETA
226-File successfully transferred
226 0.113 seconds (measured here), 35.04 Kbytes per second
4044 bytes sent in 00:00 (34.76 KiB/s)
Code:
ftp> put test.txt
local: test.txt remote: test.txt
229 Extended Passive mode OK (|||33241|)
150 Accepted data connection
0% | | 0 0.00 KiB/s --:-- ETAftp: Writing to network: Permission denied
0% | | -1 0.00 KiB/s --:-- ETA
226-File successfully transferred
226 0.535 seconds (measured here), 7.38 Kbytes per second
Code:
ftp> ls
229 Extended Passive mode OK (|||58271|)
150 Accepted data connection
drwxr-xr-x 2 2106 site1607 4096 Feb 17 14:21 .
drwxr-xr-x 4 2106 site1607 4096 Feb 17 12:30 ..
-rw-r--r-- 1 2106 site1607 4045 Feb 17 14:21 test.txt
226-Options: -a -l
226 3 matches total
Code:
ftp> !ls -l test_10xsize.txt
-rw-r--r-- 1 root operator 40450 17 Feb 14:25 test_10xsize.txt
ftp> put test_10xsize.txt
local: test_10xsize.txt remote: test_10xsize.txt
229 Extended Passive mode OK (|||15992|)
150 Accepted data connection
0% | | 0 0.00 KiB/s --:-- ETAftp: Writing to network: Permission denied
0% | | -1 0.00 KiB/s --:-- ETA
226-File successfully transferred
226 2.472 seconds (measured here), 12.94 Kbytes per second
ftp> ls
229 Extended Passive mode OK (|||3590|)
150 Accepted data connection
drwxr-xr-x 2 2106 site1607 4096 Feb 17 14:27 .
drwxr-xr-x 4 2106 site1607 4096 Feb 17 12:30 ..
-rw-r--r-- 1 2106 site1607 4045 Feb 17 14:21 test.txt
-rw-r--r-- 1 2106 site1607 32768 Feb 17 14:28 test_10xsize.txt
-rw-r--r-- 1 2106 site1607 8090 Feb 17 14:24 test_doublesize.txt
The error message appears for data > 1044 bytes, and the truncation occurs at 32768 bytes.
Any ideas?