Qmailtoaster change ‘postmaster’ password for all domains

Posted on | February 3, 2010 | No Comments

Last year I needed to change the password of all postmaster accounts at company server and I didn’t googled anything, so I made this script:

#!/bin/bash
#############################################################
# Qmailtoaster change 'postmaster' password for all domains #
#############################################################
# bY Marco Rodrigues (Kmos) in 2k                           #
# http://Marco.Tondela.org                                  #
#############################################################

# Check every directory (domain) recursively and change postmaster password.
for dir in `ls -R`; do
    if [[ $dir =~ [^\.]+\.(com|net|org|pt)$ ]]; then
        /home/vpopmail/bin/vpasswd postmaster@$dir password
        echo "Password changed for postmaster@$dir"
    fi
done

I hope it could help *you* some day :)

Comments

Leave a Reply







Who Am I ?

I'm Marco Rodrigues and I currently work in Luxembourg as System Administrator.

Contact me.








Subscribe to my feed

Search

    Writing

    26 articles
    1491 comments

      Comments

      platforms
      windows 1431
      linux 21
      macos 3
      sun 0
      wp 0

      browsers
      ie 1361 
      opera 66 
      firefox 52 
      safari 14 
      chrome 11 
      bonecho 0 
      flock 0 
      epiphany 0 
      konqueror 0 
      iceweasel 0 
      lynx 0 
      netnewswire 0