Panix - Public
Access Networks Corporation

Using tagged addresses, or addresses@$USER.users.panix.com

Panix provides an easy method for you to use variants of your Panix email address so that you can handle incoming mail differently, depending on which address was used. There are two ways of doing it, and they are equivalent in terms of how the mail is handled.

user+tag

The first is to add a + and a tag to your regular email address. So if your username is "abcd", if you're on a mailing list for wine lovers, you might use "abcd+wine@panix.com" as your email address for that list, and "abcd+boats@panix.com" for mailings from your sailors mailing list, and so on.

users.panix.com

The second is to use addresses in the domain $USER.users.panix.com (where $USER is your actual username-- the "abcd" of our example above). That is, "abcd+wine@panix.com" is equivalent to "wine@abcd.users.panix.com", and "abcd+boats@panix.com" is equivalent to "boats@abcd.users.panix.com".

These two forms of address are equivalent to the system, so we'll call them "tagged addresses" for short. We'll refer to the "boats" or "wine" part of the address as the tag.

What happens to tagged addresses?

You can use procmail to have tagged messages delivered to separate folders or forwarded elsewhere. (If you don't do this, all the messages will go directly into your inbox.)


Because indiscriminate forwarding implicates our servers in the spread of spam and virus/worm mail, we require spam blocking and virus protection whenever mail from Panix is forwarded to another site.

If you are not already running procmail, you should check the setup instructions in the general Procmail help document.

You may be using either (or both!) of "mbox" format or "maildir++" format. It's important to decide which you want. For a folder to be accessible via webmail or IMAP, it must be a maildir format folder, and it must reside on the mail server. If you want to access it with Elm, it must *not* be in "maildir++" format and should be in your home directory space.

Automatic processing

If you want to have procmail sort on arbitrary tags, without your having to determine in advance what those tags are, you can do that. Edit your .procmailrc file to include this line:
    INCLUDERC=/net/local/filters/rc.tag
Unless you thoroughly understand your .procmailrc file and why it works as it does, put this line before any of the other INCLUDERC lines and before any individual recipes that you have have in your .procmailrc file.

That file will tell procmail to look for a tag in each message and if it finds one, set a variable, TAG, to the value of the tag it found.

You're not done yet.
Now you have to tell procmail what you want to do with the tagged messages.

Headers for sorting

The most general recipe is this one, which simply saves anything with a tag to the mailbox of the same name:
    #general tag rule: 
    #save anything with a tag to the mailbox of the same name
    :0:
    * TAG ?? .+
    $TAG
Remember: This rule will match on any tag. If you want to use other, specific rules for tags as well, you need to put them first, so the specific tags can be processed the way you want.

Other things to do with tags

You can, of course, use the tag in other ways. For instance, if you have a program called "runthis", you can can pipe messages with a "runthis" tag through that program:
        # Run abce+runthis through the program "runthis":
        :0
        * TAG ?? ^runthis$
        |$HOME/bin/program

You can have mail with any of the tags "stamps", "coins", "dolls", or "paperclips" saved to the folder "collections" (in mbox format):

        :0:
        * TAG ?? ^(stamps|coins|dolls|paperclips)$
        collections
If you want to use maildir and have the folder accessible via webmail and/or IMAP, remember that you need to like this:
        :0
        * TAG ?? ^(stamps|coins|dolls|paperclips)$
        $HOME/.maildir/.collections/

You can discard mail addressed to abcd+somevendor:

       # Throw username+somevendor away:
        :0
        * TAG ?? ^somevendor$
        /dev/null

Again, tag rules matching on one or more specific tags must precede the general tag rule.