Re: tmda-ofmipd: the dreaded TypeError: Expected list, got <type 'str'>

Stephen Warren <[email protected]>
Newsgroups gmane.mail.spam.tmda.user
Message-ID <[email protected]>
Dave Steinberg wrote:
> GNUs (as I understand it) is a non-smtp MUA.  So it goes like this:
> 
> GNUs (via sendmail binary) -> postfix -> tmda-ofmipd

OK. Interesting. I doubt it's the same issue I was thinking of then - 
it's extremely unlikely that postfix is not "Seeing" tmda-ofmipd just 
drop a connection.

To confirm this, please look at the either/both:

* postfix logs for when it delivers the message to tmda-ofmipd.

* Run tmda-ofmipd in debug mode and you should also see all the protocol 
responses that get sent back.

Given the flow you mentioned, I expect it to log a that tmda-ofmipd 
reported a 250 message indicating successful forwarding of the message 
to the configured destination.

> Error: failure delivering message to command 
> "['/usr/local/bin/tmda-inject', 'REDACTED2']" (comman
> d "['/usr/local/bin/tmda-inject', 'REDACTED2']" exited 1  (Traceback 
> (most recent call last):
> File "/usr/local/bin/tmda-inject", line 116, in ?
> orig_msgout_as_string = Util.msg_as_string(msgout) 
> File "./TMDA/Util.py", line 552, in msg_as_string
> File "./TMDA/pythonlib/email/generator.py", line 84, in flatten
> File "./TMDA/pythonlib/email/generator.py", line 109, in _write
> File "./TMDA/pythonlib/email/generator.py", line 135, in _dispatch
> File "./TMDA/pythonlib/email/generator.py", line 266, in _handle_message
> File "./TMDA/pythonlib/email/message.py", line 185, in get_payload
> TypeError: Expected list, got <type 'str'>))

This exception is inside tmda-inject. It would be interesting to know 
why it's happening, but it's probably best to concentrate first on why 
the error isn't propagated to tmda-ofmipd and hence back to postfix.

Looking at the code, I honestly can't see why this is happening. I'll 
need to think about it a little. Sorry.

> Sorry if I misled on this originally, clearly not my intention.

No problem! I'm just not familiar with GNUS.

> PS - I'll try your patch for tmda-ofmipd in the morning.  Any chance it 
> could make its way into the trunk?

There is some disagreement whether it's the right thing to do; see the 
archives...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.