deplacement de scripts
This commit is contained in:
18
scripts/server-mail/add_alias.sh
Executable file
18
scripts/server-mail/add_alias.sh
Executable 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 🎉"
|
||||
Reference in New Issue
Block a user