adapter la syntaxe pour pgSQL

From: Bernard Schoenacker <bernard(dot)schoenacker(at)free(dot)fr>
To: pgsql-fr-generale(at)postgresql(dot)org
Subject: adapter la syntaxe pour pgSQL
Date: 2018-01-11 15:37:24
Message-ID: 149081809.757155829.1515685044200.JavaMail.root@zimbra19-e3.priv.proxad.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale

bonjour,

pour passer à mailman3 je suis obligé de revoir la structure de ma messagerie
et de basculer courier vers dovecot et PgSQL

étant un débutant je recherche à refaire les tables pour pgSQL, voici
les éléments qui sont prévus pour mariadb:

cat instructions-postfix-SQL.txt
..........................................................................................

// créer une base portant son nom et donner à cet utilisateurs tous les privilèges, ou :
..........................................................................................
mysql -u root -p
mysql> CREATE USER 'postfix'@'localhost' IDENTIFIED BY 'mot_de_passe';
mysql> GRANT USAGE ON * . * TO 'postfix'@'localhost' IDENTIFIED BY 'mot_de_passe';
mysql> CREATE DATABASE `postfix` ;
mysql> GRANT ALL PRIVILEGES ON `postfix` . * TO 'postfix'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit

//
CREATE USER 'postfix'@'localhost' IDENTIFIED BY '***';

GRANT USAGE ON * . * TO 'postfix'@'localhost' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

GRANT ALL PRIVILEGES ON `postfix` . * TO 'postfix'@'localhost';
..........................................................................................
// importer les tables postfix ou :
USE postfix;
CREATE TABLE `domaines` (
`domaine` varchar(255) NOT NULL default '',
`etat` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`domaine`)
) ENGINE=InnoDB;
CREATE TABLE `comptes` (
`email` varchar(255) NOT NULL default '',
`password` varchar(255) NOT NULL default '',
`quota` int(10) NOT NULL default '0',
`etat` tinyint(1) NOT NULL default '1',
`imap` tinyint(1) NOT NULL default '1',
`pop3` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`email`)
) ENGINE=InnoDB;
CREATE TABLE `alias` (
`source` varchar(255) NOT NULL default '',
`destination` text NOT NULL,
`etat` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`source`)
) ENGINE=InnoDB;
..........................................................................................
INSERT INTO `postfix`.`comptes` ( `email` , `password` , `quota` , `etat` , `imap` , `pop3` ) VALUES ('moa(at)happy-tux(dot)org', ENCRYPT( 'mon_beau-mot-de-passe' ) , '0', '1', '1', '1');
..........................................................................................
service mysql reload

..........................................................................................
INSERT INTO `postfix`.`alias` ( `source`, `destination` , `etat` ) VALUES ('moa(at)happy-tux(dot)org', 'moa-tux(at)happy-tux(dot)org', '1');
..........................................................................................

slt
bernard

Browse pgsql-fr-generale by date

  From Date Subject
Next Message Rodolphe Quiédeville 2018-01-22 08:47:36 Poste DBA chez PeopleDoc
Previous Message Stéphane Kanschine 2018-01-09 11:52:16 Re: postfix mailman3 et pgsql