[imp] To: field

Lord Apollyon implist at paypc.com
Fri Aug 15 14:51:53 PDT 2003


> I would like to populate the "To" field with the full name of the
> correspondent, rather than with a blank.
> 
> I've been poking through horde/imp/config/*, but thus far haven't seen
> the stanza relevant to this.

Within horde/imp/config/conf.php, look for the following code:

$conf['hooks']['fullname'] = 'imp_set_fullname';

/* Here is an example imp_set_fullname function to set the fullname
 * from the GECOS information in the passwd file.
 */
if (!function_exists('imp_set_fullname')) {
    function imp_set_fullname ($imp) {
        $array = posix_getpwnam($imp['user']);
        $gecos_array = explode(',', $array['gecos']);
        return (empty($gecos_array) ? $imp['user'] : $gecos_array[0]);
    }
}

In stock IMP, it's commented out.  Remove the comments so it looks EXACTLY
like the above.  You may wish to clear out all SQL-based user_prefs after
you make this change, because I think when a user first uses IMP, it
establishes an initial default identity based on what it finds or doesn't
find from alternate sources, like GECOS information.

Incidentally, GECOS is the "Personal Name" field in the /etc/passwd file.

You can maintain your GECOS information for your users with the "chfn"
command - the mnemonic is "change finger name", referring to the fact that
in Ancient Times when UNIX systems ran remotely-accessible "finger" daemons,
that full personal name would be what gets returned.

=Apollyon=



More information about the imp mailing list