baza vmail wymaga szeregu zmian aby działała prawidłowo w bazie vmail należy :
mysql vvmail -p
CREATE TABLE IF NOT EXISTS log ( TIMESTAMP DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', username VARCHAR(255) NOT NULL DEFAULT '', domain VARCHAR(255) NOT NULL DEFAULT '', action VARCHAR(255) NOT NULL DEFAULT '', data VARCHAR(255) NOT NULL DEFAULT '', KEY TIMESTAMP (TIMESTAMP) ) ENGINE=MyISAM; CREATE TABLE IF NOT EXISTS vacation ( email VARCHAR(255) NOT NULL DEFAULT '', subject VARCHAR(255) NOT NULL DEFAULT '', body TEXT NOT NULL, cache TEXT NOT NULL, domain VARCHAR(255) NOT NULL DEFAULT '', created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', modified DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', active TINYINT(4) NOT NULL DEFAULT '1', PRIMARY KEY (email), KEY email (email) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; CREATE TABLE IF NOT EXISTS vacation_notification ( on_vacation VARCHAR(255) NOT NULL, notified VARCHAR(255) NOT NULL, notified_at TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT vacation_notification_pkey PRIMARY KEY(on_vacation, notified), FOREIGN KEY (on_vacation) REFERENCES vacation(email) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Oraz aby prawidłowo działał login admina :
INSERT INTO admin (username,password) values ((select username from mailbox),(select password from mailbox));
Ściągamu i rozpakowujemy postfixadmina, tworzymy plik config.local.php w pliku edytujemy hasło do bazy wyciągnięte z config iRedmaila oraz ewentualnie postfix_admin_url jeśli używamy innego
<?php // Basic configuration. $CONF['configured'] = true; $CONF['postfix_admin_url'] = "/postfixadmin"; $CONF['default_language'] = "en"; $CONF['database_type'] = "mysqli"; $CONF['database_host'] = "localhost"; $CONF['database_user'] = "vmailadmin"; $CONF['database_password'] = "SoElbUfarkAAzYXQVHNbNkaE9h5oY4"; # <- REPLACE THIS PASSWORD. $CONF['database_name'] = "vmail"; $CONF['smtp_server'] = "127.0.0.1"; $CONF['domain_path'] = "YES"; $CONF['domain_in_mailbox'] = "NO"; $CONF['quota'] = "YES"; $CONF['quota_multiplier'] = 1; $CONF['transport'] = "YES"; $CONF['transport_options'] = array ('dovecot', 'virtual', 'local', 'relay'); $CONF['transport_default'] = "dovecot"; // Enable alias domain. $CONF['alias_domain'] = 'YES'; // Disable features we don't have. $CONF['backup'] = "NO"; $CONF['fetchmail'] = "NO"; $CONF['sendmail'] = "NO"; $CONF['show_footer_text'] = "NO"; $CONF['emailcheck_resolve_domain'] = "NO"; // Disable PostfixAdmin style vacation. We use managesieve service instead. $CONF['vacation_control'] = "NO"; $CONF['vacation_control_admin'] = "NO"; $CONF['admin_email'] = "www@example.com"; // Dostosowanie do struktury bazy iredmail $CONF['database_tables'] = array ( 'admin' => 'admin', 'alias' => 'alias', 'alias_domain' => 'alias_domain', 'config' => 'config', 'domain' => 'domain', 'domain_admins' => 'domain_admins', 'fetchmail' => 'fetchmail', 'log' => 'log', 'mailbox' => 'mailbox', 'vacation' => 'vacation', 'vacation_notification' => 'vacation_notification', 'quota' => 'used_quota', 'quota2' => 'mailbox', ); ?>
Postfixadmin 2.9 wymaga dodatkowo:
ALTER TABLE admin ADD superadmin BOOLEAN AFTER password; UPDATE `vmail`.`admin` SET `superadmin` = '0' WHERE `admin`.`username` = 'postmaster@domena.pl';