How to get RT to use Reply-To for returned emails

In my setup my users are sending emails to RT from a machine where their
email address isn’t valid. It is hard to explain. The corporate email
address for my users is not the same as their login and email address on
the server where the email is originating. We use Mutt as the client.
The emails are sent from inside a program the user is running.
It is like this
User’s login to server: joed
email address on that server: joed@localserver.edu
Corporate email is joed@corporateemail.org
REPLY-TO joed@corporateemail.org

The user sends the email to RT from the application on the server. Mutt
sends the email to RT and RT takes it and processes it. It correctly
adds the ticket to the proper Queue but it then sends the reply back to
the From address not the REPLY-TO address. This reply is then refused by
the local server.

Is there a way to have RT use the REPLY-TO field for replies instead of
the From field? Or is the REPLY-TO field not set in all email clients?

I hope I gave enough info.

TIA

John J. Boris, Sr.
JEN-A-SyS Administrator
Archdiocese of Philadelphia
"Remember! That light at the end of the tunnel
Just might be the headlight of an oncoming train!"

User’s login to server: joed
email address on that server: joed@localserver.edu
Corporate email is joed@corporateemail.org
REPLY-TO joed@corporateemail.org

The user sends the email to RT from the application on the server. Mutt
sends the email to RT and RT takes it and processes it. It correctly
adds the ticket to the proper Queue but it then sends the reply back to
the From address not the REPLY-TO address. This reply is then refused by
the local server.
I could be wrong, but I think this a problem that ExternalAuth (with
LDAP) is meant to solve?
Basically, you’re trying to setup alias addresses for users.

Cambridge Energy Alliance: Save money & the planet

Hi John,

It’s possible to access the headers of the original e-mail in an on-create
scrip and then change the requestor to whatever is found in the reply-to
header. You would have to create a new user for the reply-to address if
that user does not already exist. You might end up with a bunch of bogus
users unless you also delete the original requestor/user after changing to
the new one because RT creates the user before the on-create trigger
happens (you might have to shred it, I’m not sure). And if there is no
reply-to header then obviously you wouldn’t change the requestor. Doing
this might present some surprise gotchas as well, so be prepared.

Another thought is to change the requestor’s “userid” to the reply-to
address. This seems like it would be cleaner, but I’ve never done it and
don’t know whether it is feasible. If the user already exists, then you
change the requestor to that user. You still need to delete any bogus user
that gets created.

I think this will get you the Reply-To header:
my @ReplyTo =
$self->TicketObj->Transactions->First->Attachments->First->GetHeader(‘To’);

but you might be able to simplify it to:
my @ReplyTo =
$self->TransactionObj->Attachments->First->GetHeader(‘Reply-To’);

Give it a shot and have fun!

Regards,
Gene

At 11:27 AM 9/8/2008, John BORIS wrote:

In my setup my users are sending emails to RT from a machine where their
email address isn’t valid. It is hard to explain. The corporate email
address for my users is not the same as their login and email address on
the server where the email is originating. We use Mutt as the client.
The emails are sent from inside a program the user is running.
It is like this
User’s login to server: joed
email address on that server: joed@localserver.edu
Corporate email is joed@corporateemail.org
REPLY-TO joed@corporateemail.org

The user sends the email to RT from the application on the server. Mutt
sends the email to RT and RT takes it and processes it. It correctly
adds the ticket to the proper Queue but it then sends the reply back to
the From address not the REPLY-TO address. This reply is then refused by
the local server.

Is there a way to have RT use the REPLY-TO field for replies instead of
the From field? Or is the REPLY-TO field not set in all email clients?

I hope I gave enough info.

TIA

John J. Boris, Sr.
JEN-A-SyS Administrator
Archdiocese of Philadelphia
"Remember! That light at the end of the tunnel
Just might be the headlight of an oncoming train!"


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

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Gene LeDuc, GSEC
Security Analyst
San Diego State University

In my setup my users are sending emails to RT from a machine where
their
email address isn’t valid. It is hard to explain. The corporate email
address for my users is not the same as their login and email
address on
the server where the email is originating. We use Mutt as the client.
The emails are sent from inside a program the user is running.
It is like this
User’s login to server: joed
email address on that server: joed@localserver.edu
Corporate email is joed@corporateemail.org
REPLY-TO joed@corporateemail.org

Hi John

RT usually looks at Reply-To. Have a look at
RT::Interface::Email and the ParseSenderAddressFromHead
function. Is RT assigning the Requestor to the proper
Email but just sending mail to the wrong place?

Assuming these are relatively deterministic and you can write
a regex for the localserver part, you can use the
CanonicalizeEmailAddressMatch
and CanonicalizeEmailAddressReplace config variables
in RT_SiteConfig.pm and avoid needing to mess with the Reply-To
parsing.

-kevin

In my setup my users are sending emails to RT from a machine where
their
email address isn’t valid. It is hard to explain. The corporate email
address for my users is not the same as their login and email
address on
the server where the email is originating. We use Mutt as the client.
The emails are sent from inside a program the user is running.
It is like this
User’s login to server: joed
email address on that server: joed@localserver.edu
Corporate email is joed@corporateemail.org
REPLY-TO joed@corporateemail.org

The user sends the email to RT from the application on the server.
Mutt
sends the email to RT and RT takes it and processes it. It correctly
adds the ticket to the proper Queue but it then sends the reply back
to
the From address not the REPLY-TO address. This reply is then
refused by
the local server.

John,

I think the right place to be fixing this is in the MTA on your
localserver.
You might want to be looking for a ‘masquerade’ setting.

Failing that, you might want to get mutt to write out a different
’From’ header.

I do that using the following code in my .muttrc:

my_hdr From: Jesse Vincent jesse@bestpractical.com

Is there a way to have RT use the REPLY-TO field for replies instead
of
the From field? Or is the REPLY-TO field not set in all email clients?

As I read RT’s code, we’re already preferring the Reply-To over the
from, actually.

-jesse