"Todd A. Jacobs" <[EMAIL PROTECTED]> writes:
> # .tmdarc
> HOSTNAME = os.popen('/bin/hostname -d').read()
> LOGNAME = os.popen('/usr/bin/id -un').read()
There is a trailing newline on these strings. Therefore, after
substitution, your filter rule looks like this:
from username
*@hostname
ok
The first line is not valid because there is no action field (that's
what the traceback was telling you) and the second line, which will be
interpreted as a second filter rule because it has no leading
whitespace, is clearly bogus. Your original action ends up on the
third line and is interpreted as part of the second filter because it
does have leading whitespace.
Probably none of that is what you want. Try adding a call to strip()
to the text you read, like this:
HOSTNAME = os.popen('/bin/hostname -d').read().strip()
LOGNAME = os.popen('/usr/bin/id -un').read().strip()
The strip() call will remove both leading and trailing whitespace,
including the newline.
Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users