Koozali.org: home of the SME Server

Changing default pseudonyms

Offline Peasant

  • *
  • 143
  • +2/-0
Changing default pseudonyms
« on: August 06, 2014, 11:39:41 AM »
Is there a simple way to change or add to the default pseudonyms that are created when a new user is added please? I've a company who's email addresses are all of the format firstnamelastname@mycompany.local and would like to add this format if possible.

Thanks in anticipation.
Jim

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: Changing default pseudonyms
« Reply #1 on: August 06, 2014, 02:21:43 PM »
You might be able to customize the makePseudonyms function in /etc/e-smith/events/actions/update-user-pseudonyms, plus any changes in the main body of the program if you want to avoid creation of two pseudonyms for every user.

I don't think there's any official way to modify this file, so you'll be moving "off the reservation": your changes will evaporate with each update to e-smith-email (e-smith-email-5.2.0-25.el5.sme.noarch on my SME 8.1 server)


[edit]
The smallest change you could make would be to replace the underbar_pseudonym with your desired value in line 59:

Current line 59:
Code: [Select]
$underbar_pseudonym =~ s/\./_/g;    # Change dots to underbars
Possible alternative:
Code: [Select]
$underbar_pseudonym =~ s/\.//g;    # Change dots to nothing
« Last Edit: August 06, 2014, 02:36:03 PM by mmccarn »

Offline Peasant

  • *
  • 143
  • +2/-0
Re: Changing default pseudonyms
« Reply #2 on: August 06, 2014, 03:20:41 PM »
OK, thanks. It's not major, as there are only half a dozen or so users to be set up.
Jim

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Changing default pseudonyms
« Reply #3 on: August 07, 2014, 02:35:38 AM »
Peasant

For 6 users it would have been quicker to add the pseudonyms manually than the time it took to write this post.
After all that's what the pseudonyms panel is for.
Remember you can also use domain style pseudonyms too
eg
name@domain1.com = user
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Peasant

  • *
  • 143
  • +2/-0
Re: Changing default pseudonyms
« Reply #4 on: August 07, 2014, 09:20:57 AM »
Peasant

For 6 users it would have been quicker to add the pseudonyms manually than the time it took to write this post.
After all that's what the pseudonyms panel is for.

That's fair enough. It was as much curiosity as anything else. Given that the system automagically creates some pseudonyms I just wondered if these were easily configurable or not :-)
Jim

Offline mmccarn

  • *
  • 2,628
  • +10/-0
Re: Changing default pseudonyms
« Reply #5 on: August 07, 2014, 12:52:38 PM »
...I just wondered if these were easily configurable or not :-)
Same here - I intermittently wish I could disable or change the default pseudonyms (but not strongly enough to create - and follow up on - a New Feature Request).

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Changing default pseudonyms
« Reply #6 on: August 07, 2014, 03:18:25 PM »
mmccarn

Quote
I intermittently wish I could disable or change the default pseudonyms (but not strongly enough to create - and follow up on - a New Feature Request).

IIRC there was something in these forums a long time ago, maybe Charlie Brady answered it.
It was not that simple to fix & maybe not that complicated either, I cannot exactly remember, maybe some custom templates or changing the skel files , a search would be needed to retrieve this info.

Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.