instalace courier-imap a squirrelmail



1) COURIER-IMAP

apt-get install courier-imap-ssl courier-pop courier-pop-ssl courier-authlib-mysql
nastavit:

etc/courier/authdaemonrc authmodulelist="authmysql"
etc/courier/authmysqlrc
MYSQL_SERVER            localhost
MYSQL_USERNAME myusername
MYSQL_PASSWORD mypassword
MYSQL_DATABASE myimapdb
MYSQL_USER_TABLE passwd
MYSQL_CRYPT_PWFIELD crypt
MYSQL_UID_FIELD ... atd ...

/etc/init.d/courier-authdaemon restart

databaze pro mysql autorizaci

CREATE TABLE ´passwd´ (
´id´ char(128) collate utf8_czech_ci NOT NULL default '',
´crypt´ char(128) collate utf8_czech_ci NOT NULL default '',
´clear´ char(128) collate utf8_czech_ci NOT NULL default '',
´name´ char(128) collate utf8_czech_ci NOT NULL default '',
´uid´ int(10) unsigned NOT NULL default '65534',
´gid´ int(10) unsigned NOT NULL default '65534',
´home´ char(255) collate utf8_czech_ci NOT NULL default '',
´maildir´ char(255) collate utf8_czech_ci NOT NULL default '',
´defaultdelivery´ char(255) collate utf8_czech_ci NOT NULL default '',
´quota´ char(255) collate utf8_czech_ci NOT NULL default '',
KEY ´id´ (´id´)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;


3) SQUIRRELMAIL

apt-get install squirrelmail
/usr/sbin/squirrelmail-configure

otestovat instalaci:
http://webmail.example.com/src/configtest.php

je třeba vygenerovat locales pro iso-8859-2 jinak SM nemluví česky!

dpkg-reconfigure locales
/etc/init.d/apache2 reload

tabulky pro uživatelská data:

CREATE TABLE ´address´ (
´owner´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´nickname´ varchar(16) collate utf8_czech_ci NOT NULL default '',
´firstname´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´lastname´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´email´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´label´ varchar(255) collate utf8_czech_ci default NULL,
PRIMARY KEY (´owner´,´nickname´),
KEY ´firstname´ (´firstname´,´lastname´)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;


CREATE TABLE ´address_global´ (
´owner´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´nickname´ varchar(16) collate utf8_czech_ci NOT NULL default '',
´firstname´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´lastname´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´email´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´label´ varchar(255) collate utf8_czech_ci default NULL,
PRIMARY KEY (´owner´,´nickname´),
KEY ´firstname´ (´firstname´,´lastname´)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;


CREATE TABLE ´userprefs´ (
´user´ varchar(128) collate utf8_czech_ci NOT NULL default '',
´prefkey´ varchar(64) collate utf8_czech_ci NOT NULL default '',
´prefval´ blob NOT NULL,
PRIMARY KEY (´user´,´prefkey´)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;


a nastavit v SM config.php DSN a nazvy tabulek - napr:

$addrbook_dsn = 'mysql://webmaildbuser:webmaildbpass@localhost/webmail';
$addrbook_table = 'address';

$addrbook_dsn = 'mysql://webmaildbuser:webmaildbpass@localhost/webmail';
$prefs_table = 'userprefs';
$prefs_user_field = 'user';
$prefs_key_field = 'prefkey';
$prefs_val_field = 'prefval';
$addrbook_dsn = 'mysql://webmaildbuser:webmaildbpass@localhost/webmail';
$addrbook_global_table = 'address_global';
$addrbook_global_writeable = false;
$addrbook_global_listing = false;

Last update:
2007-05-23 10:27
Author:
Daniel
Revision:
1.4
Average rating: 3 (1 Vote)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.