Jesse, I hit that same error, and on investigating it discovered that when you use the -b switch tmda-pending runs a subclassed version of the Queue class. I took advantage of this difference to and modified the Queue class and it's subclass InteractiveQueue to have a new "interactive" property that gets checked by the initQueue method.
You can try the editing your Pending.py file to contain the following new and revised lines, however, I think you will need to do this by hand since this is the second revision from the v1.0.2 baseline code, so the line numbers are likely to be off. [circle:source> diff -c Pending.v1.0.2.a.py Pending.v1.0.2.b.py *** Pending.v1.0.2.a.py 2004-08-13 08:51:18.000000000 -0700 --- Pending.v1.0.2.b.py 2004-09-14 10:10:19.000000000 -0700 *************** *** 66,71 **** --- 66,72 ---- self.younger = younger self.pretend = pretend + self.interactive = 0 self.stdout = sys.stdout *************** *** 87,94 **** self.msgs.extend(line.strip().split()) self.msgs.remove('-') # re-open stdin on the tty ! sys.stdin.close() ! sys.stdin = open('/dev/tty', 'r') if not self.msgs and not wantedstdin: cwd = os.getcwd() --- 88,96 ---- self.msgs.extend(line.strip().split()) self.msgs.remove('-') # re-open stdin on the tty ! if self.interactive: ! sys.stdin.close() ! sys.stdin = open('/dev/tty', 'r') if not self.msgs and not wantedstdin: cwd = os.getcwd() *************** *** 353,358 **** --- 355,362 ---- younger, pretend) + self.interactive = 1 + def initQueue(self): """Additionally initialize the interactive queue.""" [circle:source> Hope this helps, Dave Grimberg Computer Aficionado -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jesse Guardiani Sent: Thursday, October 07, 2004 12:53 PM To: [EMAIL PROTECTED] Subject: bug report: tmda-pending and /dev/tty Hello, When I try to run this line from /etc/crontab under Gentoo Linux: /usr/bin/tmda-pending -c \ /usr/local/vpopmail/domains/wingnet.net/craig/.tmdarc \ -b -T | egrep -i "words|I|don't|want|to|see|go|here" \ | awk '{print $1}' | /usr/bin/tmda-pending -c \ /usr/local/vpopmail/domains/wingnet.net/craig/.tmdarc \ -b -d - I get this traceback: Traceback (most recent call last): File "/usr/bin/tmda-pending", line 312, in ? main() File "/usr/bin/tmda-pending", line 303, in main pretend = pretend File "/usr/lib/python2.3/site-packages/TMDA/Pending.py", line 90, in initQueue sys.stdin = open('/dev/tty', 'r') IOError: [Errno 6] No such device or address: '/dev/tty' This is a bug. We shouldn't try to open /dev/tty when operating in batch mode! I'd love to patch this, but I can't figure out how to accurately determine if we are interactive or not on line 90 of Pending.py. Any ideas? -- Jesse Guardiani, Systems Administrator WingNET Internet Services, P.O. Box 2605 // Cleveland, TN 37320-2605 423-559-LINK (v) 423-559-5145 (f) http://www.wingnet.net _____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users _____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users