WIP : recherche du bug de suppression totale des confs
This commit is contained in:
parent
c51c2a5f4b
commit
7124914e7a
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ if grep -q -e ^$user: /etc/passwd ; then
|
|||
# Del account from members ML
|
||||
echo -n "Deleting mail from member list..."
|
||||
pos=$(grep --line-number -e ^$user: /etc/postfix/virtual_members | cut -d ":" -f 1)
|
||||
echo Found at pos $pos
|
||||
sed -i "${pos}d" /etc/postfix/virtual_members
|
||||
postmap /etc/postfix/virtual_members
|
||||
echo "[OK]"
|
||||
|
@ -23,6 +24,7 @@ if grep -q -e ^$user: /etc/passwd ; then
|
|||
# Del account from any redirect (if exist)
|
||||
echo -n "Deleting mail from member list..."
|
||||
pos=$(grep --line-number -e ^$user: /etc/postfix/virtual_redirect | cut -d ":" -f 1)
|
||||
echo Found at pos $pos
|
||||
sed -i "${pos}d" /etc/postfix/virtual_redirect
|
||||
postmap /etc/postfix/virtual_redirect
|
||||
echo "[OK]"
|
||||
|
@ -34,7 +36,7 @@ if grep -q -e ^$user: /etc/passwd ; then
|
|||
|
||||
|
||||
echo -n "Reloading postfix..."
|
||||
postfix reload > /dev/null 2>&1
|
||||
postfix reload
|
||||
echo "[OK]"
|
||||
|
||||
$SCRIPTPATH/sendmail_deletion.sh $user $email
|
||||
|
|
Loading…
Reference in a new issue