[imp] How to create a hook for the default "From:" address?

Stoilis Giannis giannis at stoilis.gr
Wed Mar 26 10:43:30 PST 2003


Hello,
I am in the process of writing a guide for using IMP with an exchange server. I 
came across 2 problems:

Problem 1:
Becouse of complications regarding Active Directory username authentication, I 
would like help from someone what could guide me to the following task: how to 
create a hook that could set the default "From:" e-mail address  that I can 
retrieve from an LDAP source. For now, I have just tweeked IMP's code, so that 
after some regexps it transforms the the authenticated username to a valid e-
mail address for my exchange server.
I don't want users to set this field manually, becouse:
1) I just don't want users change their FROM address.
2) Even if I could trust users to set it manually, I doubt that they can do it 
corectly, without giving me a headache. I want something automated...

Problem 2:
In my company, we have an active directory forest of domains. This means what 
we have many subdomains for authentication, although all e-mail address are of 
the same format: "username at domain", no matter what subdomain they use for 
authentication.
Is there an easy way to use an extra field in the login page to allow users 
select the authentication domain, and the use it in the imp_get_vinfo hook? I 
tried to, but I got lost. For now, I just use a different imp installation for 
every active directory domain and use imp_get_vinfo to manually convert the 
username.

I have basic PHP knowledge and basic LDAP knowledge.

What would you suggest? Any help would be apprecieted...

Thank you in advance
- Stoilis Giannis
giannis at stoilis.gr


More information about the imp mailing list