Here's a fix, but it's not pretty....

There are a few things going on here:

1) The SMTP servers seem to be losing a large percentage of packets, causing the Linux TCP to retransmit. The servers are also slow to ACK packets. I have no idea why this occurs - but it is common to both the gmail SMTP server and my local ISP SMTP server with my 19.2 kb/s dial-up connection. I also have no idea why this problem is so much worse with binary attachments than text attachments.

2) The Linux TCP algorithm is adapting to the SMTP server packet-drop and slow ACK problems by increasing the amount of time between retransmissions, up to a maximum of 120 seconds. The TCP throughput drops to virtually zero and the e-mail gets "stuck".

The fix to the problem is to force the Linux maximum TCP retransmission timer to a much smaller value - like a few seconds. This probably violates some RFC, but it gets the job done !

I ported the patch at http://www.jankratochvil.net/project/tcp_rto to the 2.4.27 kernel source, and rebuilt and installed this kernel. Once that is done, you can tweak the maximum TCP retransmission timer to something like 3 seconds:

echo 300 > /proc/sys/net/ipv4/tcp_rto_max

Put this in a rc*.d script so it will get set with each reboot.