Wednesday, February 11, 2009

krishna on dell t100 setup continues

  1. automysqlbackup.sh script from krishna used to backup and restore mysql databases. It gives two ways to restore:
    # mysql --user=username --pass=password --host=dbserver database < /path/file.sql 
    # or
    # mysql --user=username --pass=password --host=dbserver -e "source /path/file.sql" database
    The latter method fails with ERROR 1064 (42000) at line 1: Luckily the former method works, tho' while importing SI db, it gave an error ERROR 1298 (HY000) at line 2410: Unknown or incorrect time zone: 'NULL' the db seems to be working. After the database import, phplist said database needs to be upgraded. As given in the docs, went to Main Page -> System Functions -> upgrade and it took less than a second.
  2. Next, the php files were being served as MIME type application/x-trash. Not sure what exactly was wrong, but now it is working after
    (a) DirectoryIndex index.php index.html added to /etc/apache2/apache2.conf
    (b) index.html.old moved to another directory.
    (c) Subscription page configured properly.
  3. Commandline php had to be installed, with apt-get install php5-cli as given at ubuntuforums.org
  4. getmail downloaded from http://pyropus.ca/software/getmail/ and extracted from tar.gz.
  5. apachemails added to webserver's group with
    useradd -G {group-name} username
    as given here. Listed users and groups seeing /etc/group,
    ps -eo euser,ruser,suser,fuser,f,comm,label
    showed that apache was being run as www-data so did
    chown apachemails:www-data apachebounces
  6. Later found (after many attempts, testing pop with and without notls option) that this version of phplist (2.10.9) would not read arbitrary files as mbox files (like the earlier 2.10.5 on the older krishna could!) .
    Cannot open mailbox file Can't open mailbox /var/www/bounces/apachebounces: no such mailbox
    So had to change mbox location to /var/mail/username for a valid username.
  7. Before that, sendemaillib edited as given in PB's earlier post. Since I copied the scripts from the old krishna, did not have any user problems with running the scripts.
  8. Running processbounces gave
    Error: IMAP is not included in your PHP installation, cannot continue 
    Installed imap module with apt-get install php5-imap
  9. Now to lock up the system using the techniques given here, but passwd -l causes the message
    Your account has expired; please contact your system administrator
    probably due to this bug. So, did the editing of /etc/ftpusers and /etc/ssh/sshd_config instead.

No comments:

Post a Comment