Why Use Choicemail?


Because it works.

Spam now accounts for about two-thirds of all email. It costs most email users at least 15 minutes a day. Research shows that spam costs companies $400-800 per mailbox every year. And these costs are growing.

Permission-based email management is the only thing that actually solves, or ever will solve, the spam problem. (To learn more, read our whitepaper.) It is 100% effective, and ChoiceMail makes it available to you now.

With ChoiceMail, you will never get another piece of unwanted email because a message can reach your inbox in one of only four ways:

  • It is from someone on your whitelist
  • It is from a new sender whose registration request you accepted
  • It matches a permission rule you created
  • It is from a domain that is on your accepted domain list.
  • You approved it manually

In short, if an email is in your box, it’s because you want it there. ChoiceMail transfers the burden of dealing with email messages from people you don't know back to where they belong– the senders. Learn more and get your FREE trial for home or business!

Why ChoiceMail
Transform Rules

Warning - do not attempt to change the contents of the transformrules file unless you really understand what you are doing. DigiPortal Software does not provide technical support on this topic and all requests will be quietly ignored. The information in this document is provided as-is and intended only as a starting point for advanced users familiar with the concepts described below.

As of ChoiceMail One version 2.5, the transform rules file is edited through a tree representation rather than through the raw text file.

Email messages can be preprocessed before any tests are applied to them. This is particularly useful to get rid of bogus HTML tags that are often inserted into email messages in an attempt to prevent undesirable keywords from being detected.

For example, suppose you have noticed that you're getting a lot of messages containing the word 'viagra' and you'd like to create a rule to delete any incoming message that has the word 'viagra' in it. However, attempts to create a standard permission rule with 'viagra' as the keyword in the body section are failing.

The reason it's not working is because in the underlying email message, the word 'viagra' does not appear by itself. Instead, it will be broken up by using bogus HTML tags. Here is a real example from an email message recently received:

G<!--w88u0k1fg2nm4o-->et Vi<!--06qso523nnr-->a<!--or55j23i3u-->gra o<!--942m1c3t4eto-->nline

The 'HTML' tags are bracketed with '<' and '>' but they are in fact invalid tags. Most browsers will simply ignore them, thereby displaying

Get Viagra online

Standard keyword searching will however fail to find 'viagra' anywhere.

The transformrules.ini file uses a search/replace mechanism that can be used to temporarily change a message (the subject and/or the body) so that it is easier to find certain keywords. However, unlike the basic search/replace mechanism that is found in most word processors, the transform rules subsystem uses a mechanism called regular expressions to allow more general matching. An explanation of regular expressions is beyond the scope of this document but you can search for the phrase using your normal search engine to find more information on this topic.

Format of the transform rules file
The file is divided into named sections. Each section is enclosed in square brackets. A section is associatred with a particular permission rule by specifying the section name as the value for the "Message preprocessor name' in a permission rule editor. Any line that starts with a semicolon is considered to be a comment and will be ignored by the system.

Within a section, you can have as many transform rule groups as you like and each rule group will be applied to the result of the previous transformation in the section.

A rule group consists of three parts:


where N starts at 1 and is incremented by 1 for each successive rule group. The values for the regexN and replaceN keywords will be single regular expressions. An expression is required for the regexN keyword but is optional for the replaceN keyword.

The value for the targetN is either body or subject meaning that the group should be applied to either the body or the subject of the message respectively.

As each rule group is processed, all text in the message matching the value of the regexN expression will be replaced by the content of the associated replaceN expression. All other text is left intact.


; This section just strips all HTML tags out
; of a message and then deletes all spaces.
; It makes it easier to look for bad words
; that the spammers have attempted to hide
[Strip HTML]

;First, eliminate all HTML tags from the body

;Now get rid of all spaces
regex2=(\ )\s*

You can edit your transform rules by clicking on the Edit button in the email rule dialog to open up your existing rules. If you do not have any transform rules, you can start by pasting the example above into the transform rules window.

The email rule dialog example also shows how this transform rule can be used with a regular expression to eliminate a substantial number of unwanted emails.

Use the following regular expression in the BODY section of a rule that uses the transform rule above to preprocess the received email message.


This expression looks for the words viagra, penis, or penile in the message after it has been preprocessed, taking into account that spammers often try to disguise these words by changing one of the characters in them to something else.

What our users say:

it’s really a 'no-brainer'... [it] has all of the features I need to effectively filter out all of my junk mail

Glen A.


ChoiceMail Awards and Reviews

Noah Coad's Code
Walter Mossberg
Walter Mossberg, Wall Street Journal
CNet Rating