Bogus Autocreated watcher

I haven’t worked with RT since RT1, and I gotta say that this is a major
improvement. Bravo.

When an email is processed from a never-before-seen address, the ticket
that is created includes a watcher whose User comment is “Autocreated
when added as a watcher”. This watcher has as it’s username and email
address the top- and mid-level domain of the RT site, i.e. my server
runs on support.domain.com, and the watcher is set to Username:
domain.org & Email: domain.org. Thereafter, for that ticket, you see the
following bounced mail:

Envelope-to: www-data@domain.org
X-Failed-Recipients: domain.org@domain.orgFrom: Mail Delivery System Mailer-Daemon@domain.org
To: www-data@domain.org
Subject: Mail delivery failed: returning message to sender

This message was created automatically by mail delivery software (Exim).

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

domain.org@domain.org
unknown local-part “domain.org” in domain “domain.org

------ This is a copy of the message, including all the headers. ------

Return-path: www-data@domain.org
Received: from www-data by support.domain.org with local (Exim 3.35 #1
(Debian))
id 19nWiu-0000hA-00; Thu, 14 Aug 2003 22:02:00 -0700
Subject: [domain.org #1] Test1
From: “G. Richard Bellamy via RT” support@domain.org
Reply-To: support@domain.org
In-Reply-To: rt-1@domain.org
Message-ID: rt-3.0.4-1-2.15.4909207588307@domain.org
Precedence: bulk
X-RT-Loop-Prevention: domain.org
RT-Ticket: domain.org #1
Managed-by: RT 3.0.4 (http://www.bestpractical.com/rt/)
RT-Originator: rbellamy@foo.com
To: tranistive@bar.net
Cc: domain.org@domain.org
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Date: Thu, 14 Aug 2003 22:02:00 -0700

As you can see, the Watcher’s email is mangled. The watcher did not
exist prior to the first email from first unknown user, and seems to be
the only one created, as subsequent emails from unknown users set the
same watcher.

Currently, my workaround is to delete the watcher from the ticket - this
could get expensive in time. I’m no Perl hack, so am reluctant to spend
serious time trying to figure it out myself. Please help. :slight_smile:

Please let me know if there is more information I can send along…

G. Richard Bellamy

G. Richard Bellamy wrote:

When an email is processed from a never-before-seen address, the ticket
that is created includes a watcher whose User comment is “Autocreated
when added as a watcher”. This watcher has as it’s username and email
address the top- and mid-level domain of the RT site, i.e. my server
runs on support.domain.com, and the watcher is set to Username:
domain.org & Email: domain.org. Thereafter, for that ticket, you see the
following bounced mail:

Are you using $CanonicalizeEmailAddressMatch and
$CanonicalizeEmailAddressReplace?
Phil Homewood, Systems Janitor, http://www.SnapGear.com
pdh@snapgear.com Ph: +61 7 3435 2810 Fx: +61 7 3891 3630
SnapGear - Custom Embedded Solutions and Security Appliances

Phil Wrote:

Are you using $CanonicalizeEmailAddressMatch and
$CanonicalizeEmailAddressReplace?

Thanks for the response… Please find the config information inline.

I’ve had it happen again - with a twist such that it appears that the
symptomology has changed:
EXAMPLE
<RT_SiteConfig.pm snippet>
Set($rtname , “domain.org”);
Set($CanonicalizeEmailAddressMatch , ‘support.domain.org$’);
Set($CanonicalizeEmailAddressReplace , ‘domain.org’);
</RT_SiteConfig.pm snippet>

Mail-From: foo@bar.net Watcher: domain.org CC: domain.org@domain.org Mail-From: blah@halb.net Watcher: blah.net CC: blah.net@blah.net

Some more information:

The Cc watcher does not show up in the “Display” view of the ticket, but
does in the “People” view.

Anybody have some educated idea how I can fix this? It’s not such a huge
deal to go through and bulk remove these watchers, but I can see it
becoming burdensome when the ticket flow goes into production.

If someone could give me some idea of where I would look in
/opt/rt3/lib/RT/Interface/Email.pm (RT::Interface::email::Gateway), I
would appreciate the guidance.

Thanks.

Perhaps…

Set($CanonicalizeEmailAddressMatch , ‘support.domain.org$’);
Set($CanonicalizeEmailAddressReplace , ‘domain.org’);

Should be…

Set($CanonicalizeEmailAddressMatch , ‘support.domain.org$’);
Set($CanonicalizeEmailAddressReplace , ‘ncmahelp.org’);

I’m new to perl and regular expressions have always been a foreign
language to me. So I’m kinda shootin in the dark here. But I seem to
remember that the period (“.”) is a special character, meaning “any
character (except \n newline)”.

Thanks.