TMDA Client Configuration
In addition to filtering your incoming e-mail, TMDA can also work with your mail client to send your outgoing messages with unique, cryptographically enhanced (tagged) e-mail addresses. This is done to complement the filter's "whitelist" functionality.
Dated Addresses
TMDA can automatically tag your messages with a temporary e-mail address which only works for a defined time interval (e.g, 5 days). During this period, even those not on your whitelist will be able to contact you using the dated address. This also allows you to participate freely in open discussion forums such as Internet mailing lists without fear that your address will be "harvested" by spammers for later use against you, and without opening up your whitelist more than necessary.
Here is an example dated address:
jason-dated-989108708.a17f80@mastaler.com
This particular address expires on Sun, May 6 00:25:08 2001 UTC, which is exactly 5 days after it was generated. TMDA time intervals can be set in years, months, weeks, days, hours, minutes, and seconds. Once a dated address expires, messages sent there must go through the confirmation process. Use of strong cryptography insures that the timestamp can't be modified.
Sender Addresses
TMDA can also tag your messages with a sender address which is an e-mail address that only a certain sender can use.
Here is an example sender address:
jason-sender-a751af@mastaler.com
This particular sender address will only accept messages from president@whitehouse.gov. Other messages must go through the confirmation process. Sender addresses can also be generated to accept mail from any sender at a given domain.
Sender addresses are often used to subscribe to mailing lists. This way, you don't have to worry that the subscription list might get harvested by spammers since only the mailing list software will be able to send messages there. The address to use can be found in the Return-Path header of a mailing list message (e.g, subscribe to the Python list with a sender address based upon python-list-admin@python.org).=
Keyword Addresses
TMDA can also tag your messages with a keyword address which will work for any sender and indefinitely unless specifically revoked. Any string can be used as the keyword.
Here is an example keyword address using the keyword `promos':
jason-keyword-promos.8w06e8@mastaler.com
Keyword addresses are appropriate when you need to hand-out a working address, but you don't want its use limited to a particular sender or time frame. They are particularily useful in cases where you are not be able to predict the sender address such as with automated mailings (your ISP, your Amazon.COM account, etc.).
The caveat of course is that since keyword addresses are essentially keys to your inbox, you must manually intervene if the address starts getting spammed. An easy way to do this is to add an entry for the harvested keyword address to your ~/.tmda/filters/incoming file.
The tmda-address program is included to generate the various types of tagged addresses from the command line. Run the utility with the -h flag to get usage information.
* outgoing filter file:
TMDA determines how to tag your outgoing mail by parsing your outgoing filter file. Set one up by reading through the FilterSpecification (especially the examples section at the end).
If you don't have an outgoing filter file, or the destination address doesn't match any lines in your filter file, the message will be tagged with a dated address by default. The lines in your filter make exceptions to that rule. You can also change the default by setting ACTION_OUTGOING in your tmda/config.
TIP: Many users prefer that their "whitelisted" addresses receive untagged (no cookie added) messages. This way their trusted contacts are not even be aware of TMDA. If you are whitelisting as described in the FAQ, you can accomplish this by adding one of the following lines to your ~/.tmda/filters/outgoing filter file:
to *@=domain.dom bare to-file ~/.tmda/lists/whitelist bare
* X-TMDA header:
You can override any declarations you might have in your filter file by adding this header when composing a message. TMDA will look for it first when determining how to tag the message. The header will then be removed just before the message is sent. Here is how it can be used:
X-TMDA: bare |
Send the message to all recipients with your address untagged (no cookie added) |
X-TMDA: bare=append |
Send the message to all recipients with your address untagged (no cookie added), and also append the recipient addresses to your BARE_APPEND file. |
X-TMDA: dated |
Send the message to all recipients with a dated address (default timeout interval) |
X-TMDA: dated=3M |
Send the message to all recipients with a dated address that expires in 3 months |
X-TMDA: sender |
Send the message to all recipients with a sender cookie that is based on the recipient address. |
X-TMDA: sender=owner-xemacs-beta@xemacs.org |
Send the message to all recipients with a sender cookie based on owner-xemacs-beta@xemacs.org instead of the recipient address. |
X-TMDA: sender=xemacs.org |
Send the message to all recipients with a sender cookie based on xemacs.org instead of the recipient address. |
X-TMDA: domain |
Send the message to all recipients with a sender cookie that is based on the domain of the recipient address. |
X-TMDA: keyword=promos |
Send the message to all recipients with a keyword (promos) cookie added to your address |
X-TMDA: exp=postmaster@xemacs.org |
Send the message to all recipients from postmaster@xemacs.org |
X-TMDA: ext=mlist-xemacs-beta |
Send the message to all recipients from jason-mlist-xemacs-beta@mastaler.com |
* ~/.tmda/config configuration:
Make sure that your crypt_key file is the same on both your mail server and your mail client -- they must match. See ConfigurationVariables for more client options.
* Mail User Agent (MUA) configuration:
To have TMDA read your configuration each time you send outgoing mail and modify your sender address accordingly, you must arrange for your MUA to call the included sendmail compatibility wrapper (tmda-sendmail). tmda-sendmail will use the address set by your MUA as the base for your tagged address. See below for how to accomplish this for a few popular MUAs.
NOTE: If your MUA does not support a sendmail command-line interface as is the case with most non-Unix clients, you should use tmda-ofmipd instead.
- For BSD Mail/mailx, add the following line to your .mailrc file:
set sendmail="/path/to/tmda/bin/tmda-sendmail"
For Pine, add the following line to your .pinerc file:
sendmail-path="/path/to/tmda/bin/tmda-sendmail"
For Mutt, add the following line to your .muttrc file:
set sendmail="/path/to/tmda/bin/tmda-sendmail"
and make sure sendmail_wait is not set to -1.
For VM, add the following line to your .vm file:
(setq sendmail-program "/path/to/tmda/bin/tmda-sendmail")
For Gnus, add the following line to your .gnus file:
(setq sendmail-program "/path/to/tmda/bin/tmda-sendmail")
Also see tmda.el (located in contrib), which is a module for integrating TMDA with Gnus and Message mode.
For nmh,
- Make sure nmh was compiled to use Sendmail as its delivery agent (i.e, "--with-mts=sendmail")
- Add the following line to your ~/.mh_profile:
postproc: /path/to/nmh/lib/spost
- Add the following line to your /path/to/nmh/etc/mts.conf:
sendmail: /path/to/tmda/bin/tmda-sendmail
For Sylpheed, Configuration --> Common Preferences --> Send --> External Program
Check Use external program for sending
In the Program path box, enter /path/to/tmda/bin/tmda-sendmail
For Mahogany, Edit --> Preferences --> Network
Check Use local mail transfer agent
In the Local MTA command box, enter /path/to/tmda/bin/tmda-sendmail
For XFMail, Misc --> Config Accounts+Misc --> Send
Check Sendmail under Send method
In the Sendmail Path box, enter /path/to/tmda/bin/tmda-sendmail
For SqWebMail
For KMail (KDE Mail), Settings --> Configure KMail --> Network --> Sending Mail
Check Sendmail
In the Location box, enter /path/to/tmda/bin/tmda-sendmail
* USENET News Client configuration:
If you still read USENET (a notorious source of spam), you might find it useful to post using a dated address. Simply have your newsreader call tmda-address -dn and use the result as your posting address.
For Gnus, this could be accomplished with the following addition to your .gnus file:
(defun tmda-dated-address () (shell-command-to-string "/path/to/tmda/bin/tmda-address -dn")) (setq gnus-posting-styles (message-this-is-news (address tmda-dated-address)))
For slrn, you can define an m4 macro that modifies your .slrnrc each time slrn is invoked:
- Copy your .slrnrc to .slrnrc.m4, edit .slrnrc.m4 and search for line which begins with "set username". Change that line to:
set username "patsubst(TMDADATED, `@.*$')"
- Then make an alias or script for running slrn. Below is an example alias for tcsh.
alias slrn-dated 'm4 -DTMDADATED=`tmda-address -dn` \ ~/.slrnrc.m4 > ~/.slrnrc && slrn -h newshost'
- Copy your .slrnrc to .slrnrc.m4, edit .slrnrc.m4 and search for line which begins with "set username". Change that line to:
For TIN:
In tinrc: # If --internal use the builtin mini inews for posting via NNTP # otherwise use an external inews program inews_prog=/path/to/bin/inews.sh inews.sh: #!/bin/sh sed "/^From:/d" |/usr/bin/inews -h -S -f `/usr/bin/tmda-address -d`
For Mutt with the VVV-NNTP patch applied, see the following instructions.