"Unrecognised line" error from EmailParser

When I try to add a new Requestor to a ticket, I’m getting:

Unrecognised line: tony@tmtm.com at
/home/customers/sites/rt//lib/RT/EmailParser.pm line 404

This is coming from Mail::Address, but I can’t replicate the problem
outside of RT at all. A simple script which calls the method in
Mail::Address, or even the method in RT::EmailParser works just fine.

The full trace is below.

Anyone seen anything like this before?

Thanks,

Tony

  • Trace begun at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Exceptions.pm line 131
  • HTML::Mason::Exceptions::rethrow_exception(‘Unrecognised line: tony@tmtm.com at /home/customers/sites/rt//lib/RT/EmailParser.pm line 404^J’) called at /usr/lib/perl5/5.8.0/Carp.pm line 191
  • Carp::croak(‘Unrecognised line: tony@tmtm.com’) called at /usr/lib/perl5/site_perl/5.8.0/Mail/Address.pm line 122
  • Mail::Address::_tokenise(‘tony@tmtm.com’) called at /usr/lib/perl5/site_perl/5.8.0/Mail/Address.pm line 182
  • Mail::Address::parse(‘Mail::Address’, ‘tony@tmtm.com’) called at /home/customers/sites/rt//lib/RT/EmailParser.pm line 404
  • RT::EmailParser::ParseAddressFromHeader(’’, ‘tony@tmtm.com’) called at /home/customers/sites/rt//lib/RT/User_Overlay.pm line 599
  • RT::User::LoadOrCreateByEmail(‘RT::User=HASH(0x8d17d7c)’, ‘tony@tmtm.com’) called at /home/customers/sites/rt//lib/RT/Ticket_Overlay.pm line 1440
  • RT::ticket::_AddWatcher(‘RT::Ticket=HASH(0x8e8eed0)’, ‘Type’, ‘Requestor’, ‘PrincipalId’, undef, ‘Email’, ‘tony@tmtm.com’) called at /home/customers/sites/rt//lib/RT/Ticket_Overlay.pm line 1421
  • RT::ticket::AddWatcher(‘RT::Ticket=HASH(0x8e8eed0)’, ‘Type’, ‘Requestor’, ‘Email’, ‘tony@tmtm.com’) called at /home/customers/sites/rt//lib/RT/Interface/Web.pm line 1286
  • HTML::Mason::Commands::ProcessTicketWatchers(‘TicketObj’, ‘RT::Ticket=HASH(0x8e8eed0)’, ‘ARGSRef’, ‘HASH(0x8f2c194)’) called at /home/customers/sites/rt/share/html/Ticket/ModifyPeople.html line 49
  • HTML::Mason::Commands::ANON(‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘Owner’, 29, ‘WatcherTypeEmail2’, ‘’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail2’, ‘’, ‘Owner’, 29, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 134
  • HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x8f2eac4)’, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘Owner’, 29, ‘WatcherTypeEmail2’, ‘’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail2’, ‘’, ‘Owner’, 29, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1074
  • eval {…} at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1068
  • HTML::Mason::Request::comp(undef, undef, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘Owner’, 29, ‘WatcherTypeEmail2’, ‘’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail2’, ‘’, ‘Owner’, 29, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 760
  • HTML::Mason::Request::call_next(‘HTML::Mason::Request::ApacheHandler=HASH(0x8f2b4b0)’, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail2’, ‘’, ‘Owner’, 29, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’) called at /home/customers/sites/rt/share/html/autohandler line 196
  • HTML::Mason::Commands::ANON(‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘Owner’, 29, ‘WatcherTypeEmail2’, ‘’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Component.pm line 134
  • HTML::Mason::Component::run(‘HTML::Mason::Component::FileBased=HASH(0x8d31180)’, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘Owner’, 29, ‘WatcherTypeEmail2’, ‘’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1069
  • eval {…} at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 1068
  • HTML::Mason::Request::comp(undef, undef, undef, ‘GroupField’, ‘Name’, ‘UserOp’, ‘LIKE’, ‘WatcherTypeEmail3’, ‘’, ‘GroupString’, ‘’, ‘GroupOp’, ‘LIKE’, ‘Owner’, 29, ‘WatcherTypeEmail2’, ‘’, ‘WatcherAddressEmail1’, ‘tony@tmtm.com’, ‘WatcherTypeEmail1’, ‘Requestor’, ‘id’, 279, ‘WatcherAddressEmail3’, ‘’, ‘WatcherAddressEmail2’, ‘’, ‘UserString’, ‘’, ‘UserField’, ‘Name’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 338
  • eval {…} at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 338
  • eval {…} at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/Request.pm line 297
  • HTML::Mason::Request::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x8f2b4b0)’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 134
  • eval {…} at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 134
  • HTML::Mason::Request::ApacheHandler::exec(‘HTML::Mason::Request::ApacheHandler=HASH(0x8f2b4b0)’) called at /usr/lib/perl5/site_perl/5.8.0/HTML/Mason/ApacheHandler.pm line 792
  • HTML::Mason::ApacheHandler::handle_request(‘HTML::Mason::ApacheHandler=HASH(0x8d45fc8)’, ‘Apache::RequestRec=SCALAR(0x8d459d4)’) called at /home/customers/sites/rt/bin/webmux.pl line 138
  • eval {…} at /home/customers/sites/rt/bin/webmux.pl line 138
  • RT::Mason::handler(‘Apache::RequestRec=SCALAR(0x8d459d4)’) called at -e line 0
  • eval {…} at -e line 0

Unrecognised line: tony@tmtm.com at
/home/customers/sites/rt//lib/RT/EmailParser.pm line 404
[snip]
Anyone seen anything like this before?
It’s caused by a utf8 / regex interaction bug in perl 5.8.0. A
workaround has been checked into the subversion repository of RT; either
upgrade perl, use rt from subversion, or apply the following patch.

  • Alex

Modified: lib/RT/EmailParser.pm
— lib/RT/EmailParser.pm (original)
+++ lib/RT/EmailParser.pm Fri Jul 30 15:59:24 2004
@@ -467,6 +467,8 @@
my $self = shift;
my $Addr = shift;

  • Perl 5.8.0 breaks when doing regex matches on utf8

  • Encode::_utf8_off($Addr) if $] == 5.008;
    my @Addresses = Mail::Address->parse($Addr);

    my $AddrObj = $Addresses[0];
    Networking – one letter away from not working

It’s caused by a utf8 / regex interaction bug in perl 5.8.0. A
workaround has been checked into the subversion repository of RT; either
upgrade perl, use rt from subversion, or apply the following patch.

Excellent.

I’ll try to get an upgrade done (although I’m not too hopeful). I’ve
just applied this patch by hand.

Thanks for the quick response.

Tony

I have applied the following patch to my RT installation, but am still
getting the following error:

Unrecognised line: Nathan Ward at /usr/local/rt-3.2.1/lib/RT/EmailParser.pm line 449 Modified: lib/RT/EmailParser.pm --- lib/RT/EmailParser.pm (original) +++ lib/RT/EmailParser.pm Fri Jul 30 15:59:24 2004 @@ -467,6 +467,8 @@ my $self = shift; my $Addr = shift;
  • Perl 5.8.0 breaks when doing regex matches on utf8

  • Encode::_utf8_off($Addr) if $] == 5.008;
    my @Addresses = Mail::Address->parse($Addr);

    my $AddrObj = $Addresses[0];

I’m running perl-5.8.0 on RHEL3, which others seem to have working…
Anyone have any thoughts as to why this error remains?
Is there a way to test that the utf8 flag is actually being turned off,
and print a message to STDERR?

Nathan Ward

Please read FAQ. You want upgrade your perl.
http://wiki.bestpractical.com/?FAQ

Nathan Ward wrote:

I had this problem as well and by upgrading to perl 5.8.5 the problem went
away.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Nathan Ward
Sent: Monday, August 30, 2004 10:38 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] “Unrecognised line” error from EmailParser

I have applied the following patch to my RT installation, but am still
getting the following error:

Unrecognised line: Nathan Ward at /usr/local/rt-3.2.1/lib/RT/EmailParser.pm line 449 Modified: lib/RT/EmailParser.pm --- lib/RT/EmailParser.pm (original) +++ lib/RT/EmailParser.pm Fri Jul 30 15:59:24 2004 @@ -467,6 +467,8 @@ my $self = shift; my $Addr = shift;
  • Perl 5.8.0 breaks when doing regex matches on utf8

  • Encode::_utf8_off($Addr) if $] == 5.008;
    my @Addresses = Mail::Address->parse($Addr);

    my $AddrObj = $Addresses[0];

I’m running perl-5.8.0 on RHEL3, which others seem to have working…
Anyone have any thoughts as to why this error remains?
Is there a way to test that the utf8 flag is actually being turned off, and
print a message to STDERR?

Nathan Ward

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT wiki at http://wiki.bestpractical.com