develop dans master - première version stable #9
+10
-10
@@ -4,15 +4,15 @@ INSERT INTO postfix_alias (alias,destination,active) VALUES ("tata","test2",0);
|
|||||||
INSERT INTO postfix_alias (alias,destination,active) VALUES ("titi","test3",1);
|
INSERT INTO postfix_alias (alias,destination,active) VALUES ("titi","test3",1);
|
||||||
|
|
||||||
-- Alias virtuels
|
-- Alias virtuels
|
||||||
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("toto@exemple.fr","comptable@tata.fr",1);
|
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("toto@toto.fr","comptable@toto.fr",1);
|
||||||
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("toto@exemple.fr","medecin@tata.fr",1);
|
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("toto@toto.fr","medecin@toto.fr",0);
|
||||||
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("toto@exemple.fr","supermacher@tata.fr",1);
|
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("toto@toto.fr","supermacher@toto.fr",1);
|
||||||
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("tata@exemple.fr","fleuriste@tata.fr",0);
|
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("tata@toto.fr","fleuriste@toto.fr",0);
|
||||||
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("tata@exemple.fr","coiffeur@tata.fr",0);
|
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("tata@toto.fr","coiffeur@toto.fr",0);
|
||||||
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("titi@exemple.fr","promos@tata.fr",1);
|
INSERT INTO postfix_alias_virtuels (courriel,destination,active) VALUES ("titi@toto.fr","promos@toto.fr",1);
|
||||||
|
|
||||||
-- Domaines secondaires
|
-- Domaines secondaires
|
||||||
INSERT INTO postfix_domaines (domaine,active) VALUES ("toto.fr",1);
|
INSERT INTO postfix_domaines (domaine,active,defaut) VALUES ("toto.fr",1,1);
|
||||||
INSERT INTO postfix_domaines (domaine,active) VALUES ("tata.fr",1);
|
INSERT INTO postfix_domaines (domaine,active) VALUES ("tata.fr",1);
|
||||||
INSERT INTO postfix_domaines (domaine,active) VALUES ("titi.fr",0);
|
INSERT INTO postfix_domaines (domaine,active) VALUES ("titi.fr",0);
|
||||||
|
|
||||||
@@ -22,9 +22,9 @@ INSERT INTO postfix_liste_noire_destinataires (courriel,action,active) VALUES ("
|
|||||||
INSERT INTO postfix_liste_noire_destinataires (courriel,action,active) VALUES ("liste@mail.exemple.fr","REJECT",1);
|
INSERT INTO postfix_liste_noire_destinataires (courriel,action,active) VALUES ("liste@mail.exemple.fr","REJECT",1);
|
||||||
|
|
||||||
-- Listes noires expéditeurs
|
-- Listes noires expéditeurs
|
||||||
INSERT INTO postfix_liste_noire_expediteurs (courriel,code_retour,message,active) VALUES ("tata@tutu.fr",554,"Parle à ma main, ma tête est malade.",0);
|
INSERT INTO postfix_liste_noire_expediteurs (courriel,code_retour,message,active) VALUES ("tata@toto.fr",554,"Parle à ma main, ma tête est malade.",0);
|
||||||
INSERT INTO postfix_liste_noire_expediteurs (courriel,code_retour,message,active) VALUES ("bob@foo.com",554,"Parle à ma main, ma tête est malade.",1);
|
INSERT INTO postfix_liste_noire_expediteurs (courriel,code_retour,message,active) VALUES ("bob@titi.fr",554,"Parle à ma main, ma tête est malade.",1);
|
||||||
INSERT INTO postfix_liste_noire_expediteurs (courriel,code_retour,message,active) VALUES ("roland@bar.org",554,"Parle à ma main, ma tête est malade.",1);
|
INSERT INTO postfix_liste_noire_expediteurs (courriel,code_retour,message,active) VALUES ("roland@tata.fr",554,"Parle à ma main, ma tête est malade.",1);
|
||||||
|
|
||||||
-- Listes utilisateurs
|
-- Listes utilisateurs
|
||||||
INSERT INTO postfix_utilisateurs (utilisateur,mot_de_passe,nom_complet,uid,gid,privilege,active) VALUES ("toto","toto","Alphonse Pastacaisse",5000,5000,"administrateur",1);
|
INSERT INTO postfix_utilisateurs (utilisateur,mot_de_passe,nom_complet,uid,gid,privilege,active) VALUES ("toto","toto","Alphonse Pastacaisse",5000,5000,"administrateur",1);
|
||||||
|
|||||||
+4
-4
@@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
chemin_script=$(dirname "$0")
|
chemin_script=$(dirname "$0")
|
||||||
|
|
||||||
mkdir -p /etc/postfix/
|
mkdir -p /etc/postfix/db
|
||||||
rm -f /etc/postfix/postfix.sqlite
|
rm -f /etc/postfix/db/postfix.sqlite
|
||||||
|
|
||||||
# Création des tables
|
# Création des tables
|
||||||
sqlite3 /etc/postfix/postfix.sqlite < "${chemin_script}"/postfix.sql
|
sqlite3 /etc/postfix/db/postfix.sqlite < "${chemin_script}"/postfix.sql
|
||||||
|
|
||||||
# Création des données
|
# Création des données
|
||||||
sqlite3 /etc/postfix/postfix.sqlite < "${chemin_script}"/données.sql
|
sqlite3 /etc/postfix/db/postfix.sqlite < "${chemin_script}"/données.sql
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
/**
|
/**
|
||||||
* Connexion à la base SQLite3.
|
* Connexion à la base SQLite3.
|
||||||
*/
|
*/
|
||||||
$base = "/etc/postfix/postfix.sqlite";
|
$base = "/etc/postfix/db/postfix.sqlite";
|
||||||
|
|
||||||
try{
|
try{
|
||||||
$pdo = new PDO("sqlite:$base");
|
$pdo = new PDO("sqlite:$base");
|
||||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
}
|
}
|
||||||
catch (Exception $e){
|
catch (Exception $e){
|
||||||
die ("Erreur de connexion à la base \"$base\" : ".$e->getMessage()) ;
|
die ("Erreur de connexion à la base \"$base\" : ".$e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user