HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   Email address, and not username, as default "From:" address (http://www.howtoforge.com/forums/showthread.php?t=13392)

ipslave 13th June 2007 16:41

Email address, and not username, as default "From:" address
 
I have one server running Horde as a webmail client frontend, and another server running ISPConfig. Both run Debian Etch installed using the perfect guide. System is configured to allow 'username@domain.name' logins.

Scenario;
Create a user named John Doe, with login 'domain.name_johnd' and email addresss 'john.doe@domain.name'.

Problem;
What I've found with this is that with Horde (and any other webmail client I set up on the server for that matter) the default From: field becomes 'johnd@domain.name' and not the email address specified when the account was created. This can be changed by the user, but is there a way to automate or default this process with ISPConfig?

I know that one could simply specify the username as domain.name_john.doe, but this means users having longer usernames to login with - which I am hoping to avoid...

till 13th June 2007 18:16

For example you can extend horde to read the correct email address from the ISPConfig database.

jnsc 13th June 2007 18:47

For this you have to create a hook (that's how horde call it). I did this for one of my server wich is running confixx, it's not very difficult if you have some php knowledge.

ipslave 13th June 2007 21:41

Quote:

Originally Posted by jnsc
For this you have to create a hook (that's how horde call it). I did this for one of my server wich is running confixx, it's not very difficult if you have some php knowledge.

Which I sadly am not :rolleyes:

I tried following http://www.howtoforge.org/forums/showthread.php?t=3748, but it still just showed the username format...

jnsc 14th June 2007 10:21

My hook looks very similar. I think your problem sound like you did not activate the hook.

did you set
Code:

'hook' => true,
in horde3/config/prefs.php?

ipslave 14th June 2007 18:05

Yup, below is the settings in prefs.php.
Code:

$_prefs['from_addr'] = array(
    'value' => '',
    'locked' => false,
    'shared' => true,
    'type' => 'text',
    'hook' => true,
    'desc' =>  _("Your From: address:")

If I set the following condition
Code:

    'locked' => true,
I get the below text in the from field when creating a new message, as apposed to a valid email address
Code:

SELECT user_email,domain_domain FROM (isp_isp_user INNER JOIN isp_dep ON (isp_isp_user.doc_id=child_doc_id AND isp_isp_user.doctype_id=child_doctype_id)) INNER JOIN isp_isp_domain ON (parent_doc_id=isp_isp_domain.doc_id AND parent_doctype_id=isp_isp_domain.doctype_id) WHERE user_username='johnd@domain.name' (Default Identity)
Wrong parameters in the SQL query?


All times are GMT +2. The time now is 08:52.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.