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.
The users.panix.com domain
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

This feature is disabled by default (NB: This does NOT apply to user+tag addresses, which are available with or without your intervention), in order to protect you from bounces ("backscatter") from spam sent with forged users.panix.com aliases, and from spam sent to undefined users.panix.com aliases. You would otherwise essentially have a "wildcard" address, which would allow an overwhelming amount of unwanted mail to get delivered.

To enable this feature, log into config.panix.com/shell and go into the "Manage [username].users.panix.com Aliases". You'll see three options:

(Again, none of this applies to user+tag addresses. You will not need to take additional action for user+tag addresses to function.)

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.)

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 one which simply saves anything with a tag to the mailbox of the same name.
This one will save to mbox-style folders in your home directory:
#general tag rule:
#save anything with a tag to the mailbox of the same name
:0:
* TAG ?? .+
$TAG

And this one should be used to save to IMAP/webmail-accessible directories in .maildir:
#general tag rule:
#save anything with a tag to the .maildir folder of the same name
:0:
* TAG ?? .+
$DEFAULT/.$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
• Use a trailing slash to mark the folder as a directory
• Use a leading period tomake the folder visible to webmail/IMAP
• Specify the appropriate location for your folder, either by changing your MAILDIR variable or by noting it explicitly in the rule.
• Remove the second colon (which tells procmail to set a lock).
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.



Last Modified:Tuesday, 22-Feb-2022 08:47:30 EST
© Copyright 2006-2021 Public Access Networks Corporation