Ajouter README avec instructions d'installation
This commit is contained in:
parent
4a989bad17
commit
4f7b9322ad
5 changed files with 76 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
vmail/
|
||||
*.log
|
||||
dovecot/users
|
||||
|
|
|
|||
63
README.md
Normal file
63
README.md
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# Mailstack - Serveur Mail Postfix + Dovecot
|
||||
|
||||
## Installation sur Debian
|
||||
|
||||
### 1. Installer les dépendances
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
sudo apt install -y podman podman-compose swaks git
|
||||
```
|
||||
|
||||
### 2. Se connecter en tant qu'utilisateur non-root
|
||||
|
||||
```bash
|
||||
su - ayo
|
||||
```
|
||||
|
||||
### 3. Cloner le projet
|
||||
|
||||
```bash
|
||||
git clone https://git.ayo.tokyo/jalwan/mail-files.git
|
||||
cd mail-files
|
||||
```
|
||||
|
||||
### 4. Créer le fichier hosts local
|
||||
|
||||
```bash
|
||||
cat > hosts << 'EOF'
|
||||
127.0.0.1 localhost
|
||||
127.0.0.1 mail.ayoinc.test ayoinc.test
|
||||
::1 localhost
|
||||
EOF
|
||||
```
|
||||
|
||||
### 5. Lancer les conteneurs
|
||||
|
||||
```bash
|
||||
podman-compose up -d
|
||||
```
|
||||
|
||||
### 6. Vérifier que tout tourne
|
||||
|
||||
```bash
|
||||
podman-compose ps
|
||||
```
|
||||
|
||||
Devrait afficher :
|
||||
mailstack-dovecot Up
|
||||
|
||||
mailstack-postfix Up
|
||||
|
||||
## 📧 Tester l'envoi de mail
|
||||
|
||||
```bash
|
||||
swaks --server localhost --port 1025 \
|
||||
--from alice@ayoinc.test \
|
||||
--to bob@ayoinc.test \
|
||||
--header "Subject: Test Mailstack" \
|
||||
--body "Bonjour, ceci est un test"
|
||||
```
|
||||
|
||||
---
|
||||
|
|
@ -5,12 +5,14 @@ services:
|
|||
build:
|
||||
context: .
|
||||
dockerfile: dovecot/Dockerfile
|
||||
image: mailstack_dovecot:latest
|
||||
container_name: mailstack-dovecot
|
||||
ports:
|
||||
- "1143:143" # IMAP
|
||||
- "1993:993" # IMAPS
|
||||
- "1143:143"
|
||||
- "1993:993"
|
||||
volumes:
|
||||
- vmail:/var/mail/vhosts
|
||||
- ./hosts:/etc/hosts:ro
|
||||
networks:
|
||||
- mailstack
|
||||
|
||||
|
|
@ -18,13 +20,15 @@ services:
|
|||
build:
|
||||
context: .
|
||||
dockerfile: postfix/Dockerfile
|
||||
image: mailstack_postfix:latest
|
||||
container_name: mailstack-postfix
|
||||
ports:
|
||||
- "1025:25" # SMTP
|
||||
- "1587:587" # SMTP + AUTH
|
||||
- "1465:465" # SMTPS
|
||||
- "1025:25"
|
||||
- "1587:587"
|
||||
- "1465:465"
|
||||
volumes:
|
||||
- vmail:/var/mail/vhosts
|
||||
- ./hosts:/etc/hosts:ro
|
||||
networks:
|
||||
- mailstack
|
||||
depends_on:
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
alice@ayoinc.test:{PLAIN}alice
|
||||
bob@ayoinc.test:{PLAIN}bob
|
||||
3
hosts
Normal file
3
hosts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
127.0.0.1 localhost
|
||||
127.0.0.1 mail.ayoinc.test ayoinc.test
|
||||
::1 localhost
|
||||
Loading…
Add table
Add a link
Reference in a new issue