"F. Even" <[EMAIL PROTECTED]> writes: > On 11/4/03 7:37 AM, "[EMAIL PROTECTED]" > <[EMAIL PROTECTED]> wrote: > > > Date: Tue, 04 Nov 2003 06:22:57 -0700 > > From: "Jason R. Mastaler" <[EMAIL PROTECTED]> > > Subject: Re: /etc/tmdarc > > To: [EMAIL PROTECTED] > > Message-ID: <[EMAIL PROTECTED]> > > Content-Type: text/plain; charset=us-ascii > > > > "F. Even" <[EMAIL PROTECTED]> writes: > > > >> I currently do not have an /etc/tmdarc. > > > > /etc/tmdarc is not required. > > What about for tmda-cgi? I for the life of me can't get it working, and I > have not the foggiest clue what is wrong with it.....aside from maybe I'm > not defining some things in /etc/tmdarc that it might need.
To the best of my knowledge, tmda-cgi doesn't use /etc/tmdarc, except indirectly, through the base TMDA code. > >> Before I just start dumping some parameters in an /etc/tmdarc > >> file....what should this file contain? > > > > The same things as ~/.tmda/config. See > > http://tmda.net/config-vars.html > > > > Values in /etc/tmdarc will be applied to every TMDA user on the > > system. > > Can I put values such as these: > > CONFIRM_APPEND = os.path.expanduser("~/.tmda/lists/confirmed") > LOGFILE_DEBUG = os.path.expanduser("~/.tmda/logs/debug") > LOGFILE_INCOMING = os.path.expanduser("~/.tmda/logs/incoming") > LOGFILE_OUTGOING = os.path.expanduser("~/.tmda/logs/outgoing") > > ...into the tmdarc and have them apply correctly? For the base TMDA, yes. For tmda-cgi, I'm not sure. It would need to set the $HOME environment variable correctly before importing the Defaults.py module and I don't know that it does. > Is there any way I can have /etc/tmdarc point to both a global > configuration and a user configuration? I don't understand what you're asking here.... > Would something like DELIVERY = /var/mail/$USER work? Statements in the /etc/tmdarc and ~/.tmda/config are Python code. Strings in Python must be quoted and Python doesn't understand shell variable syntax. To do what you want will require something like this: DELIVERY = "/var/mail/" + os.environ['USER'] This *won't* work with qmail virtual domains, because $USER is not the email user. It probably won't work with tmda-cgi, because in that case $USER is most likely the user that runs the web server. > It is just that I'm looking at this: > > [EMAIL PROTECTED]:/opt/tmda-cgi/skel/install/.tmda] more config > > CGI_VIRTUALUSER = %(VirtUser)d > CRYPT_KEY_FILE = "%(Home)s/.tmda/crypt_key" > CONFIRM_ADDRESS = "%(User)[EMAIL PROTECTED](Domain)s" > CONFIRM_APPEND = "%(Home)s/.tmda/lists/confirmed" > DATADIR = "%(Home)s/.tmda/" > FILTER_INCOMING = "%(Home)s/.tmda/filters/incoming" > FILTER_OUTGOING = "%(Home)s/.tmda/filters/outgoing" > FULLNAME = %(Name)s > LOGFILE_DEBUG = "%(RealHome)s/tmdadebug.log" > LOGFILE_INCOMING = "%(RealHome)s/tmdaincoming.log" > LOGFILE_OUTGOING = "%(RealHome)s/tmdaincoming.log" > ADDED_HEADERS_CLIENT = {"X-Primary-Address": "%(User)[EMAIL PROTECTED](Domain)s"} > PENDING_BLACKLIST_APPEND = "%(Home)s/.tmda/lists/blacklist" > PENDING_WHITELIST_APPEND = "%(Home)s/.tmda/lists/whitelist" > TEMPLATE_DIR = "%(Home)s/.tmda/templates/" > > ...and wondering if I should just set this up as my /etc/tmdarc. This is a skeleton file that tmda-cgi copies to a user's ~/.tmda directory, substituting appropriate values for things like '%(Home)s', '%(VirtUser)d' and so forth. Once the user is added as a tmda-cgi user and this file is created locally per-user, it doesn't change again and all the paths are hard-coded for that particular user. > But then I wonder, if I setup globals for a lot of this > stuff.....would I leave the above as it is....or? It would be nice > to see a few more example setups out there to work from. The above won't work as either /etc/tmdarc or ~/.tmda/config, because it's a template file meant to be copied and massaged, not a working config file. Unfortunately, I don't run tmda-cgi and can't provide any useful examples. Perhaps someone who does use it can help. Tim _____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
