[sork] vacation alias handling

Karl J. Smalley Karl.J.Smalley at mail.jci.tju.edu
Tue Apr 27 14:55:53 PDT 2004


Quoting "Felipe W Damasio (Elipse Software)" <felipewd at elipse.com.br>:

To pre-load the alias field in vacation (the users always left it blank and
their vacation messages never worked), I did the follwing. Not sure, if this is
what you were looking for or not. You could probably also get the "return
address" from the identity and use that. The last name was good enough for me.


I changed this in vacation/templates/main.inc (actually this might be a bit off
from the original, but it should be close enough to figure out.):

begin quasi-original:

<?php echo ("Enter Last Name (this will ensure that messages sent to any E-Mail
address will get an auto-reply): "); ?>
<br />
<input name="alias" type="text" size="70">

end quasi-original:


to

begin changes:

<?php echo ("Enter Last Name (this will ensure that messages sent to any E-Mail
address will get an auto-reply): "); ?>
<br />

// Changes to default the alias since many of our e-mail addresses do not
// neccessarily correspond to our user accounts
//    include_once HORDE_BASE . '/lib/Identity.php';

        $identity = new Identity();
        $fullname = $identity->getValue('fullname');
        $fullname = trim(strrchr(trim($fullname),' '));
        if (empty($fullname)) {
                $fullname = substr($user,1);
        }
?>

<input name="alias" type="text" size="70" value ="
<?php echo $fullname ?>
">

end changes

If not include before you may need to uncomment the include above, I did not.

If a user has not updated their Identity record (and put in their real
lastname), it falls back to the their username - the first letter (in my case
most of our usernames are first initial and then lastname), so this will work.


Hadn't considered trying to his the alias file, but that migh be possible as
well.




> 	Hi,
> 
> 	I'm sure someone already asked this, but since I couldn't find on the 
> list archives, I'm posting it here.
> 
> 	Vacation isn't handling the user's aliases right. It only answers with 
> the message set by the user to the login username.
> 
> 	Isn't there a way the vacation can check the aliases.db file to look up 
> the users' aliases and built its own db using them?
> 
> 	FWIW, I'm using Vacation 2.2.1.
> 
> 	Thanks in advance for any pointers on this,
> 
> Felipe
> 
> -- 
> Sork mailing list - Join the hunt: http://horde.org/bounties/#sork
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: sork-unsubscribe at lists.horde.org
> 


-- 
----------------------------------------------------------------------------
Karl J. Smalley
Systems Analyst                             Snail Mail:
                                                Kimmel Cancer Center
Phone:  (215) 503-4602                          Thomas Jefferson University
FAX:    (215) 955-9093                          812 BLSB, 233 S. 10th St.
E-Mail: Karl.J.Smalley at mail.jci.tju.edu         Philadelphia, PA 19107
WWW:    http://www.jci.tju.edu/~karl

"Mate in 3" - The sweetest words I have ever heard myself utter.
*******  This is  a Chess Phrase and nothing more **********
----------------------------------------------------------------------------

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the sork mailing list