TMDA (Templates) Setup

When someone sends you mail from an address not on your whitelist, TMDA responds with a confirmation request template. You can customize this template with your own personalized text. The defaults are somewhat bland and impersonal, so customizing them might help people better understand your spam protection.

These instructions are also available in ~/.tmda/templates/README.


generic@froody:~> cat ~/.tmda/templates/README 
[..]
generic@froody:~> 
generic@froody:~> cp /usr/local/share/tmda/*.txt ~/.tmda/templates/

This will copy the default templates into your own directory. Next, ensure that they are there and edit them. When editing, it's generally best to leave programmatic things alone and only edit the text messages. Examples of programmatic things are :

From.US-ASCII: "%(FULLNAME)s" <%(recipient_address)s>
%(confirm_accept_address)s

That is, things with funny characters in them.


generic@froody:~> ls ~/.tmda/templates/
README                  confirm_accept.txt
bounce.txt              confirm_request.txt
generic@froody:~> pico confirm_request.txt
generic@froody:~> pico confirm_accept.txt
generic@froody:~> pico bounce.txt

Make your changes, then save and exit from the file. Next, we need to tell TMDA to actually use these templates:


generic@froody:~> pico ~/.tmda/config

#TEMPLATE_DIR = os.path.expanduser("~/.tmda/templates/")

TEMPLATE_DIR = "/usr/local/share/tmda/"

--> 

TEMPLATE_DIR = os.path.expanduser("~/.tmda/templates/")

#TEMPLATE_DIR = "/usr/local/share/tmda/"

That is, remove the # from the first TEMPLATE_DIR line and put it in front of the second one. Save and exit. Test the new templates out by sending yourself mail from another account (or have a friend help). If things don't look like they're working, you can back out your changes by editing ~/.tmda/config again and switching the #. You can likely look at errors in ~/.tmda/logs/YYYYMM-debug.log. Feel free to email the admin for help as well.

You're now running with customized templates. Your correspondents will thank you!

You can also read the official documentation.

<admin*rupture.net>

File /tmda/templates.shtml
was last updated : 05:25 PM 11/03/04