Rule to test on the comment portion of e-mail address?

V

Vanguard

Outlook 2002 SP-2
Windows 2000 Pro SP-4

The To and Cc headers will contain the recipient in the forms:

<email>

or

name <email>

I have a passcode that I will check to see if it is in the Subject
header. If the passcode (which is obviously something other than
"passcode") is used then my "Keep if passcode in Subject" rule:

Apply this rule after the message arrives
with "passcode" in the subject
mark it as "high importance"
stop processing more rules

will leave their message in my Inbox (and mark it as high priority).
Works great when the passcode is in the Subject header but that means
the sender has to remember to insert the passcode somewhere in the
Subject. I'd also like to let them save my passcode in with my name in
their record as "John Doe passcode" (or "John passcode Doe" if they
wanted to keep the sort order by lastname). Doesn't matter where in the
name field for the recipient that the passcode is positioned, just that
it's there. I then defined a "Keep if passcode in To/Cc" rule:

Apply this rule after the message arrives
with "passcode" in the recipient's address
mark it as "high importance"
stop processing more rules

I expected this to detect that "myname passcode <myemail>" had the
passcode in the comment portion of the e-mail address (i.e., the part
that usually shows your name, company name, or whatever was recorded in
the Name field of the sender's contact record) and leave the sender's
e-mail in my Inbox. This rule does not work.

Why? Because the "in the recipient's address" clause only checks the
e-mail portion of the e-mail address. In "name <email>", only the
"email" portion gets scanned for the specified string. I can't see a
condition clause that lets me scan in the "name" portion of the e-mail
address. The comment portion is optional but is often included,
especially when the sender uses a contact record from their address book
(because they entered the recipient's name in addition to their e-mail
address).

Got any ideas on how to define a rule in Outlook that will also search
in the "name" portion of the "name <email>" string in the To and Cc
headers? There are rules like "with my name in the To/Cc box" but that
means I would have to include my passcode in the Name field in my e-mail
account, and I definitely don't want to divulge my passcode on every
e-mail that I send. I only want special senders to know my passcode.
There is no "with <specific words> in the To or Cc box" clause which
would work like the "with <specific words> in subject" clause.

I already have the "Keep if known sender" rule:

Apply this rule after the message arrives
sender is in <contact> Address Book
stop processing more rules

If they are in my Contacts folder (or whatever contact-type folder is
listed in the rule; I have multiple contact-type folders so I need to
have multiples of this rule since Microsoft does not allow listing
multiple contact-type folders per rule), their e-mail stays in my Inbox.
But there are senders that I do not want to put in my address book(s),
like those from whom I expect only one or a few e-mails, or if I want to
wait until they send my their first e-mail to me that is digitally
signed so I can save them in a new record (without having to decide to
overwrite an existing record or create a duplicate and then migrate the
old data over to the new record). There is a definite use for a
passcode, especially to prevent a false positive by anti-spam software
that might delete or hide critical e-mails. Using a passcode will work
in the Subject but I'd like to get a rule working that would also check
for the passcode in the To and Cc headers. Maybe it can't be done with
Outlook's current set of rules.
 
V

Vanguard

Well, I did come up with one solution although not one I really like.
Instead of using:

with "passcode" in recipient's address

(which didn't work because only the "email" portion of "name <email>"
gets scanned), I changed it to:

with "passcode" in message header

Well, yeah, it will detect when the passcode is in the To or Cc headers,
but what it really does is check that the passcode appears ANYWHERE
within the headers. Also, when checking on string in the Subject
header, the Outlook clause "with <string> in subject" is case
insensitive. But with Outlook's clause "with <string> in message
header", it is case sensitive. So instead of looking for a passcode of,
say, "-$3rx$-" (not my real passcode) in the clause:

with "-$3rx$-" in the message header

I have to instead use:

with "-$3rx$-" or "-$3Rx$-" or "-$3RX$-" or "-3$rX$-" in the message
header

Sucks. I discovered this case sensitivity for the message header string
scan when trying to detect if a Message-ID header existed. An e-mail
with "Message-id:" didn't get detected, so my message header rule has to
check for "Message-ID:", "Message-Id:", "Message-id:", "message-ID:",
"message-Id:", and "message-id:" (other permutations of capitalization
are possible but I figured testing on capitalization of words and
initials was enough). I had to do the same capitalization permutations
in a rule on checking for e-mails from someone that was impersonating as
my ISP (by seeing if their domain was listed in the Received header,
but, of course, Outlook's rules don't let you search within specific
headers, like Received). I'm not sure why Microsoft deemed that some
rules are case sensitive and others are not. All rules should be case
insensitive.

So, yeah, there is a way to check for my passcode to appear but not in
any specific header. With the use of "with passcode in the message
header" then I don't even need the other rule with "with passcode in the
subject". I wanted to keep my passcode short so it would be easy to inc
lude in the Subject or when recording it with my name in a record in an
address book, but if the test is going to look all over in every header
then it has to be long enough and weird enough to sufficiently guarantee
some uniqueness from any other string that might appear in the headers.
Damn!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top