Email address, and not username, as default "From:" address

Discussion in 'General' started by ipslave, Jun 13, 2007.

  1. ipslave

    ipslave New Member

    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 '[email protected]' logins.

    Scenario;
    Create a user named John Doe, with login 'domain.name_johnd' and email addresss '[email protected]'.

    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 '[email protected]' 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...
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

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

    jnsc rotaredoM Moderator

    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.
     
  4. ipslave

    ipslave New Member

    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...
     
  5. jnsc

    jnsc rotaredoM Moderator

    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?
     
  6. ipslave

    ipslave New Member

    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='[email protected]' (Default Identity) 
    Wrong parameters in the SQL query?
     

Share This Page