Ver a proveniência

close #329, fix #337, close #326

pull/344/head
Luke Smith há 1 ano
ascendente
cometimento
3998323db0
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados ID da chave GPG: 4C50B54A911F6252
1 ficheiros alterados com 2 adições e 2 eliminações
  1. +2
    -2
      adddomain.sh

+ 2
- 2
adddomain.sh Ver ficheiro

@@ -1,15 +1,15 @@
#!/bin/sh

domain="$1"
[ -z "$domain" ] && exit

# Input validation to allow only valid domain characters
if ! [[ "$domain" =~ ^[a-zA-Z0-9.-]+$ ]]; then
echo "Invalid domain format. Only alphanumeric characters, dashes, and dots are allowed."
echo "Give a valid domain as an argument to add mail server for it. Only alphanumeric characters, dashes, and dots are allowed."
exit 1
fi

subdom="mail"
maildomain="mail.$(cat /etc/mailname)"

# Add the domain to the valid postfix addresses
grep -q "^mydestination.*$domain" /etc/postfix/main.cf ||


Carregando…
Cancelar
Guardar