"Chris Berry" <[EMAIL PROTECTED]> writes:
> >From: "Jason R. Mastaler" <[EMAIL PROTECTED]>
> >"Chris Berry" <[EMAIL PROTECTED]> writes:
> >
> > > | preline spamc -f | preline /usr/local/src/tmda-0.80/bin/tmda-filter
> >
> >Try upgrading to TMDA 0.81, as it has improved virtual domain
> >support.
>
> Ok, I upgraded to TMDA 0.81, but that didn't change anything. As best
> I can tell tmda-filter thinks the user is the virtual domains user
> (called vmail on my system), but I need it to execute as the virtual
> user chris_berry(or whatever other user is to recieve email).
Unless you tell it otherwise (and before 0.81), tmda-filter executes
as the system user actually handling the mail, be that the account of
a real person or the account used to handle a virtual domain (vmail,
in your case). That means it will look for 'config' and 'crypt_key'
in #HOME/.tmda (/home/virtual/.tmda in your case). The tilde (~) will
represent /home/virtual. You can make this work, but it's pretty
annoying, as you have to set numerous paths in the config file and use
a different .qmail-<user> for each user. You have to run tmda-filter
with the '-c' flag to tell it which config file to use (different for
each user).
As of 0.81, you can use just the .qmail-default file as you have
configured above. However... you must use the new (as of 0.81) -S (or
--vhome-script) flag to give tmda-filter a script it can use to look
up the user's home directory. The vmailmgr-vdir.sh script will work
for this. You run it like this:
| preline /usr/local/src/tmda-0.81/bin/tmda-filter -S
/usr/local/src/tmda-0.81/contrib/vmailmgr-vdir.sh
(all on one line). You can put symlinks into /usr/local/bin (if
that is in qmail-send's path) so you don't have to spell out all the
paths above. This will cause tmda-filter to look in
/home/virtual/users/chris_berry (your maildir) for the .tmda
directory. It will set the tilde (~) to mean .../users/chris_berry.
The upshot of this is that the default paths for many files in
Defaults.py work and are specific to each user.
Also, you had this as the second line in your .qmail-default:
| /usr/bin/filepipe /usr/bin/vdeliver
By default, if you are using qmail and tmda-filter is happy with the
mail, it will exit with a 0 return code so that the rest of the lines
in your .qmail* file get run. That's ok, except for virtual domains.
The problem is that the delivery program, vdeliver, doesn't understand
extension addresses. So any dated addresses, keyword addresses and so
forth won't get delivered correctly.
The solution is to change the DELIVERY configuration variable to
deliver to the user's maildir instead of exiting 0. You can either
set DELIVERY in each users' config file or, if you have a consistent
configuration for all of your users (all are virtual users using
vmailmgr), you can set it in /etc/tmdarc (the global configuration
file) and it will be set for everyone running TMDA.
/---- /etc/tmdarc (or the local user's .tmda/config ----\
import os # you need this, if it isn't already there
DELIVERY = os.path.expanduser('~/')
\-------------------------------------------------------/
More information on DELIVERY:
http://tmda.net/config-vars.html#DELIVERY
If you have a few users who are not virtual users, you can set their
DELIVERY variable in their 'config' file and it will override the
global setting.
Once you have this setup working, most of the rest of TMDA's defaults
will work like you'd expect; you won't have to customize a lot of
configuration variables.
Tim
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users