Ajout des fichiers de préparation de l'environnement de test
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
-- Alias (ne doivent pas apparaître)
|
||||
INSERT INTO postfix_alias (alias,destination,active) VALUES ("toto","test1",1);
|
||||
INSERT INTO postfix_alias (alias,destination,active) VALUES ("tata","test2",0);
|
||||
INSERT INTO postfix_alias (alias,destination,active) VALUES ("titi","test3",1);
|
||||
|
||||
-- Alias virtuels
|
||||
INSERT INTO postfix_alias_vitruels (courriel,destination,active) VALUES ("toto@exemple.fr","test1@exemple.fr",1);
|
||||
INSERT INTO postfix_alias_vitruels (courriel,destination,active) VALUES ("tata@exemple.fr","test2@exemple.fr",0);
|
||||
INSERT INTO postfix_alias_vitruels (courriel,destination,active) VALUES ("titi@exemple.fr","test3@exemple.fr",1);
|
||||
|
||||
-- Domaines secondaires
|
||||
INSERT INTO postfix_domaines (domaine,active) VALUES ("toto.fr",1);
|
||||
INSERT INTO postfix_domaines (domaine,active) VALUES ("tata.fr",1);
|
||||
INSERT INTO postfix_domaines (domaine,active) VALUES ("titi.fr",0);
|
||||
|
||||
-- Listes noires destinataires
|
||||
INSERT INTO postfix_liste_noire_destinataires (courriel,action,active) VALUES ("root@mail.exemple.fr","REJECT",1);
|
||||
INSERT INTO postfix_liste_noire_destinataires (courriel,action,active) VALUES ("git@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
|
||||
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 ("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 ("roland@bar.org",554,"Parle à ma main, ma tête est malade.",1);
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
chemin_script=$(dirname "$0")
|
||||
|
||||
mkdir -p /etc/postfix/
|
||||
rm -f /etc/postfix/postfix.sqlite
|
||||
|
||||
# Création des tables
|
||||
sqlite3 /etc/postfix/postfix.sqlite < "${chemin_script}"/postfix.sql
|
||||
|
||||
# Création des données
|
||||
sqlite3 /etc/postfix/postfix.sqlite < "${chemin_script}"/données.sql
|
||||
@@ -0,0 +1,30 @@
|
||||
CREATE TABLE IF NOT EXISTS postfix_alias (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
alias TEXT NOT NULL UNIQUE,
|
||||
destination TEXT NOT NULL,
|
||||
active INTEGER
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS postfix_alias_vitruels (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
courriel TEXT NOT NULL UNIQUE,
|
||||
destination TEXT NOT NULL,
|
||||
active INTEGER
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS postfix_domaines (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
domaine TEXT NOT NULL UNIQUE,
|
||||
active INTEGER
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS postfix_liste_noire_destinataires (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
courriel TEXT NOT NULL UNIQUE,
|
||||
action TEXT NOT NULL,
|
||||
active INTEGER
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS postfix_liste_noire_expediteurs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
courriel TEXT NOT NULL UNIQUE,
|
||||
code_retour INTEGER NOT NULL,
|
||||
message TEXT NOT NULL,
|
||||
active INTEGER
|
||||
);
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
docker build -t courtail ../
|
||||
docker run -it -p 8080:80 courtail:latest
|
||||
Reference in New Issue
Block a user