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 ?

Hi!

I'm Marco Rodrigues with 25 years old and I live near Viseu, Portugal.
I usually work as Web Developer / Systems Administrator, specially with Open Source technologies. I'm available to work as freelancer.

Contact me.








Subscribe to my feed

Search


    Writing

    22 articles
    120 comments

      Comments

      platforms
      wp 52
      windows 52
      linux 7
      macos 3
      sun 0

      browsers
      ie 39 
      firefox 19 
      safari 7 
      opera 5 
      chrome 4 
      bonecho 0 
      epiphany 0 
      flock 0 
      konqueror 0 
      iceweasel 0 
      lynx 0 
      netnewswire 0