Fresh Installation of EHCP 0.29.08 on Ubuntu 8.10

installed a fresh system with the latest version of EHCP.
>created a domain with FTP and email addresses.
Tested Webmail > ERROR:
ERROR: Connection dropped by IMAP server.
Tested Mail client (evolution) Bad Authentication SMTP/POP

> tail snapshot http://pastebin.ca/1414973
> tail snapshot after unsuccessful login into IMAP http://pastebin.ca/1414974

went through the forums here, still couldn't find a fix for it.

Your problem is "table lookup problem"
Access denied for user 'ehcp'@'localhost' (using password: NO)
"Caused by a bug of ehcp, which is solved in upcoming new version"

Solution:
Way 1:
edit your following files with right ehcp mysql user pass, avoid multiple same configuration lines:
/etc/postfix/mysql-virtual_domains.cf
/etc/postfix/mysql-virtual_forwardings.cf
/etc/postfix/mysql-virtual_mailboxes.cf
/etc/postfix/mysql-virtual_email2email.cf
/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
/etc/pam.d/smtp
/etc/courier/authmysqlrc

Way2: (I hope easier way)
I just fixed a few new bugs in ehcp with version 0.29.09, which i just released now,
download it from www.ehcp.net/download
then, replace classapp.php in ehcp dir,
then, go to ehcp gui, options, fix mail configuration,

This is a very new version and may contain new other bugs (I hope not), not tested yet, i will try to fix if any other bugs appear..

i took the upgrade path, and finally everything is working great.
really appreciate it!

because I can not log in to the webmail client and in the mail.err is written the following many times:

Aug 16 19:44:47 v231531278 postfix/trivial-rewrite[32651]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
Aug 16 19:45:48 v231531278 postfix/trivial-rewrite[616]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem

BUT I am using EHCP 0.29.09 and looked at the configuration files listed above and in every file is listed the correct password.

try this:
go to ehcp gui, options-> fix mail config.

if those does not help,
try downloading and installing newer version of 0.29.10 from www.ehcp.net/ehcp_yeni.tgz

the first thing: "go to ehcp gui, options-> fix mail config." I already tried without any changes.

the second thing: I downloaded the mentioned version, unpacked it and typed in "/etc/init.d/ehcp restart" after this I fixed again mail config through the ehcp gui. But there are no changes for the already created email accounts and new email accounts. And on the left bottom in the ehcp gui I still find the version number 0.29.09

Did I do something wrong?

  • if you see version number as 0.29.09, then, you did not upgrade your ehcp. put contents of new package onto /var/www/vhosts/ehcp folder, except file config.php (that contain your passes.. otherwise your ehcp will not work)
  • after upgrading to 0.29.10 or later, you need to do ehcp restart.. (you did, just a not for others..)
  • try on command line: adduser postfix sasl , then retest emails,
  • In fact, if you have a few domains, I suggest a fresh install from scratch, including ubuntu and ehcp 0.29.10, that may clean things up... if this is possible..
  • I installed Ubuntu 8.04 and ehcp 0.29.10 (xp5-z7 mod) completely new, but I still can not login to the webmail client, with the created user.

    The user is created in the ehcp databse with the right password.

    In the var/log/syslog I can found the following lines:

    Aug 18 14:31:05 v231531278 postfix/pickup[19519]: 20D9C162E956: uid=0 from=root (deleted <> to get this shown up)
    Aug 18 14:31:05 v231531278 postfix/cleanup[20034]: 20D9C162E956: message-id=<20090818143105.20D9C162E956@v231531278.yourvserver.net>
    Aug 18 14:31:05 v231531278 postfix/cleanup[20034]: warning: 20D9C162E956: virtual_alias_maps map lookup problem for ehcpdeveloper@gmail.com
    Aug 18 14:31:05 v231531278 postfix/pickup[19519]: 22979162E956: uid=33 from=www-data (deleted <> to get this shown up)

    and also

    Aug 18 14:32:43 v231531278 postfix/proxymap[21204]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ehcp'@'v231531278.yourvserver.net' (using password: YES)

    but everything I set up is written in the DB.

    Where can I found the mailbox for the created mail address?
    In home/vmail I cannot find any subfolder:
    root@v231531278:/home/vmail# ls -a
    . .. .bash_logout .bashrc .profile

  • normally, you should see some dirs and files in /home/vmail, if you cannot, appearently your postfix was not able to send email to local users, and those files are not set up... those files normally are automatically set up while you add a new user, by sending them an initial welcome email....
  • postfix/proxymap[21204]: warning: connect to mysql server 127.0.0.1: Access denied for user 'ehcp'@'v231531278.yourvserver.net' (using password: YES): I think, this is your basic problem... the cause of above item is also related to this. Your postfix map config files are broken somehow..... Check files in http://ehcp.net/?q=node/92 You should see same ehcp pass on all those files.. if not same pass, make them same... after fixing, restart postfix... If you fix those, above item also will disappear... after fixing, delete/re-setup same email. watch log files too, for debugging... you should not see similar errors on logs..
  • Did you install ubuntu from scratch? from begining ? did you install ehcp only once on this new system ? or did you try a few installs ? I ask these questions to debug the case, I wonder if postifx map config files have multiple config lines of same type ..:S
  • One last note: email things are most difficult problems of a server operation, related to others.. so, dont loose your hope... :) these are almost normal things...
  • 1. I double checked these files again and there is always written the right passwd in it. Should I try it with replacing 127.0.0.1 to my real IP? As I can remember right this solved a problem with another control panel.

    2. I try to install this on a VServer, so I used te Image I did get from my ISP. I installed the image and ehcp two times (029.09 and 0.29.10) but there is always the same problem with the email users.

    3. I do not want to give up, I really felt in love with this fast and easy installation. And even with other control panels where I needed many hours to install it, I always have problems with anything after the installation (mostly MySQL problems :)

    Really nice Control Panel! I think this is going to be one of the best in the future. Easy, light and fast! That is exactly what I want!

    Here are my files on a real production system:

    root@ehcp:~# more /etc/postfix/mysql-virtual_domains.cf

    user = ehcp
    password = xxxxx
    dbname = ehcp
    table = domains
    select_field = 'virtual'
    where_field = domainname
    hosts = 127.0.0.1

    root@ehcp:~# more /etc/postfix/mysql-virtual_forwardings.cf

    user = ehcp
    password = xxxxx
    dbname = ehcp
    table = forwardings
    select_field = destination
    where_field = source
    hosts = 127.0.0.1

    root@ehcp:~#
    root@ehcp:~# more /etc/postfix/mysql-virtual_mailboxes.cf

    user = ehcp
    password = xxxxx
    dbname = ehcp
    table = emailusers
    select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    where_field = email
    hosts = 127.0.0.1

    root@ehcp:~#
    root@ehcp:~# /etc/postfix/mysql-virtual_email2email.cf
    -bash: /etc/postfix/mysql-virtual_email2email.cf: Permission denied
    root@ehcp:~# cat /etc/postfix/mysql-virtual_email2email.cf

    user = ehcp
    password = xxxxx
    dbname = ehcp
    table = emailusers
    select_field = email
    where_field = email
    hosts = 127.0.0.1

    root@ehcp:~# /etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    -bash: /etc/postfix/mysql-virtual_mailbox_limit_maps.cf: Permission denied
    root@ehcp:~# cat /etc/postfix/mysql-virtual_mailbox_limit_maps.cf

    user = ehcp
    password = xxxxx
    dbname = ehcp
    table = emailusers
    select_field = quota
    where_field = email
    hosts = 127.0.0.1

    root@ehcp:~# cat /etc/pam.d/smtp
    auth required pam_mysql.so user=ehcp passwd=xxxxx host=127.0.0.1 db=ehcp table=emailusers usercolumn=email passwdcolumn=password crypt=1
    account sufficient pam_mysql.so user=ehcp passwd=xxxxx host=127.0.0.1 db=ehcp table=emailusers usercolumn=email passwdcolumn=password crypt=1
    root@ehcp:~#
    root@ehcp:~# cat /etc/courier/authmysqlrc

    MYSQL_SERVER localhost
    MYSQL_USERNAME ehcp
    MYSQL_PASSWORD xxxxx
    MYSQL_PORT 0
    MYSQL_DATABASE ehcp
    MYSQL_USER_TABLE emailusers
    MYSQL_CRYPT_PWFIELD password
    #MYSQL_CLEAR_PWFIELD password
    MYSQL_UID_FIELD 5000
    MYSQL_GID_FIELD 5000
    MYSQL_LOGIN_FIELD email
    MYSQL_HOME_FIELD "/home/vmail"
    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    #MYSQL_NAME_FIELD
    MYSQL_QUOTA_FIELD quota

    root@ehcp:~#
    root@ehcp:~# cat /etc/pam.d/vsftpd

    auth required pam_mysql.so user=ehcp passwd=xxxxx host=localhost db=ehcp table=ftpaccounts usercolumn=ftpusername passwdcolumn=password crypt=2
    account required pam_mysql.so user=ehcp passwd=xxxxx host=localhost db=ehcp table=ftpaccounts usercolumn=ftpusername passwdcolumn=password crypt=2

    root@ehcp:~#