[Kde-pim] Sending big mails fails, bug in SMTP slave
Thomas McGuire
thomas.mcguire at gmx.net
Mon Jul 9 19:39:49 BST 2007
Hello,
On Sunday 01 July 2007, Thiago Macieira wrote:
> Thomas McGuire wrote:
> >Also i noticed there are at least 3 warnings in the code of the slave
> > which say "Port to KNetwork". I have no idea how to port the code in
> > question. Again, can anybody please have a look at that?
> >
> >Thiago, I've CC'ed you because you know the KNetwork stuff, right? I
> > hope you don't mind.
>
> KNetwork is deprecated.
>
> Port to QtNetwork.
I don't know how to do this. There are (at least) two places in the SMTP slave
which need porting, I don't know what to do about both of them.
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.
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.
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.
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. Also, most times only 1440 bytes get written to the
socket. This both should probably not happen. Additionally, the progressbar
in KMail does not get updated, but that might be another unrelated bug.
I really hope somebody could take a look at that issue and make sending mails
work again.
Sorry for the late reply.
Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smtp-hack.diff
Type: text/x-diff
Size: 1439 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070709/25662dbd/attachment.diff>
-------------- 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