Scripts pour gestion d'un serveur mail

This commit is contained in:
2025-03-08 02:03:38 +01:00
parent c88689b5e9
commit 027c3ab250
15 changed files with 486 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
POSTFIX_ALIASES="/etc/postfix/virtual_aliases"
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 <alias> <cible>"
exit 1
fi
ALIAS=$1
TARGET=$2
echo "$ALIAS $TARGET" >> $POSTFIX_ALIASES
postmap $POSTFIX_ALIASES
systemctl reload postfix
echo "Alias $ALIAS ajouté vers $TARGET 🎉"