
Hi,
since 1.1/postfix seems to be duplicating some posts a bit too often, i tried to install the latest cvs of MM... first of all, there were some pending posts in config.db, but the new installation doesn't recognize them (i guess this changed in 1.2) so any administrative requests get lost.
When I tried posting to the list, i got an error: post: File "/usr/local/mailman/scripts/post", line 83, in ? post: main() post: File "/usr/local/mailman/scripts/post", line 56, in main post: msg = Message.Message(sys.stdin) post: File "/usr/local/mailman/Mailman/Message.py", line 49, in __init__ post: self.rewindbody() post: File "/usr/local/mailman/Mailman/pythonlib/rfc822.py", line 104, in rewindbody post: self.fp.seek(self.startofbody) post: IOError : [Errno 29] Illegal seek
Ricardo.
--

"RK" == Ricardo Kustner <ricardo@miss-janet.com> writes:
RK> since 1.1/postfix seems to be duplicating some posts a bit too
RK> often, i tried to install the latest cvs of MM... first of
RK> all, there were some pending posts in config.db, but the new
RK> installation doesn't recognize them (i guess this changed in
RK> 1.2) so any administrative requests get lost.
This is true. What I've done is make sure that any lists I convert have been cleared of admin requests. This clearly needs to be better handled in "make update" when 1.2 is released.
RK> When I tried posting to the list, i got an error: post: File
RK> "/usr/local/mailman/scripts/post", line 83, in ? post: main()
RK> post: File "/usr/local/mailman/scripts/post", line 56, in main
RK> post: msg = Message.Message(sys.stdin) post: File
RK> "/usr/local/mailman/Mailman/Message.py", line 49, in __init__
RK> post: self.rewindbody() post: File
RK> "/usr/local/mailman/Mailman/pythonlib/rfc822.py", line 104, in
RK> rewindbody post: self.fp.seek(self.startofbody) post: IOError
RK> : [Errno 29] Illegal seek
Okay, so sys.stdin isn't seekable everywhere :) Give the below patch a try.
-Barry
-------------------- snip snip -------------------- Index: post
RCS file: /projects/cvsroot/mailman/scripts/post,v retrieving revision 1.25 diff -c -r1.25 post *** post 1999/11/24 21:11:07 1.25 --- post 1999/12/10 13:44:17
*** 33,38 **** --- 33,39 ---- from Mailman import Utils from Mailman.Logging.Utils import LogStdErr from Mailman.Handlers import HandlerAPI
from Mailman.pythonlib import StringIO
LogStdErr("error", "post")
*** 53,59 **** except: pass if msg is None: ! msg = Message.Message(sys.stdin) # go ahead and post the message adminaddr = mlist.GetAdminEmail() try: --- 54,61 ---- except: pass if msg is None: ! s = StringIO(sys.stdin.read()) ! msg = Message.Message(s) # go ahead and post the message adminaddr = mlist.GetAdminEmail() try:

On Fri, Dec 10, 1999 at 08:46:28AM -0500, Barry A. Warsaw wrote:
"RK" == Ricardo Kustner <ricardo@miss-janet.com> writes: RK> When I tried posting to the list, i got an error: post: File Okay, so sys.stdin isn't seekable everywhere :) Give the below patch a try.
thanks, but this patch produces another error:
<mailinglist@miss-janet.com>: Command died with status 1: "/usr/local/mailman/mail/wrapper post mailinglist". Command output: Traceback (innermost last): File "/usr/local/mailman/scripts/post", line 85, in ? main() File "/usr/local/mailman/scripts/post", line 57, in main s = StringIO(sys.stdin.read()) TypeError: call of non-function (type module)
Also, why did you add import StringIO? cause the pre-patch version already contains a call to StringIO a few lines earlier... unfortunately I haven't mastered python 100% yet, so I can't help out much with tracking down the bug :(
=================================================================== RCS file: /projects/cvsroot/mailman/scripts/post,v retrieving revision 1.25 diff -c -r1.25 post *** post 1999/11/24 21:11:07 1.25 --- post 1999/12/10 13:44:17
*** 33,38 **** --- 33,39 ---- from Mailman import Utils from Mailman.Logging.Utils import LogStdErr from Mailman.Handlers import HandlerAPI
from Mailman.pythonlib import StringIO
LogStdErr("error", "post")
*** 53,59 **** except: pass if msg is None: ! msg = Message.Message(sys.stdin) # go ahead and post the message adminaddr = mlist.GetAdminEmail() try: --- 54,61 ---- except: pass if msg is None: ! s = StringIO(sys.stdin.read()) ! msg = Message.Message(s) # go ahead and post the message adminaddr = mlist.GetAdminEmail() try:
-- Ricardo.
-- International Janet Jackson fanclub called MISS JANET. For more information write to: Miss Janet. P.O.Box 10016, 1001 EA Amsterdam, The Netherlands Fax/phone: +31-(0)20-7764493 Email: fanclub@miss-janet.com Or check out our website: http://miss-janet.com

"RK" == Ricardo Kustner <ricardo@miss-janet.com> writes:
RK> thanks, but this patch produces another error:
Oops, you should change
from Mailman.pythonlib import StringIO
to
from Mailman.pythonlib.StringIO import StringIO
RK> Also, why did you add import StringIO? cause the pre-patch
RK> version already contains a call to StringIO a few lines
RK> earlier... unfortunately I haven't mastered python 100% yet,
RK> so I can't help out much with tracking down the bug :(
Really? The CVS version of the file was missing the import of StringIO (and in fact, if the code takes the `prog is true' path through the first conditional, it would raise an exception because of that).
-Barry

Hi,
On Fri, Dec 10, 1999 at 08:46:28AM -0500, Barry A. Warsaw wrote:
RK> post: File "/usr/local/mailman/scripts/post", line 56, in main RK> post: msg = Message.Message(sys.stdin) post: File RK> "/usr/local/mailman/Mailman/Message.py", line 49, in __init__ RK> post: self.rewindbody() post: File RK> "/usr/local/mailman/Mailman/pythonlib/rfc822.py", line 104, in RK> rewindbody post: self.fp.seek(self.startofbody) post: IOError RK> : [Errno 29] Illegal seek
Okay, so sys.stdin isn't seekable everywhere :) Give the below patch a try.
will this be added to the cvs version too? I want to have the latest cvs version running, but I keep having to change this in scripts/post :) also, it looks like the problem I reported earlier today is related to this one...
Thanks, Ricardo.
--
participants (2)
-
Barry A. Warsaw
-
Ricardo Kustner