Koozali.org: home of the SME Server

Vacation and pseudonyms

Veli-Matti Jokela

Vacation and pseudonyms
« on: April 15, 2003, 06:15:25 PM »
I know someone had posted this same problem before but there was no solution as far as I know. I installed user panel on my SME 5.6, vacation message works fine when message is sent to username@mycompany.com. But if the message was sent to firstname.lastname@mycompany.com, no vacation message goes back to the sender. Is there anyway to make it work with pseudonyms ?

Robert L. Baer

Re: Vacation and pseudonyms
« Reply #1 on: April 16, 2003, 02:44:05 PM »
You need  to create a ~/.vacation.aliases which contains the pseudonyms  you want  replies sent to.

firstname.lastname@mycompany.com
firstname_lastname@mycompany.com
etc

More comfortable is to edit  /etc/e-smith/web/functions/uservacations

Find the sub
sub performModifyVacation ($)
which is right at the end and paste the following code after this section

open (VACATION, ">/home/e-smith/files/users/$acctName/.vacation.msg")
        or die ("Error opening vacation message.\n");

    print VACATION "$vacationText\n";
    close VACATION;

code to add:

    my $alias1= db_get_prop(\%accounts, $acctName, 'FirstName') . "." . db_get_prop(\%accounts, $acctName, 'LastName');
    my $alias2= db_get_prop(\%accounts, $acctName, 'FirstName') . "_" . db_get_prop(\%accounts, $acctName, 'LastName');

    open (ALIASES, ">/home/e-smith/files/users/$acctName/.vacation.aliases")
        or die "Error: Could not open file: /home/e-smith/files/users/$acctName/.vacation.aliases\n";
    print ALIASES "$alias1\@$conf{'DomainName'}\n";
    print ALIASES "$alias2\@$conf{'DomainName'}\n";
    close ALIASES;

Veli-Matti Jokela

Re: Vacation and pseudonyms
« Reply #2 on: April 16, 2003, 11:00:34 PM »
Thanks ! I did what you told and now it works just as I wanted !!! Great software, amazing support, I'm out of words.

Cyrus Bharda

Re: Vacation and pseudonyms
« Reply #3 on: April 17, 2003, 03:05:17 AM »
Robert,

Should the file that is to be edited (/etc/e-smith/web/functions/uservacations) be templated or is it safe to just edit that file.

Thanks,

Cyrus Bharda