Correction bug suppression totale des confs
This commit is contained in:
parent
69cc961382
commit
37cfe6d33f
|
@ -19,7 +19,7 @@ if grep -q -e ^$user: /etc/passwd ; then
|
|||
echo -n "Deleting mail from member list..."
|
||||
pos=$(grep --line-number $user /etc/postfix/virtual_members | cut -d ":" -f 1)
|
||||
|
||||
if [ -n $pos ] ; then
|
||||
if [ -n $pos ] && [ "$pos" -eq "$pos" ] ; then
|
||||
echo Found at pos $pos
|
||||
sed -i "${pos}d" /etc/postfix/virtual_members
|
||||
postmap /etc/postfix/virtual_members
|
||||
|
@ -29,7 +29,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 $user /etc/postfix/virtual_redirect | cut -d ":" -f 1)
|
||||
if [ -n $pos ] ; then
|
||||
if [ -n $pos ] && [ "$pos" -eq "$pos" ] ; then
|
||||
echo Found at pos $pos
|
||||
sed -i "${pos}d" /etc/postfix/virtual_redirect
|
||||
postmap /etc/postfix/virtual_redirect
|
||||
|
|
Loading…
Reference in New Issue