Adding Domain Name to Outgoing Email Addresses

Hello,

We’d like to be able to specify email addresses on tickets without
having to type the domain name (i.e… just type “joeuser” rather than
"joeuser@ourfirm.com" ). Can RT be configured to add a
default domain name to outgoing email addresses if none is
present or is this best left to the mail program?

Thanks,
Steve

Hello,

We’d like to be able to specify email addresses on tickets without
having to type the domain name (i.e… just type “joeuser” rather than
joeuser@ourfirm.com” ).

I think what you want RT to be doing is canonicalizing the email address
on input, not on output. Grep the config file for “CanonicalizeEmail”.
It may well be that the standard regex won’t meet your needs and you’ll
need to overlay the entire subroutine, but that should take care of what
you need.

Jesse

Request Tracker — Best Practical Solutions – Trouble Ticketing. Free.

We’d like to be able to specify email addresses on tickets without
having to type the domain name (i.e… just type “joeuser” rather than
"joeuser@ourfirm.com" ).

I think what you want RT to be doing is canonicalizing the email address
on input, not on output. Grep the config file for “CanonicalizeEmail”.
It may well be that the standard regex won’t meet your needs and you’ll
need to overlay the entire subroutine, but that should take care of what
you need.

You were right, it can’t be done with just the regular expression variables,
although the CanonicalizeEmailAddress method of User does munge
addresses coming in from the UI – I’d assumed it was strictly for
the email interface.

The RT::CanonicalizeEmail* variables don’t work because, to append "@domain"
to the address, you need to match an address with no “@” in it and then
interpolate it in the replacement string – if the replacement string
is itself in a variable, any “$1” reference buried in it does not get
interpolated.

Altering the code in a User_Local.pm file works, just added the line:

$email =~ s/^([^@]+)$/${1}\@mit.edu/i;

As a more general solution, I think it would be more intuitive if
the /Ticket/ModifyPeople.html accepted either RT userids (without the “@”)
or email addresses (with the @). Right now, it displays the RT userid
for existing watchers, which won’t have the “@” for e.g. local privileged
users, yet adding a user the way it is shown, fails.

If you would suggest where in the code to put the logic I could work on
a patch.

thanks,

-- Larry

I probably wasn’t very clear in what I was trying to do. I’m creating
a new ticket in the web interface, or maybe adding a reply
to a ticket, and I want to specify ccs, admin ccs etc - for addresses
within my domain I don’t want to have to type “@mit.edu” each time.

My Eudora mail client, for example, has a config setting “domain to
add to unqualified outgoing addresses”, which I set to “mit.edu”.

Steve

At 04:48 PM 2/2/2004 -0500, Jesse Vincent wrote:>On Mon, Feb 02, 2004 at 04:41:53PM -0500, Stephen Turner wrote:

Hello,

We’d like to be able to specify email addresses on tickets without
having to type the domain name (i.e… just type “joeuser” rather than
joeuser@ourfirm.com” ).

I think what you want RT to be doing is canonicalizing the email address
on input, not on output. Grep the config file for “CanonicalizeEmail”.
It may well be that the standard regex won’t meet your needs and you’ll
need to overlay the entire subroutine, but that should take care of what
you need.

    Jesse


Request Tracker — Best Practical Solutions – Trouble Ticketing. Free.