GoAdmio Command Line: mailpwd with /go/mailpwd

/go/mailpwd resets the passwords of all email accounts of a domain in one go. It is useful after a security incident, such as a hacked mailbox or a spam campaign, when every account should get a new password. For each account on the domain, the command: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.

Quick start

# New random password for every account of example.com
/go/mailpwd example.com

Arguments

Position Argument Required Notes
1 <domain> Yes A hosted domain that isn’t in the trash.
2 [password] No One password for all accounts. Avoid spaces and single quotes (') in it.

There are no --option value pairs.

Examples

# Reset all accounts and keep the passwords in a private file
(umask 077; /go/mailpwd example.com > /root/example.com-passwords.txt)

# Give all accounts the same temporary password
/go/mailpwd example.com 'Temp-Pass-2026'

# Remove the temporary list of addresses the command leaves behind
rm /usr/local/goadmio/example.com.email

# Look up a password later in GoAdmio's database
sqlite3 /var/lib/sqlite/mail.db "select Email,Pass from Mail where Domain='example.com'"

Output

Change Multiple Email Account Passwords
info@example.com | k3JdP9xQw2LmZ8Ta
sales@example.com | Vb7RtN4yHs1CqE6u
support@example.com | Xe2MfG5pWd9AaKz3

The command prints a heading, then one line per account. Nothing else is shown while the mail services restart.

Situation Message
The domain isn’t hosted, or is in the trash Account Domain <domain> not exists, exit status 1. (See Known limitations: this check doesn’t work on Debian and Ubuntu.)
The domain has no email accounts Only the heading is printed, and the services are still restarted.

See the full reference at /go/mailpwd and the GoAdmio command index.

GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.

By:

Posted in:


Leave a Reply

Your email address will not be published. Required fields are marked *