In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jason R. Mastaler) wrote:
> Doug Hardie <[EMAIL PROTECTED]> writes: > > > The problem is that os.path does not properly resolve ~ if the user > > is defined via NIS. It only works for users defined in /etc/passwd. > > I think that needs to be pointed out as a limitation of tmda. > > The os.path module is part of Python, so this is not a TMDA > limitation. Granted, but tmda should point out this limitation since it doesn't have a workaround for it. Many of the functions in that module key off the $HOME > environment variable. So if $HOME doesn't properly point to the > user's home directory, it won't work. One thing you could try is > setting $HOME in /etc/tmdarc, using Python's NIS module[1]. This > will likely allow os.path and thus TMDA to work properly. I couldn't get HOME in tmdarc to affect os.path at all. Don't quite know why. What I did find that does work is to create another environment variable DATADIR and put the path to the user's home directory there. Then in tmdarc I put the line: DATADIR = os.environ['DATADIR'] And changed all the file names in the settings to be of the form: filename = DATADIR + original name without the ~/.tmda At least the pending messsages go in the right directory now. However, on a 1 GHz machine it takes several seconds to process a 2 line message. I am a bit concerned about performance as our mailserver processes hundreds of thousands of messages daily. Python reads a ton of junk before it starts to do anything. > > Footnotes: > [1] http://docs.python.org/lib/module-nis.html _____________________________________________ tmda-users mailing list (tmda-users@tmda.net) http://tmda.net/lists/listinfo/tmda-users