[Kde-pim] Sending big mails fails, bug in SMTP slave

Thiago Macieira thiago at kde.org
Tue Jul 10 12:16:56 BST 2007


Thomas McGuire wrote:
>1. SMTPProtocol::sendBufferSize()
>In 3.5, this called getsockopt on the file pointer of the slave. Now,
>TCPSlaveBase does not use a file pointer internally anymore. Instead, it
> uses QTcpSocket, which has readBufferSize(), but not sendBufferSize().
>
>Now, sendBufferSize() temporarily returns 1024, which is not good.

Remove the function. There is no send buffer size.

>2. SMTPProtocol::smtp_open()
>This seems to do advanced name lookup with KExtendedSocket which
> QHostInfo does not seem to cover. I really don't know the details here.

It does. You need to resolve the IP address using QHostInfo and get the 
canonical name.

>The biggest problem however still exists and again, I do not know how to
> solve it: No Mail bigger than 1440 bytes will get sent. I don't know
> enough about the underlying socket/slave stuff, so help here would be
> really appreciated.

Just port to QtNetwork and the problem will be solved.

>The attached patch somewhat fixes the problem (mails get sent again),
> but I don't think it is the correct way. write() often returns -1,
> which is simply ignored with the patch. 

If it's a blocking socket, -1 means error. The socket connection broke 
down. Fix your kernel and/or your SMTP server.

If it's a non-blocking socket, you've got the problem: it shouldn't be.

In any case, it *should* be a QTcpSocket.

The problem is: kio_smtp is using TCPSlaveBase, which I had ported to 
QTcpSocket, but reverted due to no SSL support. So, please don't continue 
your port. Bear with the 1440 bytes limit or help me write the new SSL 
framework.

Until then, K3Network (deprecated, buggy) will still be in use.

>I really hope somebody could take a look at that issue and make sending
> mails work again.

Make SSL work first. Then all problems magically solve.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070710/b54fe1cf/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/


More information about the kde-pim mailing list