Koozali.org: home of the SME Server

Change default e-mail pseudonyms ?

Garfield

Change default e-mail pseudonyms ?
« on: August 15, 2004, 06:22:22 PM »
Hi,

I searched this site and the web but found no answer, so here it goes:

How can I change the default e-mail pseudonyms that are created for users ? For example, how can I configure SME so that it doesn't create the "firstname_lastname" pseudonym for every new user ?

I'm sure that it can be done, but how / where ?

matsk

Change default e-mail pseudonyms ?
« Reply #1 on: August 15, 2004, 08:03:28 PM »
You shuld modify the add user script or you can do it manually,
Code: [Select]
 /sbin/e-smith/signal-event pseudonym-delete firstname_lastname

/Mats

Garfield

Change default e-mail pseudonyms ?
« Reply #2 on: August 15, 2004, 08:07:10 PM »
Mats,

Thanks, but ...

1. Where is the adduser script ?
2. How do you know the command you provided ? I have seen more commands like that here in the forum, but where are they documented ?

matsk

Change default e-mail pseudonyms ?
« Reply #3 on: August 15, 2004, 09:13:35 PM »
Quote from: "Garfield"
1. Where is the adduser script ?

There is a system with templates that is the motor behind the server-manager, but my knowledge isn't that deep on this topic, I'm still searching and learning :-)
But you shouldn't edit the original, there is a way with "Custom templates" and thats the way to go.
Take a look at http://www.e-smith.org/architecture/

Quote from: "Garfield"
2. How do you know the command you provided ?

A search on www.google.com found the link:  http://www.e-smith.org/bugs/index.php3?op=showBug&bugID=34

Quote from: "Garfield"
I have seen more commands like that here in the forum, but where are they documented ?


Where are they documented? In the SME documentation, the old e-smith.org, here at contribs and inside the developers minds.


 :idea: I'm trying to add an extension to the user panel where you can have more info about the user like, mobile phone and VoIP telephone nr as well. But I have a bit to go on this....

Garfield

Change default e-mail pseudonyms ?
« Reply #4 on: August 16, 2004, 09:50:02 AM »
Hi,

Thanks for your answers but seeing the links you provided I think you slightly misunderstood me: I am not interested in removing an existing pseudonym. What I want to achieve is to change the default behaviour of the system such that it doesn't create a pseudonym like "firstname_lastname" at all. And I'm sure it must be in the custom templates somewhere, I know where they are (for other stuff), I have alreayd modified the Apache config somewhat using custom templates.

lee

Change default e-mail pseudonyms ?
« Reply #5 on: August 16, 2004, 08:19:46 PM »
I think it's buried in the depths of emsith's version of FormMagick.  There are some documentation from perldoc, i.e.

perldoc  esmith::FormMagick::Panel::useraccounts

FormMagick's create user account routine is called from the web panel and that inserts the pseudonyms so you'd have to change the code in the perl library (/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/useraccounts.pm) to stop it there.

The alternative is to add new action to the /etc/e-smith/events/user-create directory to automatically remove the pseudonyms that FormMagick has just created.

Neither way is particularly straightforward I'm afraid and both methods are likely to get broken whenever you upgrade sme.

Maybe someone smarter than me can think of a better way.

Lee.

bobk

Change default e-mail pseudonyms ?
« Reply #6 on: August 17, 2004, 02:40:36 AM »
You might want to read this thread http://forums.contribs.org/index.php?topic=18638.0

The default pseudonyms seem to be created by the 'create_user' and 'modify_user' routines of the user server-manager panel. The sub-routine that does this is $accountdb->create_user_auto_pseudonyms($acctName). The file with these routines is located at /usr/lib/perl5/esmith/FormMagick/Panel/useraccounts.pm.

There are also at least 2 routines that deal with creating the default pseudonyms if they do not already exist:

1 - /etc/e-smith/events/actions/update-user-pseudonyms
2 - /etc/e-smith/events/post-upgrade/S25update-user-pseudonyms

All of these routines would need to be modified to change the default pseudonyms.