Menu

#1 [BUG] greyd & KMail + QMail

open
nobody
None
5
2008-11-14
2008-11-14
Anonymous
No

greyd throws an exception when KMail (1.9.10) try to send mail through it with QMail as backend.

--- 8< ---
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/twisted/internet/default.py", line 526, in doSelect
_logrun(selectable, _drdw, selectable, method, dict)
File "/usr/local/lib/python2.5/site-packages/twisted/python/log.py", line 65, in callWithLogger
callWithContext({"system": lp}, func, *args, **kw)
File "/usr/local/lib/python2.5/site-packages/twisted/python/log.py", line 52, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/local/lib/python2.5/site-packages/twisted/python/context.py", line 43, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/local/lib/python2.5/site-packages/twisted/internet/default.py", line 535, in _doReadOrWrite
why = getattr(selectable, method)()
File "/usr/local/lib/python2.5/site-packages/twisted/internet/tcp.py", line 255, in doRead
return self.protocol.dataReceived(data)
File "/usr/local/lib/python2.5/site-packages/twisted/protocols/basic.py", line 157, in dataReceived
self.lineReceived(line)
File "./greyd.py", line 361, in lineReceived
self.deferred.callback(buf)
File "/usr/local/lib/python2.5/site-packages/twisted/internet/defer.py", line 252, in callback
self._startRunCallbacks(result)
File "/usr/local/lib/python2.5/site-packages/twisted/internet/defer.py", line 299, in _startRunCallbacks
raise AlreadyCalledError
<class 'twisted.internet.defer.AlreadyCalledError'>:
--- >8 ---

I think it is because KMail sends "MAIL FROM", "RCPT TO" and "DATA" command without waiting answer from proxy server (sends all three commands at one time). So greyd code written to transfer commands and answers (server response codes) in sequence.

Telnet example. Here three lines ("MAIL FROM", "RCPT TO" and "DATA") quickly sended as one block of data without waiting answer code from SMTP server.

--- 8< ---
$ telnet example.com 25
> Trying 192.168.0.1...
> Connected to example.com (192.168.0.1).
> Escape character is '^]'.
> 220 example.com ESMTP
< EHLO localhost
> 250-examle.com
> 250-AUTH=LOGIN CRAM-MD5 PLAIN
> 250-AUTH LOGIN CRAM-MD5 PLAIN
> 250-STARTTLS
> 250-PIPELINING
> 250 8BITMIME
< AUTH PLAIN xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
> 235 go ahead
< MAIL FROM:<user@example1.com> BODY=8BITMIME
< RCPT TO:<user@example2.com>
< DATA
<
> 250 ok
> 250 ok
exception!
--- >8 ---

Discussion


Log in to post a comment.