Automatic creation of users through the mailgate with truncated username

Hello folks,

We are using RT here at the Department of Computer Science of the University of
Bahia in Brazil and we like it very much. Congratulations to all of you.

We had though a need which RT couldn’t accomodate easily. On ticket creation
through the mailgate, we wanted the username to be the login only. So if sends a ticket we want him to be created as ted. The reason is
that we only allow users within our domain to submit tickets and we want them to
autenticate via NIS so their username needs to match how NIS knows them.

We have managed to change the code to do this. But I would like to propose this
as a settable option of the mailgate. It wouldn’t be very difficult to do and I
think it could be useful to other people. Would you consider incorporating this


I did exactly this, too, by overriding
CanonicalizeUserInfo() in

However, my requirements are much more complicated than yours.
If a new person logs in via externalauth, they get one name.
If they come in via email, I munge certain addresses as you do,
but not others. If I can them look them up in ldap I add
phone numbers, etc.

I can’t imagine a generic config option that is simple enough
to use yet complicated enough to suit my purposes.
For me, overriding that subroutine is the best way to go,
and not particularly hard to maintain.