Re: New TMDA install

Stephen Warren <[email protected]>
Newsgroups gmane.mail.spam.tmda.user
Message-ID <[email protected]>
David Bandel wrote:
> On 12/19/06, Stephen Warren <[email protected]> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> David Bandel wrote:
>>>> DELIVERY = "/var/mail/%s" % os.environ.get("USER")
>>> the above is what was in there yesterday (when I was getting the error
>>> about /var/mail/None doesn't exist.
>>>
>>> Guess I have to study Python now too. :-(
>> Assuming "the above" means the part I quoted above, that simply means
>> the the environment variable named USER isn't set. Either change USER to
>> the correct environment variable name for your environment, or have
>> whatever system is invoking tmda-rfilter set the USER environment variable.
> 
> the "system" invoking tmda-rfilter is tmda-filter (invoked by
> procmail, which is called by sendmail and is passed the uid).

I'd guess you could get procmail to set USER how you want.

Or, some Python code into /etc/tmdarc;-)

> OK, making the line /var/mail/<username> (substituting the user's name
> for <username>) makes the errors go away.  So now I need to find the
> appropriate variable to call to get the user name.  With as many users
> as I have, will need to write a Perl script to rip through all the
> users /home dirs and change their ~/.tmda/config file.

If you put the definition of DELIVERY in the per-user config file, then
yes, you'll probably have to do some work to patch this up.

> Do I need the /etc/tmdarc file?

It can be useful to share common (possibly parameterized) values.

For example, in my case, I have this in /etc/tmdarc:

DELIVERY = "~/Maildir/"

The ~ expands to the user's HOME directory.

This means I only have to define this in one place, and hence
maintenance is easier; the "code" isn't replicated in each user's
~/.tmda/config file.
signature.asc (application/pgp-signature, 251 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFFiKqGhk3bo0lNTrURAg0zAKCYlrdV3vPIQSrL6LtuG879peCqGgCg5m+H
sa2AnZ1LIU7T7ylqCP99z6U=
=PjfJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.