Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: Kirk Ferguson on November 15, 2002, 02:58:38 AM

Title: automatic mail to new users
Post by: Kirk Ferguson on November 15, 2002, 02:58:38 AM
Hello.  I'm running two SME servers, one 5.5 and one tester on 5.6B7.  I would like to have a pre-formatted welcome e-mail message sent to new users as they are created.  I have written a Perl script which will send the message to a particular user succesfully, and have tried to patch that in to the /web/functions/useraccounts script.  Has anyone done this on SME?

I'm new to SME, and am wondering if I'm on the right track...

TIA for any suggestions,

Kirk
Title: Re: automatic mail to new users
Post by: Cyrus Bharda on November 15, 2002, 03:17:30 AM
would this help out at all:

http://www.e-smith.org/contrib/rpm-index/RPM-e-smith-userwelcome-0.1-1.i386.html

??

Cyrus Bharda
Title: Re: automatic mail to new users
Post by: Kirk Ferguson on November 15, 2002, 04:05:55 AM
Yes, I suspect that this would help, but I can't find any docs about it.  I had installed the rpm earlier, without problems, but can't see what it did.  Thanks for the reply.

Kirk
Title: Re: automatic mail to new users
Post by: Cyrus Bharda on November 15, 2002, 08:49:37 AM
Sorry I havent played around with that rpm either, never have, but try emailing the author for help?

Cyrus Bharda
Title: Re: automatic mail to new users
Post by: Bill Talcott on November 15, 2002, 09:57:21 PM
I just installed it. If a "templates/user.welcome" file exists in a "sysadmin" i-bay, it will use that (easier to update I guess?) for the email. If not, it will use the message embedded in "/etc/e-smith/events/user-create/S45create-user-welcome". I don't know how the template needs to be formatted or anything (lack of docs like you mentioned), so I just edited the S45create-user-welcome file...
Title: Re: automatic mail to new users
Post by: Bill Talcott on November 15, 2002, 10:37:34 PM
Bill Talcott wrote:
>
> I just installed it. If a "templates/user.welcome" file
> exists in a "sysadmin" i-bay, it will use that (easier to
> update I guess?) for the email. If not, it will use the
> message embedded in
> "/etc/e-smith/events/user-create/S45create-user-welcome". I
> don't know how the template needs to be formatted or anything
> (lack of docs like you mentioned), so I just edited the
> S45create-user-welcome file...

Also, my 5.0U6 system gave an error when I created the user. In the user-create script, there is an "S50email-assign". I renamed S45create-user-welcome to S55create-user-welcome, so it would come after the email-assign. That seems to have fixed it...
Title: Re: automatic mail to new users
Post by: Charlie Brady on November 15, 2002, 10:48:41 PM
Bill Talcott wrote:

> Also, my 5.0U6 system gave an error when I created the user.
> In the user-create script, there is an "S50email-assign". I
> renamed S45create-user-welcome to S55create-user-welcome, so
> it would come after the email-assign. That seems to have
> fixed it...

Be sure to send your bug report and the proposed fix to the author of the contrib!

Regards

Charlie
Title: Re: automatic mail to new users
Post by: Bill Talcott on November 15, 2002, 11:08:05 PM
Bill Talcott wrote:
>
> Also, my 5.0U6 system gave an error when I created the user.
> In the user-create script, there is an "S50email-assign". I
> renamed S45create-user-welcome to S55create-user-welcome, so
> it would come after the email-assign. That seems to have
> fixed it...
Doh, I guess it didn't fix it.  Hmmmm, it worked once, but not every time...

One more thing. The variable names in the script seem to have changed or something. It shows the email as being from SME@.MISSING-HOST-NAME., and doesn't insert the email address in the end of the email.

Looks like this RPM could use an update by someone who knows what they're doing. This might even be a handy addon panel...
Title: Re: automatic mail to new users
Post by: raymondh on December 31, 2002, 09:34:43 AM
Has anyone looked at updating this rpm.  I would but I lack the skills.
Title: Re: automatic mail to new users
Post by: Kirk Ferguson on January 14, 2003, 12:18:04 AM
I've tried this rpm again on a 5.6 beta 7 system, and found that it works perfectly.  The errors during install are gone, as are the strange addresses in the message.