Вы здесь

Сообщение об ошибке

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls в функции menu_set_active_trail() (строка 2405 в файле /home/www/kwlsoft-ru/www/includes/menu.inc).

Установка postfixadmin

1. Скачиваем архив postfixadmin

2. Распаковываем в папку

3. Создаем новую базу данных postfix

4. Выполняем скрипт формирующий структуру базы:

SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;


– База данных: `postfix`

– ——————————————————–


– Структура таблицы `admin`

CREATE TABLE IF NOT EXISTS `admin` (
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`modified` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`active` tinyint(1) NOT NULL DEFAULT ’1′,
PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Virtual Admins’;

– ——————————————————–


– Структура таблицы `alias`

CREATE TABLE IF NOT EXISTS `alias` (
`address` varchar(255) NOT NULL,
`goto` text NOT NULL,
`domain` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`modified` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`active` tinyint(1) NOT NULL DEFAULT ’1′,
PRIMARY KEY (`address`),
KEY `domain` (`domain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Virtual Aliases’;

– ——————————————————–


– Структура таблицы `alias_domain`

CREATE TABLE IF NOT EXISTS `alias_domain` (
`alias_domain` varchar(255) NOT NULL,
`target_domain` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`modified` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`active` tinyint(1) NOT NULL DEFAULT ’1′,
PRIMARY KEY (`alias_domain`),
KEY `active` (`active`),
KEY `target_domain` (`target_domain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Domain Aliases’;

– ——————————————————–


– Структура таблицы `config`

CREATE TABLE IF NOT EXISTS `config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) CHARACTER SET latin1 NOT NULL DEFAULT ”,
`value` varchar(20) CHARACTER SET latin1 NOT NULL DEFAULT ”,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT=’PostfixAdmin settings’ AUTO_INCREMENT=2 ;

– ——————————————————–


– Структура таблицы `domain`

CREATE TABLE IF NOT EXISTS `domain` (
`domain` varchar(255) NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
`aliases` int(10) NOT NULL DEFAULT ’0′,
`mailboxes` int(10) NOT NULL DEFAULT ’0′,
`maxquota` bigint(20) NOT NULL DEFAULT ’0′,
`quota` bigint(20) NOT NULL DEFAULT ’0′,
`transport` varchar(255) NOT NULL,
`backupmx` tinyint(1) NOT NULL DEFAULT ’0′,
`created` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`modified` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`active` tinyint(1) NOT NULL DEFAULT ’1′,
PRIMARY KEY (`domain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Virtual Domains’;

– ——————————————————–


– Структура таблицы `domain_admins`

CREATE TABLE IF NOT EXISTS `domain_admins` (
`username` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`active` tinyint(1) NOT NULL DEFAULT ’1′,
KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Domain Admins’;

– ——————————————————–


– Структура таблицы `fetchmail`

CREATE TABLE IF NOT EXISTS `fetchmail` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`mailbox` varchar(255) NOT NULL,
`src_server` varchar(255) NOT NULL,
`src_auth` enum(‘password’,'kerberos_v5′,’kerberos’,'kerberos_v4′,’gssapi’,'cram-md5′,’otp’,'ntlm’,'msn’,'ssh’,'any’) CHARACTER SET utf8 DEFAULT NULL,
`src_user` varchar(255) NOT NULL,
`src_password` varchar(255) NOT NULL,
`src_folder` varchar(255) NOT NULL,
`poll_time` int(11) unsigned NOT NULL DEFAULT ’10′,
`fetchall` tinyint(1) unsigned NOT NULL DEFAULT ’0′,
`keep` tinyint(1) unsigned NOT NULL DEFAULT ’0′,
`protocol` enum(‘POP3′,’IMAP’,'POP2′,’ETRN’,'AUTO’) CHARACTER SET utf8 DEFAULT NULL,
`usessl` tinyint(1) unsigned NOT NULL DEFAULT ’0′,
`extra_options` text,
`returned_text` text,
`mda` varchar(255) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

– ——————————————————–


– Структура таблицы `log`

CREATE TABLE IF NOT EXISTS `log` (
`timestamp` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`username` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
`action` varchar(255) NOT NULL,
`data` text NOT NULL,
KEY `timestamp` (`timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Log’;

– ——————————————————–


– Структура таблицы `mailbox`

CREATE TABLE IF NOT EXISTS `mailbox` (
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(255) CHARACTER SET utf8 NOT NULL,
`maildir` varchar(255) NOT NULL,
`quota` bigint(20) NOT NULL DEFAULT ’0′,
`local_part` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`modified` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`active` tinyint(1) NOT NULL DEFAULT ’1′,
PRIMARY KEY (`username`),
KEY `domain` (`domain`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Virtual Mailboxes’;

– ——————————————————–


– Структура таблицы `quota`

CREATE TABLE IF NOT EXISTS `quota` (
`username` varchar(255) CHARACTER SET latin1 NOT NULL,
`path` varchar(100) CHARACTER SET latin1 NOT NULL,
`current` bigint(20) DEFAULT NULL,
PRIMARY KEY (`username`,`path`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

– ——————————————————–


– Структура таблицы `quota2`

CREATE TABLE IF NOT EXISTS `quota2` (
`username` varchar(100) CHARACTER SET latin1 NOT NULL,
`bytes` bigint(20) NOT NULL DEFAULT ’0′,
`messages` int(11) NOT NULL DEFAULT ’0′,
PRIMARY KEY (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

– ——————————————————–


– Структура таблицы `vacation`

CREATE TABLE IF NOT EXISTS `vacation` (
`email` varchar(255) NOT NULL,
`subject` varchar(255) CHARACTER SET utf8 NOT NULL,
`body` text CHARACTER SET utf8 NOT NULL,
`cache` text NOT NULL,
`domain` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT ’0000-00-00 00:00:00′,
`active` tinyint(1) NOT NULL DEFAULT ’1′,
PRIMARY KEY (`email`),
KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT=’Postfix Admin – Virtual Vacation’;

– ——————————————————–


– Структура таблицы `vacation_notification`

CREATE TABLE IF NOT EXISTS `vacation_notification` (
`on_vacation` varchar(255) CHARACTER SET latin1 NOT NULL,
`notified` varchar(255) NOT NULL,
`notified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`on_vacation`,`notified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT=’Postfix Admin – Virtual Vacation Notifications’;


– Ограничения внешнего ключа сохраненных таблиц


– Ограничения внешнего ключа таблицы `vacation_notification`

ALTER TABLE `vacation_notification`
ADD CONSTRAINT `vacation_notification_pkey` FOREIGN KEY (`on_vacation`) REFERENCES `vacation` (`email`) ON DELETE CASCADE;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;