Outils personnels

Discussion:Install Mailany sur Debian

De wikiGite

Révision datée du 30 octobre 2008 à 15:23 par Frank (discussion | contributions)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

USE postfix; CREATE TABLE admin (

 username varchar(255) NOT NULL default ,
 password 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(1) NOT NULL default '1',
 PRIMARY KEY  (username)

) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Admins';

  1. Table structure for table alias

CREATE TABLE alias (

 address varchar(255) NOT NULL default ,
 goto 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(1) NOT NULL default '1',
 PRIMARY KEY  (address)

) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Aliases';

  1. Table structure for table `alias_domain`

CREATE TABLE alias_domain (

 alias_domain varchar(255) NOT NULL default ,
 target_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(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';

  1. Table structure for table domain

CREATE TABLE domain (

 domain varchar(255) NOT NULL default ,
 description varchar(255) character set utf8 collate utf8_unicode_ci 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) default 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)

) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Domains';

  1. Table structure for table domain_admins

CREATE TABLE domain_admins (

 username varchar(255) NOT NULL default ,
 domain varchar(255) NOT NULL default ,
 created datetime NOT NULL default '0000-00-00 00:00:00',
 active tinyint(1) NOT NULL default '1',
 KEY username (username)

) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Domain Admins';

  1. Table structure for table `fetchmail`

CREATE TABLE fetchmail (

 id int(11) unsigned NOT NULL auto_increment,
 mailbox varchar(255) NOT NULL default ,
 src_server varchar(255) NOT NULL default ,
 src_auth enum('password','kerberos_v5','kerberos','kerberos_v4','gssapi','cram-md5','otp','ntlm','msn','ssh','any') default NULL,
 src_user varchar(255) NOT NULL default ,
 src_password varchar(255) NOT NULL default ,
 src_folder varchar(255) NOT NULL default ,
 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') default NULL,
 extra_options text,
 returned_text text,
 mda varchar(255) NOT NULL default ,
 date timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
 PRIMARY KEY  (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

  1. Table structure for table log

CREATE TABLE 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)

) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Log';

  1. Table structure for table mailbox

CREATE TABLE mailbox (

 username varchar(255) NOT NULL default ,
 password varchar(255) NOT NULL default ,
 name varchar(255) character set utf8 collate utf8_unicode_ci NOT NULL,
 maildir varchar(255) NOT NULL default ,
 quota bigint(20) NOT NULL default '0',
 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(1) NOT NULL default '1',
 PRIMARY KEY  (username)

) TYPE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Mailboxes';

  1. Table structure for table vacation

CREATE TABLE vacation (

 email varchar(255) NOT NULL default ,
 subject varchar(255) character set utf8 collate utf8_unicode_ci NOT NULL,
 body text character set utf8 collate utf8_unicode_ci 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';

  1. vacation_notification table

CREATE TABLE vacation_notification (

   on_vacation varchar(255) NOT NULL, 
   notified varchar(255) NOT NULL, 
   notified_at timestamp NOT NULL default CURRENT_TIMESTAMP, 
   PRIMARY KEY  (on_vacation,notified)

) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Postfix Admin - Virtual Vacation Notifications'; ALTER TABLE vacation_notification

 ADD CONSTRAINT vacation_notification_pkey FOREIGN KEY (on_vacation) REFERENCES vacation (email) ON DELETE CASCADE;
  1. config table

CREATE TABLE config (

 id int(11) NOT NULL auto_increment,
 name varchar(20) NOT NULL default ,
 value varchar(20) NOT NULL default ,
 PRIMARY KEY  (id),
 UNIQUE KEY name (name)

) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='PostfixAdmin settings' AUTO_INCREMENT=2 ;

INSERT INTO domain (domain,description) VALUES ('toto.com','Domaine toto.com'); INSERT INTO alias (address,goto,domain) VALUES ('user@toto.com', 'user@toto.com','toto.com'); INSERT INTO alias (address,goto,domain) VALUES ('admin@toto.com', 'admin@toto.com','toto.com'); INSERT INTO alias (address,goto,domain) VALUES ('alias@toto.com', 'user@toto.com','toto.com'); INSERT INTO alias (address,goto,domain) VALUES ('root@toto.com', 'admin@toto.com','toto.com'); INSERT INTO alias (address,goto,domain) VALUES ('postmaster@toto.com', 'admin@toto.com','toto.com'); INSERT INTO mailbox (username,password,name,maildir,domain) VALUES ('user@toto.com','$1$caea3837$gPafod/Do/8Jj5M9HehhM.','Mailbox User','user@toto.com/','toto.com'); INSERT INTO mailbox (username,password,name,maildir,domain) VALUES ('admin@toto.com','$1$caea3837$gPafod/Do/8Jj5M9HehhM.','Mailbox Admin','admin@toto.com/','toto.com'); INSERT INTO domain_admins (username, domain, active) VALUES ('admin@toto.com','ALL','1'); INSERT INTO `admin` (`username`, `password`, `created`, `modified`, `active`) VALUES ('admin@toto.com', '$1$caea3837$gPafod/Do/8Jj5M9HehhM.', '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1); INSERT INTO config (id, name, value) VALUES (1, 'version', '392');