Mark Nicholas <[EMAIL PROTECTED]> writes:

> in my /etc/tmdarc file I have:
> 
> import os
> 
> DATADIR = os.path.expanduser("~/")

When running tmda-filter from a .qmail file, '~' is the directory
listed in /var/qmail/users/assign (and assign.cdb) for that domain.  I
hope to fix this soon so that '~' refers to the virtual user's home
directory.  I've already done this for tmda-ofmipd, which means that,
for now, you'll either need to set DATADIR in each user's config file
and specify that config file in the user's .qmail-<user> and
.qmail-<user>-default files with the -c option, or maybe you can do
something like this in /etc/tmdarc:

user = os.environ['EXT'].split('-', 1)[0]
DATADIR = os.path.join(os.path.expanduser("~"), user, '.tmda/')

This will only work if your usernames do *not* have dashes in them.
If you're not using the .tmda subdirectory in each user's directory,
i.e. all user-specific filter files, lists and pending and responses
directories are in the user's directory and not in <user>/.tmda, you
can set DATADIR like this:

DATADIR = os.path.join(os.path.expanduser("~", user) + '/'


Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to